Bug 436722

Summary: rsyslog hangs when using specific config
Product: [Fedora] Fedora Reporter: Jan Andrejkovic <jandrejkovic>
Component: rsyslogAssignee: Peter Vrabec <pvrabec>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 8CC: theinric
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: 2.0.2-3.fc8 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-03-13 07:43:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan Andrejkovic 2008-03-09 22:39:04 UTC
Description of problem:

-------------------------------------------------------------
Rsyslog hangs when using this config in /etc/rsyslog.conf:

# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.*                                                 /dev/console

# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;authpriv.none;cron.none                -/var/log/messages

# The authpriv file has restricted access.
authpriv.*                                              -/var/log/secure

# Log all the mail messages in one place.
mail.*                                                  -/var/log/maillog

# Iptables debug messages:
kern.debug                                              -/var/log/iptables

# Log cron stuff
cron.*                                                  -/var/log/cron

# Everybody gets emergency messages
*.emerg                                                 -*

# Save news errors of level crit and higher in a special file.
uucp,news.crit                                          -/var/log/spooler

# Save boot messages also to boot.log
local7.*                                                -/var/log/boot.log
-------------------------------------------------------------

Version-Release number of selected component (if applicable):
rsyslog-2.0.2-1.fc8

How reproducible:
Easily - use above config.

Steps to Reproduce:
1. Use above config and try to start rsyslog - it will hang. 
  
Actual results:
When rsyslog service is enabled and this config is used, it will even hang
Fedora startup - which is quite unpleasant side-effect of this bug.

Expected results:
rsyslog should not hang - it should either start or stop with error.

Additional info:
On the web I found advice to use it with -d and -n parameters, so here it is:

