Memory leak in FR 2.1.10 and 2.2.0 ?

Philippe MARASSE philippe.marasse at ch-poitiers.fr
Tue Jan 8 19:15:07 CET 2013


Le 08/01/2013 16:24, Alan DeKok a écrit :
> Philippe MARASSE wrote:
>> As the complete log is pretty big (around 1 Mb) I did not post the
>> entire result (and it exceeds 500kb limit of pastebin), but I can send
>> by mail valgrind log, pcap and other possibly useful things.
>    For this, send valgrind logs to me personally.
>
>> I've never used valgrind before but here's some extract that I've think
>> relevant and the summary :
>>
>> ==00:01:17:29.869 24818== 10,033,120 (16,016 direct, 10,017,104
>> indirect) bytes in 143 blocks are definitely lost in loss record 723 of 724
>> ==00:01:17:29.869 24818==    at 0x4023F50: malloc (vg_replace_malloc.c:236)
>> ==00:01:17:29.869 24818==    by 0x806B2EC: rad_malloc (in
>> /usr/sbin/freeradius)
>> ==00:01:17:29.869 24818==    by 0x47FBBE5: ???
>> ==00:01:17:29.869 24818==    by 0x47F9A15: ???
>> ==00:01:17:29.869 24818==    by 0x47F8E99: ???
>    Well... that needs to be fixed.
>
>> I don't know if I've missed something as there's some "???" in the call
>> stacks ?
>    You need to build the server with debugging symbols.  See doc/bugs
>
>    The ??? indicates that valgrind couldn't find symbols for one of the
> modules which was loaded.
I'm a bit confused : I built debian package with rules provided in tarball, configure 
options are :

./configure --build i486-linux-gnu \
                 --prefix=/usr \
                 --exec-prefix=/usr \
                 --mandir=/usr/share/man \
                 --sysconfdir=/etc \
                 --libdir=/usr/lib/freeradius \
                 --datadir=/usr/share \
                 --localstatedir=/var \
                 --with-raddbdir=/etc/freeradius \
                 --with-logdir=/var/log/freeradius \
                 --enable-ltdl-install=no --enable-strict-dependencies \
                 --with-large-files --with-udpfromto --with-edir \
                 --enable-developer \
                 --config-cache \
                 --without-rlm_eap_tnc \
                 --with-rlm_sql_postgresql_lib_dir=`pg_config --libdir` \
                 --with-rlm_sql_postgresql_include_dir=`pg_config --includedir` \
                 --without-rlm_eap_ikev2 \
                 --without-rlm_sql_oracle \
                 --without-rlm_sql_unixodbc \
                 --with-system-libtool \
                 --with-system-libltdl

unless I've missed something, --enable-developer should be sufficient to generate 
debugging symbols for freeradius modules ?

>
>    And even the above trace might not be useful.  This is leaked at
> *exit*.  The server might be tracking memory correctly, so it's not
> exactly a "leak".  And that tracked memory is cleaned up at exit.
>
>    i.e. there may be one of two issues here:
>
> - actual leaked memory
>
> - memory which SHOULD have been free'd, but wasn't.  It's still tracked,
> just not used.
>
>    Alan DeKok.
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Regards

-- 
Philippe MARASSE

Service Informatique - Centre Hospitalier Henri Laborit
BP 587 - 370 avenue Jacques Coeur
86021 Poitiers Cedex
Tel : 05.49.44.57.19


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4539 bytes
Desc: Signature cryptographique S/MIME
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20130108/5bee21ed/attachment-0001.bin>


More information about the Freeradius-Users mailing list