Problem with syslogd

Markus Wild mw at kpnqwest.ch
Tue Jun 1 05:33:40 PDT 2004


Hi there,

I'm frequently seeing a problem with syslogd aborting, with a 
gdb trace indicating it's trying to free() content out of the
reapchild() function, with the signal having interrupted another
malloc/free type function call. I was able to keep the effects of
this in bay by blocking SIGCHLD in logmsg() and validate(), but
I might not have caught all possible cases yet. Looking at
the code, is it such a great idea to call a non-reentrant 
allocation function (free()) from a signal handler? reapchild()
calls deadq_remove(), which by itself calls free(). IMHO this
should be moved out of the signal handler, or am I missing something?

If you want to provoke the bug, have a "|" command in your syslog.conf
with a command that frequently terminates, and feed it a lot of 
messages....

Cheers,
Markus


More information about the freebsd-current mailing list