<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="generator" content="Osso Notes">
    <title></title></head>
<body>
<p>hi,
<br>
<br>thanks for the diagnosis, I'll look into applying the patch again.
<br>
<br>----- Original message -----
<br>&gt; Hi,
<br>&gt; 
<br>&gt; I also was able to reproduce the segfault. It always happened when a
<br>&gt; "mark" was generated. So, in order to reproduce this, set the mark
<br>&gt; intervall to a low value, i.e. mark(1).
<br>&gt; 
<br>&gt; I don't think it's a Problem of the 32bit NVTable patch, though. The
<br>&gt; following changes also made the segfault go away:
<br>&gt; 
<br>&gt; --- a/lib/driver.c
<br>&gt; +++ b/lib/driver.c
<br>&gt; @@ -158,7 +158,7 @@ log_src_driver_queue_method(LogPipe *s, LogMessage
<br>&gt; *msg, const LogPathOptions *p
<br>&gt;&nbsp; &nbsp; &nbsp; &#32;if (msg-&gt;flags &amp; LF_LOCAL)
<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#32;afinter_postpone_mark(cfg-&gt;mark_freq);
<br>&gt; 
<br>&gt; -&nbsp; &#32;log_msg_set_value(msg, LM_V_SOURCE, self-&gt;super.group,
<br>&gt; self-&gt;group_len); +&nbsp; &#32;log_msg_set_value(msg, LM_V_SOURCE,
<br>&gt; self-&gt;super.group, strlen(self-&gt;super.group));
<br>&gt;&nbsp; &nbsp; &nbsp; &#32;stats_counter_inc(self-&gt;super.processed_group_messages);
<br>&gt;&nbsp; &nbsp; &nbsp; &#32;stats_counter_inc(self-&gt;received_global_messages);
<br>&gt;&nbsp; &nbsp; &nbsp; &#32;log_pipe_forward_msg(s, msg, path_options);
<br>&gt; 
<br>&gt; It seems that self-&gt;group_len is not initialized correctly, resulting in
<br>&gt; some ridiculous large value_len being passed to nv_table_set value. I
<br>&gt; just found this, but did not have any further time to investigate. I
<br>&gt; suspect this has been there before the NVTable patch, but since the
<br>&gt; value_len exceeded the old NVTable max value size, nothing was inserted.
<br>&gt; 
<br>&gt;&nbsp; &nbsp; &nbsp; &#32;Peter
<br>&gt; 
<br>&gt; 
<br>&gt; Am 04.04.2012 19:44, schrieb Balazs Scheidler:
<br>&gt; &gt; I have reverted the changes for now.
<br>&gt; &gt; 
<br>&gt; &gt; ----- Original message -----
<br>&gt; &gt; &gt; On 04/03/2012 03:53 PM, Gergely Nagy wrote:
<br>&gt; &gt; &gt; &gt; Peter Czanik&lt;<a href="mailto:czanik@balabit.hu">czanik@balabit.hu</a> &lt;<a href="mailto:czanik@balabit.hu">mailto:czanik@balabit.hu</a>&gt;&gt;&nbsp; &#32;writes:
<br>&gt; &gt; &gt; &gt; 
<br>&gt; &gt; &gt; &gt; &gt; Program terminated with signal 11, Segmentation fault.
<br>&gt; &gt; &gt; &gt; &gt; #0&nbsp; &#32;0x000000080142fb86 in memcpy () from /lib/libc.so.7
<br>&gt; &gt; &gt; &gt; &gt; (gdb) thread apply all backtrace
<br>&gt; &gt; &gt; &gt; &gt; 
<br>&gt; &gt; &gt; &gt; &gt; Thread 1 (Thread 8016041c0 (LWP 100064)):
<br>&gt; &gt; &gt; &gt; &gt; #0&nbsp; &#32;0x000000080142fb86 in memcpy () from /lib/libc.so.7
<br>&gt; &gt; &gt; &gt; &gt; #1&nbsp; &#32;0x00000008006884a8 in nv_table_add_value (self=0x803c00000,
<br>&gt; &gt; &gt; &gt; &gt; handle=7, name=0x80161b1c8 "SOURCE", name_len=6,
<br>&gt; &gt; &gt; &gt; &gt; value=0x80161b4c0 "s_local",
<br>&gt; &gt; &gt; &gt; &gt; value_len=23133952, new_entry=0x7fffffffe424) at nvtable.c:464
<br>&gt; &gt; &gt; &gt; Interesting. Can you perhaps try with commit
<br>&gt; &gt; &gt; &gt; bb667115b80b24055dd1245084c7d2e26d01d184 reverted?
<br>&gt; &gt; &gt; &gt; 
<br>&gt; &gt; &gt; Yes, that solved the problem on FreeBSD 8.1.
<br>&gt; &gt; &gt; Previously I wrote, that this problem does not seem to affect Linux.
<br>&gt; &gt; &gt; I checked it again, and have some mixed results: I have some logs
<br>&gt; &gt; &gt; from yesterday, even from after I installed the git version with
<br>&gt; &gt; &gt; NVtable changes, but right now it's also segfaults on openSUSE 12.1.
<br>&gt; &gt; &gt; Bye,
<br>&gt; ______________________________________________________________________________
<br>&gt; Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a>
<br>&gt; Documentation:
<br>&gt; <a href="http://www.balabit.com/support/documentation/?product=syslog-ng">http://www.balabit.com/support/documentation/?product=syslog-ng</a> FAQ:
<br>&gt; <a href="http://www.balabit.com/wiki/syslog-ng-faq">http://www.balabit.com/wiki/syslog-ng-faq</a>
<br>&gt; 
<br><br></p>
</body>
</html>