Panic action

Arran Cudbard-Bell a.cudbardb at freeradius.org
Sun Jan 26 18:27:10 CET 2014


There was some discussion on the users list with a suggestion by Phil 
to implement something similar to the Samba project's panic action.

That's now been done

#  panic_action: Command to execute on server fault.
#
#  WARNING: DO NOT SET A PANIC ACTION ON PRODUCTION SERVERS WHICH DOES
#  WARNING: NOT IMMEDIATELY RETURN.  DOING SO MAY PREVENT YOUR SERVER
#  WARNING: FROM RESTARTING.
#
#  Sets a command which will be executed if the server receives a fatal,
#  non user generated signal, i.e. SIGSEGV, SIGBUS, SIGABRT or SIGFPE.
#
#  This can be used to start an interactive debugging session so
#  that information regarding the current state of the server can
#  be acquired.
#
#  The following string substitutions are available:
#  - %e   The currently executing program e.g. /sbin/radiusd
#  - %p   The PID of the currently executing program e.g. 12345
#
#  Standard ${} substitutions are also allowed.
#
#  An example panic action for opening an interactive session in GDB would be:
#panic_action = "gdb %e %p"
#
#  An example panic action for opening an automated session in GDB would be:
#panic_action = "gdb -silent -x ${raddbdir}/panic.gdb %e %p > ${logdir}/gdb.log 2>&1"

So getting full backtraces out of the server should now be as simple as
uncommenting that bottom panic_action line.

With the automated session it should be safe to run on production servers,
and will provide useful information about transient faults.

Also added support for panic_action to the unittest program, so if any
of the unittests fail with a segv you'll get a full GDB backtrace 
automatically.

https://travis-ci.org/FreeRADIUS/freeradius-server/jobs/17651987#L2043

Arran Cudbard-Bell <a.cudbardb at freeradius.org>
FreeRADIUS Development Team

FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 881 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20140126/15d326c6/attachment.pgp>


More information about the Freeradius-Devel mailing list