[syslog-ng] [Bug 97] New: syslog-ng crashes after SIGHUP
bugzilla at bugzilla.balabit.com
bugzilla at bugzilla.balabit.com
Tue Nov 30 22:33:35 CET 2010
https://bugzilla.balabit.com/show_bug.cgi?id=97
Summary: syslog-ng crashes after SIGHUP
Product: syslog-ng
Version: 3.0.x
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: unspecified
Component: syslog-ng
AssignedTo: bazsi at balabit.hu
ReportedBy: zhengxiang.pan at alcatel-lucent.com
Type of the Report: bug
Estimated Hours: 0.0
Syslog-ng 3.0.6 crashes with following trace:
Program terminated with signal 11, Segmentation fault.
[New process 6311]
#0 0x08063558 in log_source_group_queue (s=0x8ca6e00, msg=0x8caecc0, path_options=0xbfffaf18) at sgroup.c:98
98 (*self->processed_messages)++;
(gdb) bt
#0 0x08063558 in log_source_group_queue (s=0x8ca6e00, msg=0x8caecc0, path_options=0xbfffaf18) at sgroup.c:98
#1 0x08070580 in log_source_queue (s=0x8cadc78, msg=0x8caecc0, path_options=0xbfffaf74) at logpipe.h:121
#2 0x08063e80 in log_reader_fd_dispatch (source=0x8cadd10, callback=0, user_data=0x0) at logpipe.h:121
#3 0x08080081 in g_main_context_dispatch ()
#4 0x08083103 in g_main_context_iterate ()
#5 0x0808327f in g_main_context_iteration ()
#6 0x0804b52f in main_loop_run (cfg=0xbfffb0e8) at main.c:163
#7 0x0804bbcd in main (argc=147613904, argv=0xbfffb110) at main.c:443
The problem happens from version 3.0.6 ( I did not test other version lower than that) until the lastest 3.1.3.
I guess what happens is that when SIGHUP is recevied, some connections are persisted, while the persistent connections points to the already-freed pipe (via
pipe_next), if there are messages coming before the freed-pipes are replaced, the messages are forwarded to the freed-pipe handler.
For version 3.1.3, in logpipe.c, log_pipe_forward_msg() may add check the pipe_next flags, however this may be not enough.
log_pipe_forward_msg(LogPipe *self, LogMessage *msg, const LogPathOptions *path_options)
{
if (self->pipe_next && self->flags&PIF_INITIALIZED)
{
log_pipe_queue(self->pipe_next, msg, path_options);
--
Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the syslog-ng
mailing list