cannot get core dump of crashing freeradius

Jakob Hirsch jh at
Mon Apr 19 19:38:40 CEST 2010

Alan Buxey, 2010-04-19 16:43:

>> Maybe the info about /proc/sys/fs/suid_dumpable should be added to
>> doc/bugs...
> to quote the man page:
>        /proc/sys/fs/suid_dumpable (since Linux 2.6.13)
> i dont think this got enough coverage in most information fact
> 2.6.13 has been around for a while but today was the first time i learnt of
> that behaviour. 

I agree, even though it's mentioned in the CORE(5) man page.

> maybe FreeRADIUS code updated to detect this value...and if its set to 0
> then it could mention it in the debug output? ;-)

Maybe, but with calling prctl(PR_SET_DUMPABLE, 1) this should not be
necessary any more.
I tried this with a small test program and it worked as specified, but
still I won't get a core dump of the FR process unless I set
suid_dumpable to 1.

So after some debugging I got to the root cause of this:
The process's dumpable flag is reset every time the UID is changed. FR
does this several times with fr_suid_up() and fr_suid_down() after
switch_users() is run, e.g. in listen_bind().
So I guess we have to change the fr_suid_* functions to always set the
dumpable flag after setting the uid.

btw, I wonder why is prctl() is not called when debug_flag is set. I
would have thought that one would want to get a core dump especially
when running in debug mode.

More information about the Freeradius-Users mailing list