[syslog-ng] syslog-ng 1.9.5 segfaults on many platforms

Roberto Nibali ratz at drugphish.ch
Sat Aug 20 10:38:49 CEST 2005


Hello,

Maybe you can also bt the core file in after setting ulimit -c unlimited 
and getting a core file. If possible, also ltrace it.

> [skaven at i-bragi1 ~/work/vtec/etc]$ strace syslog-ng -s -f syslog-ng.conf 
> execve("/usr/local/sbin/syslog-ng", ["syslog-ng", "-s", "-f", "syslog-ng.conf"], [/* 57 vars */]) = 0
> uname({sys="Linux", node="i-bragi1", ...}) = 0
> brk(0)                                  = 0x546000
> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2a95556000
> access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
> open("/tool/pandora64/.package/gcc-3.4.0/lib64/tls/x86_64/libnsl.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
> stat("/tool/pandora64/.package/gcc-3.4.0/lib64/tls/x86_64", 0x7fbfffe870) = -1 ENOENT (No such file or directory)
> open("/tool/pandora64/.package/gcc-3.4.0/lib64/tls/libnsl.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
> stat("/tool/pandora64/.package/gcc-3.4.0/lib64/tls", 0x7fbfffe870) = -1 ENOENT (No such file or directory)
> open("/tool/pandora64/.package/gcc-3.4.0/lib64/x86_64/libnsl.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
> stat("/tool/pandora64/.package/gcc-3.4.0/lib64/x86_64", 0x7fbfffe870) = -1 ENOENT (No such file or directory)
> open("/tool/pandora64/.package/gcc-3.4.0/lib64/libnsl.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
> stat("/tool/pandora64/.package/gcc-3.4.0/lib64", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0

Did you build your own toolchain? Where does this gcc come from? However 
you don't seem to be using it.

> open("/etc/ld.so.cache", O_RDONLY)      = 3
> fstat(3, {st_mode=S_IFREG|0644, st_size=176999, ...}) = 0
> mmap(NULL, 176999, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2a95557000
> close(3)                                = 0
> open("/lib64/libnsl.so.1", O_RDONLY)    = 3
> read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`G\300\r"..., 640) = 640
> fstat(3, {st_mode=S_IFREG|0755, st_size=107367, ...}) = 0
> mmap(0x3e0dc00000, 1141480, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x3e0dc00000
> mprotect(0x3e0dc13000, 1063656, PROT_NONE) = 0
> mmap(0x3e0dd13000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13000) = 0x3e0dd13000
> mmap(0x3e0dd15000, 6888, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x3e0dd15000
> close(3)                                = 0
> open("/tool/pandora64/.package/gcc-3.4.0/lib64/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
> open("/lib64/tls/libc.so.6", O_RDONLY)  = 3
> read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`\305\261"..., 640) = 640
> lseek(3, 624, SEEK_SET)                 = 624
> read(3, "\4\0\0\0\20\0\0\0\1\0\0\0GNU\0\0\0\0\0\2\0\0\0\4\0\0\0"..., 32) = 32
> fstat(3, {st_mode=S_IFREG|0755, st_size=1490956, ...}) = 0
> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2a95583000
> mmap(0x3e07b00000, 2305992, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x3e07b00000
> mprotect(0x3e07c29000, 1089480, PROT_NONE) = 0
> mmap(0x3e07d29000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x129000) = 0x3e07d29000
> mmap(0x3e07d2f000, 16328, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x3e07d2f000
> close(3)                                = 0
> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2a95584000
> mprotect(0x3e07d29000, 12288, PROT_READ) = 0
> arch_prctl(0x1002, 0x2a955842c0)        = 0
> munmap(0x2a95557000, 176999)            = 0
> brk(0)                                  = 0x546000
> brk(0x567000)                           = 0x567000
> open("/etc/localtime", O_RDONLY)        = 3
> fstat(3, {st_mode=S_IFREG|0644, st_size=1279, ...}) = 0
> fstat(3, {st_mode=S_IFREG|0644, st_size=1279, ...}) = 0
> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2a95557000
> read(3, "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\0\5\0"..., 4096) = 1279
> close(3)                                = 0
> munmap(0x2a95557000, 4096)              = 0
> rt_sigaction(SIGPIPE, {SIG_IGN}, NULL, 8) = 0
> rt_sigaction(SIGHUP, {0x4034d0, [], 0x4000000}, NULL, 8) = 0
> rt_sigaction(SIGTERM, {0x4034e0, [], 0x4000000}, NULL, 8) = 0
> rt_sigaction(SIGINT, {0x4034e0, [], 0x4000000}, NULL, 8) = 0
> rt_sigaction(SIGCHLD, {0x403510, [], 0x4000000}, NULL, 8) = 0
> rt_sigaction(SIGSEGV, {0x4034f0, [], SA_ONESHOT|0x4000000}, NULL, 8) = 0
> open("/etc/eventlog.conf", O_RDONLY)    = -1 ENOENT (No such file or directory)
> open("syslog-ng.conf", O_RDONLY)        = 3
> ioctl(3, SNDCTL_TMR_TIMEBASE, 0x7fbfffef10) = -1 ENOTTY (Inappropriate ioctl for device)

Something with your glibc seems to be fishy or I'm misinterpreting this 
line. I don't see how an ioctl call on SNDCTL_TMR_TIMEBASE can be of any 
use to syslog-ng.

> fstat(3, {st_mode=S_IFREG|0644, st_size=2867, ...}) = 0
> mmap(NULL, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2a95557000
> read(3, "# OPTIONS\n# See http://www.balab"..., 32768) = 2867
> read(3, "", 32768)                      = 0
> socket(PF_UNIX, SOCK_STREAM, 0)         = 4
> fcntl(4, F_GETFL)                       = 0x2 (flags O_RDWR|O_LARGEFILE)
> fcntl(4, F_SETFL, O_RDWR|O_NONBLOCK)    = 0
> connect(4, {sa_family=AF_UNIX, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
> close(4)                                = 0
> socket(PF_UNIX, SOCK_STREAM, 0)         = 4
> fcntl(4, F_GETFL)                       = 0x2 (flags O_RDWR|O_LARGEFILE)
> fcntl(4, F_SETFL, O_RDWR|O_NONBLOCK)    = 0
> connect(4, {sa_family=AF_UNIX, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
> close(4)                                = 0
> open("/etc/nsswitch.conf", O_RDONLY)    = 4
> fstat(4, {st_mode=S_IFREG|0644, st_size=396, ...}) = 0
> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2a9555f000
> read(4, "passwd:         files nis\nshadow"..., 4096) = 396
> read(4, "", 4096)                       = 0
> close(4)                                = 0
> munmap(0x2a9555f000, 4096)              = 0
> open("/tool/pandora64/.package/gcc-3.4.0/lib64/libnss_files.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
> open("/etc/ld.so.cache", O_RDONLY)      = 4
> fstat(4, {st_mode=S_IFREG|0644, st_size=176999, ...}) = 0
> mmap(NULL, 176999, PROT_READ, MAP_PRIVATE, 4, 0) = 0x2a95585000
> close(4)                                = 0
> open("/lib64/libnss_files.so.2", O_RDONLY) = 4

The resolver part. I wonder if it's crashing here?

> read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@\"\0\0\0"..., 640) = 640
> fstat(4, {st_mode=S_IFREG|0755, st_size=56807, ...}) = 0
> mmap(NULL, 1094952, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x2a955b1000
> mprotect(0x2a955bb000, 1053992, PROT_NONE) = 0
> mmap(0x2a956bb000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0xa000) = 0x2a956bb000
> close(4)                                = 0
> munmap(0x2a95585000, 176999)            = 0
> open("/etc/passwd", O_RDONLY)           = 4
> fcntl(4, F_GETFD)                       = 0
> fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
> fstat(4, {st_mode=S_IFREG|0644, st_size=2477, ...}) = 0
> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2a95585000
> read(4, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 2477
> close(4)                                = 0
> munmap(0x2a95585000, 4096)              = 0
> socket(PF_UNIX, SOCK_STREAM, 0)         = 4
> fcntl(4, F_GETFL)                       = 0x2 (flags O_RDWR|O_LARGEFILE)
> fcntl(4, F_SETFL, O_RDWR|O_NONBLOCK)    = 0
> connect(4, {sa_family=AF_UNIX, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
> close(4)                                = 0
> socket(PF_UNIX, SOCK_STREAM, 0)         = 4
> fcntl(4, F_GETFL)                       = 0x2 (flags O_RDWR|O_LARGEFILE)
> fcntl(4, F_SETFL, O_RDWR|O_NONBLOCK)    = 0
> connect(4, {sa_family=AF_UNIX, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
> close(4)                                = 0
> open("/etc/group", O_RDONLY)            = 4
> fcntl(4, F_GETFD)                       = 0
> fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
> fstat(4, {st_mode=S_IFREG|0644, st_size=801, ...}) = 0
> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2a95585000
> read(4, "root:x:0:root\nbin:x:1:root,bin,d"..., 4096) = 801
> close(4)                                = 0
> munmap(0x2a95585000, 4096)              = 0
> open("/etc/passwd", O_RDONLY)           = 4
> fcntl(4, F_GETFD)                       = 0
> fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
> fstat(4, {st_mode=S_IFREG|0644, st_size=2477, ...}) = 0
> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2a95585000
> read(4, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 2477
> close(4)                                = 0
> munmap(0x2a95585000, 4096)              = 0
> open("/etc/group", O_RDONLY)            = 4
> fcntl(4, F_GETFD)                       = 0
> fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
> fstat(4, {st_mode=S_IFREG|0644, st_size=801, ...}) = 0
> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2a95585000
> read(4, "root:x:0:root\nbin:x:1:root,bin,d"..., 4096) = 801
> close(4)                                = 0
> munmap(0x2a95585000, 4096)              = 0
> open("/etc/passwd", O_RDONLY)           = 4
> fcntl(4, F_GETFD)                       = 0
> fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
> fstat(4, {st_mode=S_IFREG|0644, st_size=2477, ...}) = 0
> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2a95585000
> read(4, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 2477
> close(4)                                = 0
> munmap(0x2a95585000, 4096)              = 0
> open("/etc/group", O_RDONLY)            = 4
> fcntl(4, F_GETFD)                       = 0
> fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
> fstat(4, {st_mode=S_IFREG|0644, st_size=801, ...}) = 0
> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2a95585000
> read(4, "root:x:0:root\nbin:x:1:root,bin,d"..., 4096) = 801
> close(4)                                = 0
> munmap(0x2a95585000, 4096)              = 0
> open("/etc/passwd", O_RDONLY)           = 4
> fcntl(4, F_GETFD)                       = 0
> fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
> fstat(4, {st_mode=S_IFREG|0644, st_size=2477, ...}) = 0
> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2a95585000
> read(4, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 2477
> close(4)                                = 0
> munmap(0x2a95585000, 4096)              = 0
> open("/etc/group", O_RDONLY)            = 4
> fcntl(4, F_GETFD)                       = 0
> fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
> fstat(4, {st_mode=S_IFREG|0644, st_size=801, ...}) = 0
> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2a95585000
> read(4, "root:x:0:root\nbin:x:1:root,bin,d"..., 4096) = 801
> close(4)                                = 0
> munmap(0x2a95585000, 4096)              = 0
> open("/etc/passwd", O_RDONLY)           = 4
> fcntl(4, F_GETFD)                       = 0
> fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
> fstat(4, {st_mode=S_IFREG|0644, st_size=2477, ...}) = 0
> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2a95585000
> read(4, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 2477
> close(4)                                = 0
> munmap(0x2a95585000, 4096)              = 0
> open("/etc/group", O_RDONLY)            = 4
> fcntl(4, F_GETFD)                       = 0
> fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
> fstat(4, {st_mode=S_IFREG|0644, st_size=801, ...}) = 0
> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2a95585000
> read(4, "root:x:0:root\nbin:x:1:root,bin,d"..., 4096) = 801
> close(4)                                = 0
> munmap(0x2a95585000, 4096)              = 0

strange ... munmap call is correct.

> --- SIGSEGV (Segmentation fault) @ 0 (0) ---
> getpid()                                = 2926
> kill(2926, SIGSEGV)                     = 0
> rt_sigreturn(0xb6e)                     = 155
> --- SIGSEGV (Segmentation fault) @ 0 (0) ---
> +++ killed by SIGSEGV +++

I have to note however, that I've also heard from my developers in-house 
that the new syslog-ng crashes when statically linked. But I need to 
investigate our issue myself next week.

There's not much I can do at that stage. Try to get the backtrace and 
the ltrace output and we might get some more information. Also if you 
could attach the minimal syslog-ng.conf you used for the test.

Regards,
Roberto Nibali, ratz
-- 
echo 
'[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq' | dc


More information about the syslog-ng mailing list