I had done a 'make clean' before, but I think I found the problem when looking through the config parameters.

Instead of my config file, I used the example one and it didn't segfault. I narrowed it down to the 'destination' parameters which seem to need a variable like ($HOST or $FACILITY) in the destination file (havent tried this version with other destinations than files).

In my config I had destination path names like '/var/log/tcp.log'. When I changed that to '/var/log/$HOST_tcp.log' it didn't die anymore. Can you reproduce this behaviour? Apparently It doesn't matter where a variable is present on each line, but it needs one on every destination.

I proceeded with testing the SIGHUP problem and as far as I can see your patch works perfectly. I tested as I had done before and there was no loss of logs. I even stress tested a bit by sending 10 HUP's per second while syslog-ng received five million rows (@25000 rows/sec) from another server. Everything still worked fine :)

Thanks for your help on this!


// Martin


On Dec 3, 2007 7:09 PM, Balazs Scheidler <bazsi@balabit.hu> wrote:

On Mon, 2007-12-03 at 18:58 +0100, Martin Ervius wrote:
> Here is the backtrace, (running under ubuntu 7.10 i386):
>
> root@krait[0]syslog-ng-2.0.git# /opt/syslog- ng-2.0.git/sbin/syslog-ng
> Segmentation fault (core dumped)
> root@krait[139]syslog-ng-2.0.git# gdb /opt/syslog-
> ng-2.0.git/sbin/syslog-ng -c core
> GNU gdb 6.6-debian
> Copyright (C) 2006 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and
> you are
> welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for
> details.
> This GDB was configured as "i486-linux-gnu"...
> Using host libthread_db library
> "/lib/tls/i686/cmov/libthread_db.so.1".
>
> warning: Can't read pathname for load map: Input/output error.
> Reading symbols from /lib/tls/i686/cmov/libnsl.so.1...done.
> Loaded symbols for /lib/tls/i686/cmov/libnsl.so.1
> Reading symbols from /lib/tls/i686/cmov/librt.so.1...done.
> Loaded symbols for /lib/tls/i686/cmov/librt.so.1
> Reading symbols from /lib/tls/i686/cmov/libc.so.6...done.
> Loaded symbols for /lib/tls/i686/cmov/libc.so.6
> Reading symbols from /lib/tls/i686/cmov/libpthread.so.0...done.
> Loaded symbols for /lib/tls/i686/cmov/libpthread.so.0
> Reading symbols from /lib/ld-linux.so.2...done.
> Loaded symbols for /lib/ld-linux.so.2
> Reading symbols from /lib/tls/i686/cmov/libnss_compat.so.2...done.
> Loaded symbols for /lib/tls/i686/cmov/libnss_compat.so.2
> Reading symbols from /lib/tls/i686/cmov/libnss_nis.so.2...done.
> Loaded symbols for /lib/tls/i686/cmov/libnss_nis.so.2
> Reading symbols from /lib/tls/i686/cmov/libnss_files.so.2...done.
> Loaded symbols for /lib/tls/i686/cmov/libnss_files.so.2
> Core was generated by `/opt/syslog-ng-2.0.git/sbin/syslog-ng'.
> Program terminated with signal 11, Segmentation fault.
> #0  0x08057bd5 in affile_dw_set_owner (self=0x0, owner=0x8098858) at
> affile.c:381
> 381       if (self->owner)
> (gdb) bt full
> #0  0x08057bd5 in affile_dw_set_owner (self=0x0, owner=0x8098858) at
> affile.c:381
> No locals.

Hmm... I encountered a similar error in my tree when I forgot to "make
clean" before recompiling. Can you check if you do a make clean and then
recompile the above problem goes away?

I also have Ubuntu 7.10 installed and it works for me:

bazsi@bzorp:~/zwa/work/syslog- ng-2.0/syslog-ng$ git-rev-list --max-count=1 HEAD
a33ee30c1e059c1c6dc9839047379f3f3a8dfa4d
bazsi@bzorp:~/.zwa/install/syslog-ng-2.0$ sbin/syslog-ng -Fedvf etc/syslog-ng.conf
Connection failed; error='No such file or directory (2)'
Initiating connection failed, reconnecting; time_reopen='5'
syslog-ng starting up; version='2.0.6'
Termination requested via signal, terminating;
syslog-ng shutting down; version='2.0.6'
Closing log reader fd; fd='7'
Error saving persistent configuration file; name='/home/bazsi/zwa/install/syslog-ng-2.0/var/syslog-ng.persist'
Closing log reader fd; fd='5'
Closing log reader fd; fd='4'


--
Bazsi

_______________________________________________
syslog-ng maillist  -  syslog-ng@lists.balabit.hu
https://lists.balabit.hu/mailman/listinfo/syslog-ng
Frequently asked questions at http://www.campin.net/syslog-ng/faq.html