[syslog-ng] missing logs when SIGHUP

Martin Ervius ervius at gmail.com
Mon Dec 3 17:08:18 CET 2007


I downloaded a snapshot from:
http://git.balabit.hu/?p=bazsi/syslog-ng-2.0.git;a=snapshot;h=a33ee30c1e059c1c6dc9839047379f3f3a8dfa4d.
It compiled ok, but gets a segmentation fault when initializing (it can
display version and help info), but if I run with my cfg file it dies.

Here's the last part of strace when i run it:

open("/opt/syslog-ng-2.0.git/var/syslog-ng.persist", O_RDONLY|O_LARGEFILE) =
-1 ENOENT (No such file or directory)
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3
fcntl64(3, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
fcntl64(3, F_GETFD)                     = 0
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
bind(3, {sa_family=AF_INET, sin_port=htons(514),
sin_addr=inet_addr("0.0.0.0")},
16) = 0
listen(3, 255)                          = 0
setsockopt(3, SOL_SOCKET, SO_KEEPALIVE, [0], 4) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
kill(31071, SIGSEGV)                    = 0
sigreturn()                             = ? (mask now [])
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Process 31071 detached

The new 2.0.6 release runs fine on the same machine, but I may have done
something wrong when I built the snapshot? To compile, I manually copied
config.h.in, configure and install-sh from the 2.0.6 release to the base of
the snapshot tree. After that, I ran:
$ aclocal
$ automake --add-missing
$ ./configure --prefix=/opt/syslog-ng-2.0.git && make install

// Martin



----------------------------------------------------------------------------------------------------------------------------
On Dec 1, 2007 5:15 PM, Balazs Scheidler <bazsi at balabit.hu> wrote:

Thanks for the detailed explanation. I indeed forgot to save and restore
some data buffers accross reloads. The patch is risky somewhat, so I did
not apply it to the mainline yet.

I performed some limited testing on my development laptop, I've made
syslog-ng delay output on destination files, sent a couple of messages
to it, sent a SIGHUP, some more messages, and it seems to write all
buffered messages to the configured destination nicely. I've also
checked for two cases of possible memory leaks, and syslog-ng freed what
it had to free.

I'd appreciate some additional testing. If there's an ACK from you, I
apply the patch to mainline, where it can sit till the next release.

The patch is attached to this mail, but I've also pushed it to
git.balabit.hu, "remember-dw-file" branch.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.balabit.hu/pipermail/syslog-ng/attachments/20071203/0aaaa5cd/attachment.htm 


More information about the syslog-ng mailing list