<div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Message: 1<br>
Date: Mon, 5 Dec 2011 19:54:42 +0800<br>
From: Luis Pugoy <<a href="mailto:lpugoy@insynchq.com">lpugoy@insynchq.com</a>><br>
Subject: Re: [syslog-ng] syslog-ng 3.1.2 segmentation fault in Ubuntu<br>
10.10<br>
To: <a href="mailto:syslog-ng@lists.balabit.hu">syslog-ng@lists.balabit.hu</a><br>
Message-ID:<br>
<<a href="mailto:CA%2BWGxEhKYMQXbYTVUZVScjaXDdjRETGSCk5nZaisW9p-UOQWoA@mail.gmail.com">CA+WGxEhKYMQXbYTVUZVScjaXDdjRETGSCk5nZaisW9p-UOQWoA@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
><br>
> Message: 3<br>
> Date: Mon, 05 Dec 2011 10:10:40 +0100<br>
> From: Gergely Nagy <<a href="mailto:algernon@balabit.hu">algernon@balabit.hu</a>><br>
> Subject: Re: [syslog-ng] syslog-ng 3.1.2 segmentation fault in Ubuntu<br>
> 10.10<br>
> To: Syslog-ng users' and developers' mailing list<br>
> <<a href="mailto:syslog-ng@lists.balabit.hu">syslog-ng@lists.balabit.hu</a>><br>
> Message-ID: <87aa77l6y7.fsf@algernon.balabit><br>
> Content-Type: text/plain<br>
><br>
> Luis Pugoy <<a href="mailto:lpugoy@insynchq.com">lpugoy@insynchq.com</a>> writes:<br>
><br>
> > Does anyone have any insight into this? The segfault is happening more<br>
> > often now. :(<br>
><br>
> I'd suggest either upgrading to 3.3 from my repo[1], or if an upgrade is<br>
> not feasible, then if you could compile 3.1 with debug symbols, get it<br>
> to drop a core, and do a backtrace, that would help tremendously.<br>
><br>
> [1]: <a href="http://asylum.madhouse-project.org/projects/debian/" target="_blank">http://asylum.madhouse-project.org/projects/debian/</a><br>
><br>
> To do the latter, the following steps should work:<br>
><br>
> $ apt-get source syslog-ng<br>
> $ sudo apt-get build-dep syslog-ng<br>
> $ cd syslog-ng-*<br>
> $ DEB_BUILD_OPTIONS="debug nostrip" dpkg-buildpackage -us -uc -rfakeroot<br>
> $ sudo dpkg -i ../syslog-ng_*.deb<br>
><br>
> Then add --enable-core to SYSLOGNG_OPTS in /etc/default/syslog-ng, and<br>
> when it segfaults, it'll make a core in (as far as I remember) /. Once<br>
> that happened, do something like this:<br>
><br>
> $ gdb -c /core /usr/bin/syslog-ng<br>
> (gdb) thread apply all bt full<br>
><br>
> This should give us a few hints.<br>
><br>
> --<br>
> |8]<br>
><br>
<br>
I installed a newer version of the PCRE library. That seems to have worked<br>
for now. If it happens again I will be sure to follow your instructions,<br>
thanks.<br></blockquote><div><br></div><div>Well, installing another version of the PCRE library did not solve my problem. syslog-ng is still segfaulting. I tried upgrading to 3.2.2 but that did nothing, so I tried to create the backtrace like you said. However I don't think it was helpful in my case. The following is the output of the backtrace:</div>
<div><br></div><div><div><div>root@ip-10-34-150-77:/var/lib/syslog-ng# gdb -c core /usr/sbin/syslog-ng</div><div>GNU gdb (GDB) 7.2-ubuntu</div><div>Copyright (C) 2010 Free Software Foundation, Inc.</div><div>License GPLv3+: GNU GPL version 3 or later <<a href="http://gnu.org/licenses/gpl.html">http://gnu.org/licenses/gpl.html</a>></div>
<div>This is free software: you are free to change and redistribute it.</div><div>There is NO WARRANTY, to the extent permitted by law. Type "show copying"</div><div>and "show warranty" for details.</div>
<div>This GDB was configured as "x86_64-linux-gnu".</div><div>For bug reporting instructions, please see:</div><div><<a href="http://www.gnu.org/software/gdb/bugs/">http://www.gnu.org/software/gdb/bugs/</a>>...</div>
<div>Reading symbols from /usr/sbin/syslog-ng...done.</div><div>[New Thread 14680]</div><div><br></div><div>warning: Can't read pathname for load map: Input/output error.</div><div>Reading symbols from /lib/librt.so.1...(no debugging symbols found)...done.</div>
<div>Loaded symbols for /lib/librt.so.1</div><div>Reading symbols from /lib/libnsl.so.1...(no debugging symbols found)...done.</div><div>Loaded symbols for /lib/libnsl.so.1</div><div>Reading symbols from /usr/lib/libgthread-2.0.so.0...(no debugging symbols found)...done.</div>
<div>Loaded symbols for /usr/lib/libgthread-2.0.so.0</div><div>Reading symbols from /lib/libglib-2.0.so.0...(no debugging symbols found)...done.</div><div>Loaded symbols for /lib/libglib-2.0.so.0</div><div>Reading symbols from /usr/lib/libevtlog.so.0...(no debugging symbols found)...done.</div>
<div>Loaded symbols for /usr/lib/libevtlog.so.0</div><div>Reading symbols from /lib/libssl.so.0.9.8...(no debugging symbols found)...done.</div><div>Loaded symbols for /lib/libssl.so.0.9.8</div><div>Reading symbols from /lib/libcrypto.so.0.9.8...(no debugging symbols found)...done.</div>
<div>Loaded symbols for /lib/libcrypto.so.0.9.8</div><div>Reading symbols from /lib/libz.so.1...(no debugging symbols found)...done.</div><div>Loaded symbols for /lib/libz.so.1</div><div>Reading symbols from /usr/lib/libnet.so.1...(no debugging symbols found)...done.</div>
<div>Loaded symbols for /usr/lib/libnet.so.1</div><div>Reading symbols from /lib/libwrap.so.0...(no debugging symbols found)...done.</div><div>Loaded symbols for /lib/libwrap.so.0</div><div>Reading symbols from /usr/lib/libdbi.so.0...(no debugging symbols found)...done.</div>
<div>Loaded symbols for /usr/lib/libdbi.so.0</div><div>Reading symbols from /lib/libcap.so.2...(no debugging symbols found)...done.</div><div>Loaded symbols for /lib/libcap.so.2</div><div>Reading symbols from /lib/libpcre.so.3...(no debugging symbols found)...done.</div>
<div>Loaded symbols for /lib/libpcre.so.3</div><div>Reading symbols from /lib/libpthread.so.0...(no debugging symbols found)...done.</div><div>Loaded symbols for /lib/libpthread.so.0</div><div>Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.</div>
<div>Loaded symbols for /lib/libc.so.6</div><div>Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done.</div><div>Loaded symbols for /lib64/ld-linux-x86-64.so.2</div><div>Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done.</div>
<div>Loaded symbols for /lib/libdl.so.2</div><div>Reading symbols from /lib/libm.so.6...(no debugging symbols found)...done.</div><div>Loaded symbols for /lib/libm.so.6</div><div>Reading symbols from /lib/libattr.so.1...(no debugging symbols found)...done.</div>
<div>Loaded symbols for /lib/libattr.so.1</div><div>Reading symbols from /lib/libnss_compat.so.2...(no debugging symbols found)...done.</div><div>Loaded symbols for /lib/libnss_compat.so.2</div><div>Reading symbols from /lib/libnss_nis.so.2...(no debugging symbols found)...done.</div>
<div>Loaded symbols for /lib/libnss_nis.so.2</div><div>Reading symbols from /lib/libnss_files.so.2...(no debugging symbols found)...done.</div><div>Loaded symbols for /lib/libnss_files.so.2</div><div>Reading symbols from /lib/libnss_dns.so.2...(no debugging symbols found)...done.</div>
<div>Loaded symbols for /lib/libnss_dns.so.2</div><div>Reading symbols from /lib/libresolv.so.2...(no debugging symbols found)...done.</div><div>Loaded symbols for /lib/libresolv.so.2</div><div>Core was generated by `/usr/sbin/syslog-ng -p /var/run/syslog-ng.pid --no-caps --enable-core'.</div>
<div>Program terminated with signal 11, Segmentation fault.</div><div>#0 0x00007fd8440c4e9d in ?? () from /lib/libpcre.so.3</div><div>(gdb) thread apply all bt full</div><div><br></div><div>Thread 1 (Thread 14680):</div>
<div>#0 0x00007fd8440c4e9d in ?? () from /lib/libpcre.so.3</div><div>No symbol table info available.</div><div>Cannot access memory at address 0x7fff4a4e3fd8</div><div>(gdb) </div></div></div><div><br></div><div><br></div>
<div><br></div><div>If it is in anyway helpful, I think the only usage of PCRE in my syslog-ng.conf is a rewrite rule to change the Unicode character separator line to a new line: subst("\\p{Zl}", "\n", value("MESSAGE") type("pcre") flags("utf8" "global")); Is it related to my problem in some way?</div>
</div></div>