Bug 240936 - sysutils/rsyslog8 dumps core on 11.3-RELEASE-p3
Summary: sysutils/rsyslog8 dumps core on 11.3-RELEASE-p3
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: i386 Any
: --- Affects Only Me
Assignee: Matthew Seaman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-30 10:27 UTC by Luciano Mannucci
Modified: 2019-10-04 06:53 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (matthew)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luciano Mannucci 2019-09-30 10:27:01 UTC
From time to time, rsyslog dumps core with no apparent reason.

The version is the latest one from the pkg collection:

/usr/local/sbin/rsyslogd -v
rsyslogd  8.1905.0 (aka 2019.05) compiled with:
	PLATFORM:				i386-portbld-freebsd11.2
	PLATFORM (lsb_release -d):		
	FEATURE_REGEXP:				Yes
	GSSAPI Kerberos 5 support:		No
	FEATURE_DEBUG (debug build, slow code):	No
	32bit Atomic operations supported:	Yes
	64bit Atomic operations supported:	Yes
	memory allocator:			system default
	Runtime Instrumentation (slow code):	No
	uuid support:				Yes
	systemd support:			No
	Config file:				/usr/local/etc/rsyslog.conf
	PID file:				/var/run/rsyslogd.pid
	Number of Bits in RainerScript integers: 64

gdb says:

root@magnolia:/ # gdb /usr/local/sbin/rsyslogd
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 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-marcel-freebsd"...(no debugging symbols found)...
(gdb) core /rsyslogd.core
Core was generated by `/usr/local/sbin/rsyslogd -i /var/run/syslog.pid -f /usr/local/etc/rsyslog.conf'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libz.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libz.so.6
Reading symbols from /usr/lib/librt.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/librt.so.1
Reading symbols from /usr/local/lib/libestr.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libestr.so.0
Reading symbols from /usr/local/lib/libfastjson.so.4...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libfastjson.so.4
Reading symbols from /usr/local/lib/libuuid.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libuuid.so.1
Reading symbols from /lib/libthr.so.3...(no debugging symbols found)...done.
Loaded symbols for /lib/libthr.so.3
Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /usr/local/lib/rsyslog/lmnet.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/rsyslog/lmnet.so
Reading symbols from /usr/local/lib/rsyslog/immark.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/rsyslog/immark.so
Reading symbols from /usr/local/lib/rsyslog/imuxsock.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/rsyslog/imuxsock.so
Reading symbols from /usr/local/lib/rsyslog/imklog.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/rsyslog/imklog.so
Reading symbols from /usr/local/lib/rsyslog/imudp.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/rsyslog/imudp.so
Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols found)...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x28132e2b in pthread_mutex_destroy () from /lib/libthr.so.3
(gdb) bt
#0  0x28132e2b in pthread_mutex_destroy () from /lib/libthr.so.3
#1  0x28131f34 in pthread_mutex_lock () from /lib/libthr.so.3
#2  0x0809420a in strmQueryInterface ()
#3  0x0805bbdd in modInitFile ()
#4  0x080a65c6 in actionClassInit ()
#5  0x080a4a69 in actionCommitAllDirect ()
#6  0x080a4951 in actionCommitAllDirect ()
#7  0x0809eb78 in rulesetQueryInterface ()
#8  0x08054ca3 in createMainQueue ()
#9  0x0809ae69 in qqueueStart ()
#10 0x08097a5b in wtiWorker ()
#11 0x08096fa3 in wtpClassInit ()
#12 0x2812b28b in pthread_create () from /lib/libthr.so.3
#13 0x00000000 in ?? ()

The configuration is nothing to write home about:

/usr/local/etc/rsyslog.conf
$ModLoad immark
$ModLoad imuxsock
$ModLoad imklog
$ModLoad imudp
$UDPServeraddress	212.45.146.14
$UDPServerRun 514

template(name="DynAmiX" type="string"
string="/var/log/logretention/%$year%%$month%%$day%%$hour%%$minute%/%hostname%/logretention.log"
	)
:source, !contains, "magnolia" ?DynAmiX
:source, !contains, "magnolia" stop

*.err;kern.warning;auth.notice;mail.crit		/dev/console
*.notice;authpriv.none;kern.debug;lpr.info;mail.crit;news.err	/var/log/messages
security.*					/var/log/security
auth.info;authpriv.info				?DynAmiX
auth.info;authpriv.info				/var/log/auth.log
mail.info					/var/log/maillog
lpr.info					/var/log/lpd-errs
ftp.info					/var/log/xferlog
cron.*						/var/log/cron
*.debug						/var/log/debug.log
*.emerg						:omusrmsg:root
Comment 1 Matthew Seaman freebsd_committer 2019-09-30 14:04:47 UTC
(In reply to Luciano Mannucci from comment #0)

Thank you very much for the report.  Is there any chance you can get a back trace with debugging symbols loaded?  That would be very helpful in tracking down exactly what has gone wrong here.
Comment 2 Luciano Mannucci 2019-09-30 14:32:34 UTC
(In reply to Matthew Seaman from comment #1)
I suppose I can recompile it from the ports. I've not found where I can
enable the DEBUG option, though.
Comment 3 Matthew Seaman freebsd_committer 2019-09-30 20:25:51 UTC
(In reply to Luciano Mannucci from comment #2)

Add:

WITH_DEBUG_PORTS= sysutils/rsyslog8

to /etc/make.conf -- that should do the trick.
Comment 4 Luciano Mannucci 2019-10-01 16:40:38 UTC
It doesn't seem to make any difference.
After a

make build && make deinstall && make install clean 

I still get:

/usr/local/sbin/rsyslogd -v
rsyslogd  8.1908.0 (aka 2019.08) compiled with:
	PLATFORM:				i386-portbld-freebsd11.3
	PLATFORM (lsb_release -d):		
	FEATURE_REGEXP:				Yes
	GSSAPI Kerberos 5 support:		No
	FEATURE_DEBUG (debug build, slow code):	No
	32bit Atomic operations supported:	Yes
	64bit Atomic operations supported:	Yes
	memory allocator:			system default
	Runtime Instrumentation (slow code):	No
	uuid support:				Yes
	systemd support:			No
	Config file:				/usr/local/etc/rsyslog.conf
	PID file:				/var/run/rsyslogd.pid
	Number of Bits in RainerScript integers: 64

See https://www.rsyslog.com for more information.
Comment 5 Matthew Seaman freebsd_committer 2019-10-04 06:53:25 UTC
Hi, Luciano

Please can you try the updated version 8.1910.0 I just committed.  It's not clear from the change log, but there are some crash-bug fixes there and they might just be addressing the same issue you're been seeing.

   Matthew