[syslog-ng]syslog-ng 1.5.16 released
Jerome Peducasse
peducasse@echo.fr
Thu, 25 Apr 2002 15:56:29 +0200
Hi,
I'm trying syslog-ng 1.5.16 and syslog-ng daemon SEGFAULT when it receive the first message after I send to it a SIGHUP.
For example:
I launch syslog-ng and I strace it. I send "killall -HUP syslog-ng":
write(11, "Apr 25 15:30:47 peducasse syslog-ng[29374]: new configuration initialized\n", 74) = 74
fsync(11) = 0
write(10, "Apr 25 15:30:47 peducasse [syslog.notice] syslog-ng syslog-ng[29374]: new configuration initialized\n", 100) = 100
getsockopt(9, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
fcntl(9, F_GETFL) = 0x802 (flags O_RDWR|O_NONBLOCK)
fcntl(9, F_SETFL, O_RDWR|O_NONBLOCK) = 0
fcntl(9, F_SETFD, FD_CLOEXEC) = 0
getsockopt(7, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
fcntl(7, F_GETFL) = 0x802 (flags O_RDWR|O_NONBLOCK)
fcntl(7, F_SETFL, O_RDWR|O_NONBLOCK) = 0
fcntl(7, F_SETFD, FD_CLOEXEC) = 0
time(NULL) = 1019741447
poll([{fd=7, events=0}, {fd=9, events=0}, {fd=11, events=0}, {fd=10, events=0}, {fd=3, events=POLLIN}], 5, 100) = 0
poll(
I send "logger -psyslog.info test":
[{fd=7, events=0}, {fd=9, events=0}, {fd=11, events=0}, {fd=10, events=0}, {fd=3, events=POLLIN, revents=POLLIN}], 5, 59000) = 1
read(3, "<134>Apr 25 15:31:01 jerome: test", 2048) = 33
time(NULL) = 1019741461
--- SIGSEGV (Segmentation fault) ---
[root@peducasse log]# gdb /usr/local/sbin/syslog-ng core
GNU gdb 19991004
Copyright 1998 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 "i386-redhat-linux"...
Core was generated by `/usr/local/sbin/syslog-ng'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libnsl.so.1...done.
Reading symbols from /lib/libc.so.6...done.
Reading symbols from /lib/ld-linux.so.2...done.
Reading symbols from /lib/libnss_files.so.2...done.
Reading symbols from /lib/libnss_nisplus.so.2...done.
Reading symbols from /lib/libnss_nis.so.2...done.
Reading symbols from /lib/libnss_dns.so.2...done.
Reading symbols from /lib/libresolv.so.2...done.
#0 0x4008a709 in chunk_alloc (ar_ptr=0x4011fd60, nb=32) at malloc.c:2763
2763 malloc.c: No such file or directory.
(gdb) bt
#0 0x4008a709 in chunk_alloc (ar_ptr=0x4011fd60, nb=32) at malloc.c:2763
#1 0x4008a5ce in __libc_malloc (bytes=27) at malloc.c:2696
#2 0x80532fe in xalloc ()
#3 0x8053424 in ol_string_alloc ()
#4 0x80513ba in c_format_cstring ()
#5 0x804b685 in parse_log_msg (lm=0x8068318, length=33, data=0x806b094 "<134>Apr 25 15:31:01 jerome: test", prefix=0x0) at log.c:99
#6 0x804b9e5 in make_log_info (length=33, msg=0x806b094 "<134>Apr 25 15:31:01 jerome: test", prefix=0x0) at log.c:263
#7 0x804a3da in do_handle_line (self=0x806b078, length=33, data=0x806b094 "<134>Apr 25 15:31:01 jerome: test", addr=0x0, addrlen=0) at sources.c:65
#8 0x804a536 in do_read_line (h=0x8068d28, read=0xbffff98c) at sources.c:107
#9 0x8051aa7 in read_callback ()
#10 0x8051842 in io_iter ()
#11 0x8049dda in main_loop (backend=0x805af70) at main.c:228
#12 0x804a360 in main (argc=1, argv=0xbffffb64) at main.c:498
(gdb)
If I start syslog-ng with -d option, as soon as I send SIGHUP signal, syslog-ng dies with "Too many open files in system". Strace output is:
open("/var/log/all.log", O_WRONLY|O_NONBLOCK|O_APPEND|O_CREAT|O_NOCTTY, 0640) = 10
chown("/var/log/all.log", 0, 3) = 0
chmod("/var/log/all.log", 0640) = 0
fcntl(10, F_GETFL) = 0xc01 (flags O_WRONLY|O_NONBLOCK|O_APPEND)
fcntl(10, F_SETFL, O_WRONLY|O_NONBLOCK|O_APPEND) = 0
fcntl(10, F_SETFD, FD_CLOEXEC) = 0
getpid() = 29445
time(NULL) = 1019741929
open("/var/log/syslog.debug", O_WRONLY|O_NONBLOCK|O_APPEND|O_CREAT|O_NOCTTY, 0600) = 11
chown("/var/log/syslog.debug", 0, 0) = 0
chmod("/var/log/syslog.debug", 0600) = 0
fcntl(11, F_GETFL) = 0xc01 (flags O_WRONLY|O_NONBLOCK|O_APPEND)
fcntl(11, F_SETFL, O_WRONLY|O_NONBLOCK|O_APPEND) = 0
fcntl(11, F_SETFD, FD_CLOEXEC) = 0
getpid() = 29445
time(NULL) = 1019741929
...
...
...
open("/var/log/syslog.debug", O_WRONLY|O_NONBLOCK|O_APPEND|O_CREAT|O_NOCTTY, 0600) = 888
chown("/var/log/syslog.debug", 0, 0) = 0
chmod("/var/log/syslog.debug", 0600) = 0
fcntl(888, F_GETFL) = 0xc01 (flags O_WRONLY|O_NONBLOCK|O_APPEND)
fcntl(888, F_SETFL, O_WRONLY|O_NONBLOCK|O_APPEND) = 0
fcntl(888, F_SETFD, FD_CLOEXEC) = 0
getpid() = 29445
time(NULL) = 1019741930
open("/var/log/syslog.debug", O_WRONLY|O_NONBLOCK|O_APPEND|O_CREAT|O_NOCTTY, 0600) = 889
chown("/var/log/syslog.debug", 0, 0) = 0
chmod("/var/log/syslog.debug", 0600) = 0
fcntl(889, F_GETFL) = 0xc01 (flags O_WRONLY|O_NONBLOCK|O_APPEND)
fcntl(889, F_SETFL, O_WRONLY|O_NONBLOCK|O_APPEND) = 0
fcntl(889, F_SETFD, FD_CLOEXEC) = 0
getpid() = 29445
time(NULL) = 1019741930
brk(0x80d2000) = 0x80d2000
open("/var/log/syslog.debug", O_WRONLY|O_NONBLOCK|O_APPEND|O_CREAT|O_NOCTTY, 0600) = -1 ENFILE (Too many open files in system)
chown("/var/log/syslog.debug", 0, 0) = 0
chmod("/var/log/syslog.debug", 0600) = 0
open("/usr/share/locale/locale.alias", O_RDONLY) = -1 ENFILE (Too many open files in system)
open("/usr/share/i18n/locale.alias", O_RDONLY) = -1 ENFILE (Too many open files in system)
open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENFILE (Too many open files in system)
getpid() = 29445
time(NULL) = 1019741930
open("/var/log/syslog.err", O_WRONLY|O_NONBLOCK|O_APPEND|O_CREAT|O_NOCTTY, 0600) = -1 ENFILE (Too many open files in system)
chown("/var/log/syslog.err", 0, 0) = 0
chmod("/var/log/syslog.err", 0600) = 0
getpid() = 29445
time(NULL) = 1019741930
If you want, I can provide you core dumped and entire strace and debug log.
Thanks for any help.
On Fri, Apr 12, 2002 at 12:34:02PM +0200, Balazs Scheidler wrote:
> Hi,
>
> I have released syslog-ng 1.5.16 with the following NEWS entry:
>
> News for the 1.5.16 release
> Fri, 12 Apr 2002 09:42:28 +0200
>
> Changes:
> * added log_prefix support for file sources (for adding 'kernel: '
> prefix to messages from /proc/kmsg)
> * fixed the internal DNS cache, so now it really works
> * fixed localip() and localport() directives for afinet destinations
> (they erroneously changed the destination address)
> * Detect O_LARGEFILE on the system and use it if available
> * Never close fds 0, 1, 2 and, use /dev/null for 0 and 1, and keep 2
> open for messages during reinitialization
> * Added UNIXTIME, R_UNIXTIME, S_UNIXTIME macros to templates and
> filenames
> * Fixed TCP wrapper support.
>
> Our webserver is currently down, but as soon as it comes back up, I'll
> upload this release to the usual place:
>
> http://www.balabit.hu/en/downloads/syslog-ng/
>
> --
> Bazsi
> PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
>
> _______________________________________________
> syslog-ng maillist - syslog-ng@lists.balabit.hu
> https://lists.balabit.hu/mailman/listinfo/syslog-ng
--
Jerome Peducasse
Wanadoo Portails - Sophia Antipolis