Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 695176 - app-admin/syslog-ng-3.23.1 - daemon crashes with SIGABRT
Summary: app-admin/syslog-ng-3.23.1 - daemon crashes with SIGABRT
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Tomáš Mózes
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2019-09-20 09:10 UTC by Peter Gantner (a.k.a. nephros)
Modified: 2019-09-20 16:22 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge.info (emerge.info,9.15 KB, application/x-info)
2019-09-20 09:56 UTC, Peter Gantner (a.k.a. nephros)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Gantner (a.k.a. nephros) 2019-09-20 09:10:23 UTC
Since updating to current stable syslog-ng, the daemon regularly crashes with SIGABRT, and gets restarted by the supervisor.

If running in the foreground with:

 /usr/sbin/syslog-ng -F --cfgfile /etc/syslog-ng/syslog-ng.conf --control /run/syslog-ng.ctl --persist-file /var/lib/syslog-ng/syslog-ng.persist --pidfile /run/syslog-ng.pid

This is stderr:

ERROR:lib/window-size-counter.c:76:window_size_counter_sub: assertion failed: (old_value >= value)

The same can be observed when stracing the supervised daemon.

This happens in both current stable version 3.22.1, and unstable 3.23.1.
Comment 1 Peter Gantner (a.k.a. nephros) 2019-09-20 09:13:42 UTC
strace output:

gdb /usr/sbin/syslog-ng
GNU gdb (Gentoo 8.3 vanilla) 8.3
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/sbin/syslog-ng...
(No debugging symbols found in /usr/sbin/syslog-ng)
(gdb) run -F --cfgfile /etc/syslog-ng/syslog-ng.conf --control /run/syslog-ng.ctl --persist-file /var/lib/syslog-ng/syslog-ng.persist --pidfile /run/syslog-ng.pid -e
Starting program: /usr/sbin/syslog-ng -F --cfgfile /etc/syslog-ng/syslog-ng.conf --control /run/syslog-ng.ctl --persist-file /var/lib/syslog-ng/syslog-ng.persist --pidfile /run/syslog-ng.pid -e
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
[2019-09-20T11:11:59.304053] Accepting connections; addr='AF_UNIX(/dev/log)'
[2019-09-20T11:11:59.304132] Accepting connections; addr='AF_UNIX(/chroot/dns/dev/log)'
[2019-09-20T11:11:59.304165] Accepting connections; addr='AF_UNIX(/chroot/dhcp/dev/log)'
[2019-09-20T11:11:59.304462] syslog-ng starting up; version='3.23.1'
[New Thread 0xf744fb40 (LWP 12252)]
[New Thread 0xf6affb40 (LWP 12253)]
[Thread 0xf744fb40 (LWP 12252) exited]
[Thread 0xf6affb40 (LWP 12253) exited]
[New Thread 0xf6affb40 (LWP 12567)]
[Thread 0xf6affb40 (LWP 12567) exited]
[New Thread 0xf6affb40 (LWP 12596)]
**
ERROR:lib/window-size-counter.c:76:window_size_counter_sub: assertion failed: (old_value >= value)

Thread 1 "syslog-ng" received signal SIGABRT, Aborted.
0xf7fd2b69 in __kernel_vsyscall ()
(gdb) backtrace
#0  0xf7fd2b69 in __kernel_vsyscall ()
#1  0xf7bb4c3a in raise () from /lib/libc.so.6
#2  0xf7b9d2b6 in abort () from /lib/libc.so.6
#3  0xf7dacdb4 in ?? () from /usr/lib/libglib-2.0.so.0
#4  0xf7e07d3c in g_assertion_message_expr () from /usr/lib/libglib-2.0.so.0
#5  0xf7f16b18 in window_size_counter_sub () from /usr/lib/libsyslog-ng-3.23.so.0
#6  0xf7f03b24 in log_source_free () from /usr/lib/libsyslog-ng-3.23.so.0
#7  0xf7f02716 in ?? () from /usr/lib/libsyslog-ng-3.23.so.0
#8  0xf7f00fad in log_pipe_unref () from /usr/lib/libsyslog-ng-3.23.so.0
#9  0xf7ae8300 in ?? () from /usr/lib/libivykis.so.0
#10 0xf7ae709a in ?? () from /usr/lib/libivykis.so.0
#11 0xf7ae71b6 in ?? () from /usr/lib/libivykis.so.0
#12 0xf7aed15d in ?? () from /usr/lib/libivykis.so.0
#13 0xf7ae9377 in ?? () from /usr/lib/libivykis.so.0
#14 0xf7aea895 in iv_main () from /usr/lib/libivykis.so.0
#15 0xf7f0a5c5 in main_loop_run () from /usr/lib/libsyslog-ng-3.23.so.0
#16 0x565564f9 in main ()
Comment 2 Peter Gantner (a.k.a. nephros) 2019-09-20 09:24:40 UTC
backtrace with debugging info:

