Problem with syslogd

From: Markus Wild <mw_at_kpnqwest.ch>
Date: Tue, 1 Jun 2004 14:33:35 +0200 (CEST)
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
Received on Tue Jun 01 2004 - 03:33:39 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:55 UTC