Memory leak in FR 2.1.10 and 2.2.0 ?

Alan DeKok aland at deployingradius.com
Tue Jan 8 16:24:46 CET 2013


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.

  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.


More information about the Freeradius-Users mailing list