**
ERROR:lib/window-size-counter.c:76:window_size_counter_sub: assertion failed: (old_value >= value)

Thread 1 "syslog-ng" received signal SIGABRT, Aborted.
0xf7fd2b69 in __kernel_vsyscall ()
(gdb) backtrace
#0  0xf7fd2b69 in __kernel_vsyscall ()
#1  0xf7bb4c3a in raise () from /lib/libc.so.6
#2  0xf7b9d2b6 in abort () from /lib/libc.so.6
#3  0xf7dacdb4 in ?? () from /usr/lib/libglib-2.0.so.0
#4  0xf7e07d3c in g_assertion_message_expr () from /usr/lib/libglib-2.0.so.0
#5  0xf7f16b18 in window_size_counter_sub (c=0x5658a1dc, value=4294967196, suspended=0x0) at lib/window-size-counter.c:76
#6  0xf7f03b24 in _release_dynamic_window (self=0x5658a180) at lib/logsource.c:235
#7  log_source_free (s=0x5658a180) at lib/logsource.c:699
#8  0xf7f02716 in log_reader_free (s=0x5658a180) at lib/logreader.c:647
#9  0xf7f00fad in _free (self=0x5658a180) at lib/logpipe.c:99
#10 log_pipe_unref (self=0x5658a180) at lib/logpipe.c:112
#11 0xf7ae8300 in ?? () from /usr/lib/libivykis.so.0
#12 0xf7ae709a in ?? () from /usr/lib/libivykis.so.0
#13 0xf7ae71b6 in ?? () from /usr/lib/libivykis.so.0
#14 0xf7aed15d in ?? () from /usr/lib/libivykis.so.0
#15 0xf7ae9377 in ?? () from /usr/lib/libivykis.so.0
#16 0xf7aea895 in iv_main () from /usr/lib/libivykis.so.0
#17 0xf7f0a5c5 in main_loop_run (self=0xf7fa35e0 <main_loop>) at lib/mainloop.c:659
#18 0x565564f9 in main ()
(gdb)
Comment 3 Peter Gantner (a.k.a. nephros) 2019-09-20 09:30:54 UTC
Upstream bug, apparently fixed in upcoming release 3.24:

https://github.com/syslog-ng/syslog-ng/issues/2893
Comment 4 Tomáš Mózes 2019-09-20 09:47:37 UTC
Please attach your emerge --info output. Does the upstream patch fix your issue?
Comment 5 Peter Gantner (a.k.a. nephros) 2019-09-20 09:56:25 UTC
Created attachment 590400 [details]
emerge.info

emerge --info
Comment 6 Peter Gantner (a.k.a. nephros) 2019-09-20 09:59:07 UTC
(In reply to Tomáš Mózes from comment #4)
> Please attach your emerge --info output. Does the upstream patch fix your
> issue?

It appears that it does. No crashes for about 30 minutes now, whereas affected version crashed every couple of seconds.
Comment 7 Tomáš Mózes 2019-09-20 11:14:31 UTC
This is the patch you used?

https://github.com/syslog-ng/syslog-ng/commit/e350607f27b78094fb72422faf5394384ae6193b
Comment 8 Peter Gantner (a.k.a. nephros) 2019-09-20 11:21:38 UTC
(In reply to Tomáš Mózes from comment #7)
> This is the patch you used?
> 
> https://github.com/syslog-ng/syslog-ng/commit/
> e350607f27b78094fb72422faf5394384ae6193b

no, I used the full patch from the pull request 2895, which is similar but adds a check for dynamic_window_is_enabled as well:

https://patch-diff.githubusercontent.com/raw/syslog-ng/syslog-ng/pull/2895.diff
a.k.a.
https://github.com/syslog-ng/syslog-ng/commit/7706d808523836e7011066ee643278217ffd92a0.diff
Comment 9 Larry the Git Cow gentoo-dev 2019-09-20 16:18:10 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1096ec7003531d803fc88fe60abc4f6e6368dffa

commit 1096ec7003531d803fc88fe60abc4f6e6368dffa
Author:     Tomas Mozes <hydrapolic@gmail.com>
AuthorDate: 2019-09-20 13:10:20 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2019-09-20 15:42:39 +0000

    app-admin/syslog-ng: fix daemon crashes on x86
    
    Signed-off-by: Tomáš Mózes <hydrapolic@gmail.com>
    Closes: https://bugs.gentoo.org/695176
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 .../patches/syslog-ng-3.23.1-fix-sigabrt.patch     | 72 ++++++++++++++++++++++
 ...ng-3.23.1.ebuild => syslog-ng-3.23.1-r1.ebuild} |  3 +
 2 files changed, 75 insertions(+)
Comment 10 Tomáš Mózes 2019-09-20 16:22:47 UTC
Thanks Peter for your cooperation and Joonas for the quick merge.