On Sun, 2011-11-13 at 19:58 -0700, Patrick H. wrote:
Syslog-ng 3.3.2 (obtained from
http://www.balabit.com/downloads/files?path=/syslog-ng/sources/3.3.2/source) is segfaulting when it tries to send a message to a TCP destination. I'm asking here instead of a bug report because I didnt see a 3.3.2 release announcement, so not sure if this is the final build or not.
Anyway, gdb backtrace shows:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x40f67940 (LWP 29440)]
0x00002b047a812261 in log_pipe_queue (s=0x12d0d94f, msg=0x12d04400,
path_options=0x40f64150) at logpipe.h:288
288 s->queue(s, msg, path_options, s->queue_data);
...
I could reproduce a crash here, and this one solves it. (was related to
one of the leak fixes which went in before 3.3.2 was released)
$ git diff
diff --git a/lib/driver.h b/lib/driver.h
index c805da5..7f7acbd 100644
--- a/lib/driver.h
+++ b/lib/driver.h
@@ -188,7 +188,6 @@ log_dest_driver_release_queue(LogDestDriver *self,
LogQueue *q)
if (q)
{
self->queues = g_list_remove(self->queues, q);
- log_queue_unref(q);
self->release_queue(self, q, self->release_queue_data);
}
I still have to think through all consequences whether this reintroduces
a leak, but this seems to be right, I just have to go now.
PS: it warrants a 3.3.2 if this solves the issue for you.