[root@my_pc etc]# /sbin/rsyslogd -d -n
Starting.
-1208662336: rsyslog 2.0.2.
-1208662336: Called init.
-1208662336: Unloading non-static modules.
-1208662336: Clearing templates.
-1208662336: cfline: '*.info;mail.none;authpriv.none;cron.none         
-/var/log/messages'
-1208662336:  - traditional PRI filter
-1208662336: symbolic name: info ==> 6
-1208662336: symbolic name: none ==> 16
-1208662336: symbolic name: mail ==> 16
-1208662336: symbolic name: none ==> 16
-1208662336: symbolic name: authpriv ==> 80
-1208662336: symbolic name: none ==> 16
-1208662336: symbolic name: cron ==> 72
-1208662336: tried selector action for builtin-file: 0
-1208662336: Module builtin-file processed this config line.
-1208662336: template: ' TradFmt' assigned
-1208662336: cfline: 'authpriv.*                                               
-/var/log/secure'
-1208662336: selector line successfully processed
-1208662336:  - traditional PRI filter
-1208662336: symbolic name: * ==> 255
-1208662336: symbolic name: authpriv ==> 80
-1208662336: tried selector action for builtin-file: 0
-1208662336: Module builtin-file processed this config line.
-1208662336: template: ' TradFmt' assigned
-1208662336: cfline: 'mail.*                                                   
-/var/log/maillog'
-1208662336: selector line successfully processed
-1208662336:  - traditional PRI filter
-1208662336: symbolic name: * ==> 255
-1208662336: symbolic name: mail ==> 16
-1208662336: tried selector action for builtin-file: 0
-1208662336: Module builtin-file processed this config line.
-1208662336: template: ' TradFmt' assigned
-1208662336: cfline: 'kern.debug                                             
-/var/log/iptables'
-1208662336: selector line successfully processed
-1208662336:  - traditional PRI filter
-1208662336: symbolic name: debug ==> 7
-1208662336: symbolic name: kern ==> 0
-1208662336: tried selector action for builtin-file: 0
-1208662336: Module builtin-file processed this config line.
-1208662336: template: ' TradFmt' assigned
-1208662336: cfline: 'cron.*                                                   
-/var/log/cron'
-1208662336: selector line successfully processed
-1208662336:  - traditional PRI filter
-1208662336: symbolic name: * ==> 255
-1208662336: symbolic name: cron ==> 72
-1208662336: tried selector action for builtin-file: 0
-1208662336: Module builtin-file processed this config line.
-1208662336: template: ' TradFmt' assigned
-1208662336: cfline: '*.emerg                                                   -*'
-1208662336: selector line successfully processed
-1208662336:  - traditional PRI filter
-1208662336: symbolic name: emerg ==> 0
*** glibc detected *** /sbin/rsyslogd: free(): invalid pointer: 0xbfe29fb4 ***
======= Backtrace: =========
/lib/libc.so.6[0x1d1ac1]
/lib/libc.so.6(cfree+0x90)[0x1d50f0]
/sbin/rsyslogd[0x805d713]
/sbin/rsyslogd[0x805e28b]
/sbin/rsyslogd[0x804f5a3]
/sbin/rsyslogd[0x80502e8]
/sbin/rsyslogd[0x805164f]
/sbin/rsyslogd(main+0xe10)[0x80542b0]
/lib/libc.so.6(__libc_start_main+0xe0)[0x17e390]
/sbin/rsyslogd[0x804c681]
======= Memory map: ========
00110000-0012b000 r-xp 00000000 fd:00 2720001    /lib/ld-2.7.so
0012b000-0012c000 r-xp 0001a000 fd:00 2720001    /lib/ld-2.7.so
0012c000-0012d000 rwxp 0001b000 fd:00 2720001    /lib/ld-2.7.so
0012d000-0012e000 r-xp 0012d000 00:00 0          [vdso]
0012e000-00140000 r-xp 00000000 fd:00 2721654    /lib/libz.so.1.2.3
00140000-00141000 rwxp 00011000 fd:00 2721654    /lib/libz.so.1.2.3
00141000-00156000 r-xp 00000000 fd:00 2719789    /lib/libpthread-2.7.so
00156000-00157000 r-xp 00014000 fd:00 2719789    /lib/libpthread-2.7.so
00157000-00158000 rwxp 00015000 fd:00 2719789    /lib/libpthread-2.7.so
00158000-0015a000 rwxp 00158000 00:00 0
0015a000-0015d000 r-xp 00000000 fd:00 2720012    /lib/libdl-2.7.so
0015d000-0015e000 r-xp 00002000 fd:00 2720012    /lib/libdl-2.7.so
0015e000-0015f000 rwxp 00003000 fd:00 2720012    /lib/libdl-2.7.so
0015f000-00166000 r-xp 00000000 fd:00 2720596    /lib/librt-2.7.so
00166000-00167000 r-xp 00007000 fd:00 2720596    /lib/librt-2.7.so
00167000-00168000 rwxp 00008000 fd:00 2720596    /lib/librt-2.7.so
00168000-002bb000 r-xp 00000000 fd:00 2719765    /lib/libc-2.7.so
002bb000-002bd000 r-xp 00153000 fd:00 2719765    /lib/libc-2.7.so
002bd000-002be000 rwxp 00155000 fd:00 2719765    /lib/libc-2.7.so
002be000-002c1000 rwxp 002be000 00:00 0
002c1000-002cb000 r-xp 00000000 fd:00 2719781    /lib/libnss_files-2.7.so
002cb000-002cc000 r-xp 00009000 fd:00 2719781    /lib/libnss_files-2.7.so
002cc000-002cd000 rwxp 0000a000 fd:00 2719781    /lib/libnss_files-2.7.so
002cd000-002d8000 r-xp 00000000 fd:00 2722291    /lib/libgcc_s-4.1.2-20070925.so.1
002d8000-002d9000 rwxp 0000a000 fd:00 2722291    /lib/libgcc_s-4.1.2-20070925.so.1
08048000-08069000 r-xp 00000000 fd:00 3506446    /sbin/rsyslogd
08069000-0806a000 rw-p 00021000 fd:00 3506446    /sbin/rsyslogd
08dfe000-08e1f000 rw-p 08dfe000 00:00 0
b7e00000-b7e21000 rw-p b7e00000 00:00 0
b7e21000-b7f00000 ---p b7e21000 00:00 0
b7f54000-b7f57000 rw-p b7f54000 00:00 0
b7f6b000-b7f6d000 rw-p b7f6b000 00:00 0
bfe1d000-bfe32000 rw-p bffea000 00:00 0          [stack]
Aborted

Comment 1 Tomas Heinrich 2008-03-10 18:29:02 UTC
Hi Jan,

though this is a bug in rsyslog, it is triggered by this configuration line
  *.emerg               -*
which is not correct - the '-' is redundant.
A fixed version should be available soon.



Comment 2 Fedora Update System 2008-03-11 13:21:16 UTC
rsyslog-2.0.2-3.fc8 has been submitted as an update for Fedora 8

Comment 3 Fedora Update System 2008-03-13 07:43:57 UTC
rsyslog-2.0.2-3.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.