The binary resulting from rsyslog-3.21.5 with USE="gnutls kerberos postgres zlib -dbi -debug -mysql -relp -snmp" leads to a segfault if executed with the debuggin option (-d). In normal execution the process blocks and does not go into background (without the -n flag). strace shows the last call to be a wait call. revdep-rebuild shows no broken dependencies. Downgrading to rsyslog-3.21.4 solves the problem. Reproducible: Always Steps to Reproduce: 1. $> echo "app-admin/rsyslog ~amd64" >> /etc/portage/package.keywords 2. $> emerge =rsyslog-3.21.5 [ebuild U ] app-admin/rsyslog-3.21.5 [3.21.4] USE="gnutls kerberos postgres zlib -dbi -debug -mysql -relp -snmp" 2. $> rsyslogd -d Actual Results: After run "rsyslogd -c3" -- the process just blocks (can be canceled with ^C) After run "rsyslogd -d": [...] 5276.630183450:action 1 queue:Reg/w0: module of type 2 being loaded. 5276.630189249:action 1 queue:Reg/w0: source file netstrms.c requested reference for module 'lmnsd_ptcp', reference count now 1 5276.631198661:main queue:Reg/w0: Called action, logging to builtin-fwd 5276.631208621:main queue:Reg/w0: action 2 queue: entry added, size now 1 entries 5276.631214292:main queue:Reg/w0: wtpAdviseMaxWorkers signals busy 5276.631220704:main queue:Reg/w0: action 2 queue: EnqueueMsg advised worker start Segmentation fault After running "strace rsyslogd -c3" [...] clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f4de512e780) = 32516 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 nanosleep({300, 0}, 0x7fffed13b340) = ? ERESTART_RESTARTBLOCK (To be restarted) --- SIGCHLD (Child exited) @ 0 (0) --- restart_syscall(<... resuming interrupted call ...> After "strace rsyslogd -d" [...] 5548.656748347:action 2 queue:Reg/w0: data.g4t3.lan 5548.656755617:action 2 queue:Reg/w0: source file netstrms.c requested reference for module 'lmnsd_ptcp', reference count now 2 5548.657494600:action 1 queue:Reg/w0: audit.g4t3.lan:10514/tcp 5548.657673556:action 1 queue:Reg/w0: TCP sent 79 bytes, requested 79 ) = 1 +++ killed by SIGSEGV +++ Expected Results: After running "rsyslogd -c3" the process should startup and go into background.
emerge --info Portage 2.1.4.4 (default/linux/amd64/2008.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.25-gentoo-r7 x86_64) ================================================================= System uname: 2.6.25-gentoo-r7 x86_64 Quad-Core AMD Opteron(tm) Processor 2350 Timestamp of tree: Wed, 08 Oct 2008 09:16:01 +0000 app-shells/bash: 3.2_p33 dev-lang/python: 2.4.4-r13, 2.5.2-r7 dev-python/pycrypto: 2.0.1-r6 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.61-r2 sys-devel/automake: 1.7.9-r1, 1.10.1-r1 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.23-r3 ABI="amd64" ACCEPT_KEYWORDS="amd64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ARCH="amd64" ASFLAGS_x86="--32" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CDEFINE_amd64="__x86_64__" CDEFINE_x86="__i386__" CFLAGS="-march=opteron -O2 -pipe" CFLAGS_x86="-m32" CHOST="x86_64-pc-linux-gnu" CHOST_amd64="x86_64-pc-linux-gnu" CHOST_x86="i686-pc-linux-gnu" CLEAN_DELAY="5" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d" CVS_RSH="ssh" CXXFLAGS="-march=opteron -O2 -pipe" DEFAULT_ABI="amd64" DISTDIR="/usr/portage/distfiles" EDITOR="/bin/nano" ELIBC="glibc" EMERGE_DEFAULT_OPTS="--verbose --ask" EMERGE_WARNING_DELAY="10" FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch" FETCHCOMMAND="/usr/bin/wget -t 5 -T 60 --passive-ftp -O ${DISTDIR}/${FILE} ${URI}" GCC_SPECS="" GENTOO_MIRRORS="http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/" HOME="/root" INFOPATH="/usr/share/info:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.18/info:/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.2/info" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LC_ADDRESS="de_DE.utf8" LC_COLLATE="de_DE.utf8" LC_CTYPE="de_DE.utf8" LC_IDENTIFICATION="de_DE.utf8" LC_MEASUREMENT="de_DE.utf8" LC_MESSAGES="en_US.utf8" LC_MONETARY="de_DE.utf8" LC_NAME="de_DE.utf8" LC_NUMERIC="de_DE.utf8" LC_PAPER="de_DE.utf8" LC_TELEPHONE="de_DE.utf8" LC_TIME="de_DE.utf8" LDFLAGS="-Wl,-O1" LDFLAGS_x86="-m elf_i386" LESS="-R -M --shift 5" LESSOPEN="|lesspipe.sh %s" LIBDIR_amd64="lib64" LIBDIR_ppc="lib32" LIBDIR_ppc64="lib64" LIBDIR_x86="lib32" LINGUAS="en" LOGNAME="root" LS_COLORS="no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.pdf=00;32:*.ps=00;32:*.txt=00;32:*.patch=00;32:*.diff=00;32:*.log=00;32:*.tex=00;32:*.doc=00;32:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:" MAIL="/var/mail/root" MAKEOPTS="-j2" MANPATH="/usr/local/share/man:/usr/share/man:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.18/man:/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.2/man" MULTILIB_ABIS="amd64 x86" MULTILIB_STRICT_DENY="64-bit.*shared object" MULTILIB_STRICT_DIRS="/lib32 /lib /usr/lib32 /usr/lib /usr/kde/*/lib32 /usr/kde/*/lib /usr/qt/*/lib32 /usr/qt/*/lib /usr/X11R6/lib32 /usr/X11R6/lib" MULTILIB_STRICT_EXEMPT="(perl5|gcc|gcc-lib|binutils|eclipse-3|debug|portage)" OLDPWD="/root" PAGER="/usr/bin/less" PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.1.2" PKGDIR="/usr/portage/packages" PORTAGE_ARCHLIST="ppc s390 amd64 x86 ppc64 x86-fbsd m68k arm sparc sh mips ia64 alpha hppa sparc-fbsd" PORTAGE_BINHOST_CHUNKSIZE="3000" PORTAGE_BIN_PATH="/usr/lib64/portage/bin" PORTAGE_CONFIGROOT="/" PORTAGE_DEBUG="0" PORTAGE_DEPCACHEDIR="/var/cache/edb/dep" PORTAGE_ELOG_CLASSES="log warn error" PORTAGE_ELOG_MAILFROM="portage@localhost" PORTAGE_ELOG_MAILSUBJECT="[portage] ebuild log for ${PACKAGE} on ${HOST}" PORTAGE_ELOG_MAILURI="root" PORTAGE_ELOG_SYSTEM="save_summary echo" PORTAGE_GID="250" PORTAGE_INST_GID="0" PORTAGE_INST_UID="0" PORTAGE_IUSE="^(3dfx|adabas|alpha|alsa_cards_aoa|alsa_cards_aoa-fabric-layout|alsa_cards_aoa-onyx|alsa_cards_aoa-soundbus|alsa_cards_aoa-soundbus-i2s|alsa_cards_aoa-tas|alsa_cards_aoa-toonie|alsa_cards_armaaci|alsa_cards_at91-soc|alsa_cards_at91-soc-eti-b1-wm8731|alsa_cards_au1x00|alsa_cards_cs5535audio|alsa_cards_harmony|alsa_cards_powermac|alsa_cards_pxa2xx-i2sound|alsa_cards_pxa2xx-soc|alsa_cards_pxa2xx-soc-corgi|alsa_cards_pxa2xx-soc-poodle|alsa_cards_pxa2xx-soc-spitz|alsa_cards_pxa2xx-soc-tosa|alsa_cards_sa11xx-uda1341ts|alsa_cards_sun-amd7930|alsa_cards_sun-cs4231|alsa_cards_sun-dbri|altivec|amd64|aqua|arm|asm|birdstep|bmp|bmpx|bootstrap|build|capslib|clvm|cman|cmucl|coreaudio|crosscompile_opts_.*|dbmaker|doomsday|drac|elibc_.*|elibc_Darwin|elibc_DragonFly|elibc_FreeBSD|elibc_NetBSD|elibc_OpenBSD|elibc_glibc|elibc_uclibc|emf|empress|empress-bcs|esoob|fdftk|filepro|firebird|frontbase|gamess|gcc64|gulm|hppa|ia64|ibm|infopipe|informix|ingres|kernel_.*|kernel_Darwin|kernel_FreeBSD|kernel_linux|lcd_devices_svga|m68k|macbook|mips|multilib|n32|n64|osp|pam_console|pbbuttonsd|pfpro|plugin|ppc|ppc64|ppcsha1|psyco|pvm|real|s390|selinux|sh|solid|sparc|sparc-fbsd|svga|sybase|sybase-ct|tcc|uclibc|ultra1|userland_.*|userland_BSD|userland_Darwin|userland_GNU|video_cards_geode|video_cards_i740|video_cards_impact|video_cards_imstt|video_cards_newport|video_cards_nsc|video_cards_sunbw2|video_cards_suncg14|video_cards_suncg3|video_cards_suncg6|video_cards_sunffb|video_cards_sunleo|video_cards_suntcx|video_cards_vermilion|video_cards_xgi|vidix|vis|win32codecs|x86|x86-fbsd|xmms|yellownet)$" PORTAGE_PYM_PATH="/usr/lib64/portage/pym" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_RSYNC_RETRIES="3" PORTAGE_TMPDIR="/var/tmp" PORTAGE_USE="amd64 elibc_glibc kernel_linux multilib userland_GNU" PORTAGE_WORKDIR_MODE="0700" PORTDIR="/usr/portage" PROFILE_ONLY_VARIABLES="ARCH ELIBC KERNEL USERLAND" PWD="/usr/portage/app-admin/rsyslog" PYTHONPATH="/usr/lib64/portage/pym" RESUMECOMMAND="/usr/bin/wget -c -t 5 -T 60 --passive-ftp -O ${DISTDIR}/${FILE} ${URI}" ROOT="/" ROOTPATH="/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.1.2" RPMDIR="/usr/portage/rpm" SHELL="/bin/bash" SHLVL="1" SSH_CLIENT="10.101.32.2 59416 22" SSH_CONNECTION="10.101.32.2 59416 10.101.32.10 22" SSH_TTY="/dev/pts/0" STAGE1_USE="multilib nptl nptlonly unicode" SYMLINK_LIB="yes" SYNC="rsync://rsync.de.gentoo.org/gentoo-portage" TERM="xterm" USE="3dnow acl amd64 bzip2 cli cracklib crypt cups dri fortran gdbm gnutls gpm iconv isdnlog kerberos ldap midi mmx mmxext mudflap multilib ncurses nls nptl nptlonly openmp pam pcre perl postgres pppd python readline reflection sasl session spl sse sse2 sse4a ssl sysfs tcpd unicode xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="fbdev glint i810 mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo" USER="root" USERLAND="GNU" USE_EXPAND="ALSA_CARDS ALSA_PCM_PLUGINS APACHE2_MODULES APACHE2_MPMS CAMERAS CROSSCOMPILE_OPTS DVB_CARDS ELIBC FCDSL_CARDS FOO2ZJS_DEVICES FRITZCAPI_CARDS INPUT_DEVICES KERNEL LCD_DEVICES LINGUAS LIRC_DEVICES MISDN_CARDS USERLAND VIDEO_CARDS" USE_EXPAND_HIDDEN="CROSSCOMPILE_OPTS ELIBC KERNEL USERLAND" USE_ORDER="env:pkg:conf:defaults:pkginternal:env.d" VIDEO_CARDS="fbdev glint i810 mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo" _="/usr/bin/emerge"
Building with debug enabled failed [ebuild R ] app-admin/rsyslog-3.21.5 USE="debug* gnutls kerberos postgres zlib -dbi -mysql -relp -snmp" [...] x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -pthread -I../../runtime -I../.. -march=opteron -O2 -pipe -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -g -MT imdiag_la-imdiag.lo -MD -MP -MF .deps/imdiag_la-imdiag.Tpo -c imdiag.c -fPIC -DPIC -o .libs/imdiag_la-imdiag.o imdiag.c: In function 'addTcpLstn': imdiag.c:80: warning: comparison between signed and unsigned imdiag.c:83: error: 'pThis' undeclared (first use in this function) imdiag.c:83: error: (Each undeclared identifier is reported only once imdiag.c:83: error: for each function it appears in.) imdiag.c:74: warning: unused parameter 'pUsr' imdiag.c: In function 'initNetstrm': imdiag.c:98: error: 'netstrms' undeclared (first use in this function) imdiag.c:103: error: 'pThis' undeclared (first use in this function) imdiag.c:106: warning: pointer targets in passing argument 4 of 'netstrm.LstnInit' differ in signedness imdiag.c:106: warning: pointer targets in passing argument 5 of 'netstrm.LstnInit' differ in signedness imdiag.c: In function 'afterRun': imdiag.c:136: error: 'i' undeclared (first use in this function) imdiag.c:141: error: 'netstrms' undeclared (first use in this function) imdiag.c: In function 'modInit': imdiag.c:172: error: 'pOurTcpsrv' undeclared (first use in this function) make[2]: *** [imdiag_la-imdiag.lo] Error 1 make[2]: Leaving directory `/var/tmp/portage/app-admin/rsyslog-3.21.5/work/rsyslog-3.21.5/plugins/imdiag' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/app-admin/rsyslog-3.21.5/work/rsyslog-3.21.5' make: *** [all] Error 2
running rsylog in gdb: gdb> run -d [...] [New Thread 0x42726950 (LWP 4915)] 6542.409789452:main thread: main queue: entry added, size now 1 entries 6542.409807955:main thread: wtpAdviseMaxWorkers signals busy 6542.409815004:main thread: main queue: EnqueueMsg advised worker start 6542.409860695:main queue:Reg/w0: main queue: entering rate limiter 6542.409876239:main queue:Reg/w0: main queue: entry deleted, state 0, size now 0 entries 6542.409892059:main queue:Reg/w0: Called action, logging to builtin-fwd 6542.409898923:main queue:Reg/w0: action 1 queue: entry added, size now 1 entries 6542.409907018:main queue:Reg/w0: wtpAdviseMaxWorkers signals busy 6542.409912811:main queue:Reg/w0: action 1 queue: EnqueueMsg advised worker start 6542.409921861:main queue:Reg/w0: Called action, logging to builtin-fwd 6542.409926607:main queue:Reg/w0: action 2 queue: entry added, size now 1 entries 6542.409931848:main queue:Reg/w0: wtpAdviseMaxWorkers signals busy 6542.409941379:main queue:Reg/w0: action 2 queue: EnqueueMsg advised worker start 6542.409956966:action 2 queue:Reg/w0: action 2 queue: entering rate limiter 6542.409963284:action 2 queue:Reg/w0: action 2 queue: entry deleted, state 0, size now 0 entries 6542.409986950:action 1 queue:Reg/w0: action 1 queue: entering rate limiter 6542.409993091:action 1 queue:Reg/w0: action 1 queue: entry deleted, state 0, size now 0 entries 6542.410459519:imuxsock.c: --------imuxsock calling select, active file descriptors (max 6): 6 Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x41f25950 (LWP 4914)] 0x00007fde6b8478f0 in __pthread_mutex_unlock_usercnt () from /lib/libpthread.so.0 gdb> bt #0 0x00007fde6b8478f0 in __pthread_mutex_unlock_usercnt () from /lib/libpthread.so.0 #1 0x00000000004184a8 in msgDestruct () #2 0x000000000040b9ea in ?? () #3 0x0000000000426d7f in ?? () #4 0x000000000042349f in wtiWorker () #5 0x0000000000422bb8 in ?? () #6 0x00007fde6b844047 in start_thread () from /lib/libpthread.so.0 #7 0x00007fde6b1b228d in clone () from /lib/libc.so.6 #8 0x0000000000000000 in ?? ()
The recently released 3.21.6 might fix this issue since the changelog mentions a fixed segfault condition. See http://www.rsyslog.com/Article292.phtml for the changelog.
Bumped rsyslog to version 3.21.6, thanks for the report. I couldn't reproduce the problems with the new version. Please reopen if problem still persists.
hmm, a bit too early. Just did another test and compilation still fails with USE=debug.
Bug report @upstream: http://bugzilla.adiscon.com/show_bug.cgi?id=103
Ok, replaced $(use_enable debug imdiag) with --disable-imdiag since upstream doesn't support it anyway.