[syslog-ng] smtp on FreeBSD
Peter Eisenlohr
peter.eisenlohr at inform-software.com
Thu Apr 5 23:53:42 CEST 2012
Hi,
I also was able to reproduce the segfault. It always happened when a
"mark" was generated. So, in order to reproduce this, set the mark
intervall to a low value, i.e. mark(1).
I don't think it's a Problem of the 32bit NVTable patch, though. The
following changes also made the segfault go away:
--- a/lib/driver.c
+++ b/lib/driver.c
@@ -158,7 +158,7 @@ log_src_driver_queue_method(LogPipe *s, LogMessage
*msg, const LogPathOptions *p
if (msg->flags & LF_LOCAL)
afinter_postpone_mark(cfg->mark_freq);
- log_msg_set_value(msg, LM_V_SOURCE, self->super.group, self->group_len);
+ log_msg_set_value(msg, LM_V_SOURCE, self->super.group,
strlen(self->super.group));
stats_counter_inc(self->super.processed_group_messages);
stats_counter_inc(self->received_global_messages);
log_pipe_forward_msg(s, msg, path_options);
It seems that self->group_len is not initialized correctly, resulting in
some ridiculous large value_len being passed to nv_table_set value. I
just found this, but did not have any further time to investigate. I
suspect this has been there before the NVTable patch, but since the
value_len exceeded the old NVTable max value size, nothing was inserted.
Peter
Am 04.04.2012 19:44, schrieb Balazs Scheidler:
> I have reverted the changes for now.
>
> ----- Original message -----
>> On 04/03/2012 03:53 PM, Gergely Nagy wrote:
>> > Peter Czanik<czanik at balabit.hu <mailto:czanik at balabit.hu>> writes:
>> >
>> > > Program terminated with signal 11, Segmentation fault.
>> > > #0 0x000000080142fb86 in memcpy () from /lib/libc.so.7
>> > > (gdb) thread apply all backtrace
>> > >
>> > > Thread 1 (Thread 8016041c0 (LWP 100064)):
>> > > #0 0x000000080142fb86 in memcpy () from /lib/libc.so.7
>> > > #1 0x00000008006884a8 in nv_table_add_value (self=0x803c00000,
>> > > handle=7, name=0x80161b1c8 "SOURCE", name_len=6, value=0x80161b4c0
>> > > "s_local",
>> > > value_len=23133952, new_entry=0x7fffffffe424) at nvtable.c:464
>> > Interesting. Can you perhaps try with commit
>> > bb667115b80b24055dd1245084c7d2e26d01d184 reverted?
>> >
>> Yes, that solved the problem on FreeBSD 8.1.
>> Previously I wrote, that this problem does not seem to affect Linux. I
>> checked it again, and have some mixed results: I have some logs from
>> yesterday, even from after I installed the git version with NVtable
>> changes, but right now it's also segfaults on openSUSE 12.1.
>> Bye,
More information about the syslog-ng
mailing list