Bug 820996 - rsyslog writes debug messages to fd 1 even after forking
rsyslog writes debug messages to fd 1 even after forking
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: rsyslog (Show other bugs)
6.3
Unspecified Unspecified
high Severity high
: rc
: 6.4
Assigned To: Tomas Heinrich
Dalibor Pospíšil
: Regression
Depends On:
Blocks: 805204
  Show dependency treegraph
 
Reported: 2012-05-11 10:06 EDT by Dalibor Pospíšil
Modified: 2012-06-20 02:59 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previous version of rsyslog attempted to write debugging messages to standard output even when run in background. This resulted in the debugging information being written to some other output. This was corrected and the debug messages are not written to standard output when run in background.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-20 02:59:11 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
proposed patch (2.06 KB, patch)
2012-05-16 06:15 EDT, Tomas Heinrich
no flags Details | Diff

  None (edit)
Description Dalibor Pospíšil 2012-05-11 10:06:52 EDT
Description of problem:
The rsyslog does not send messages to the remote site if running with "-d", btw "-dn" is ok.

Version-Release number of selected component (if applicable):
rsyslog-5.8.10-1.el6

How reproducible:
always

Steps to Reproduce:
on server:
1.
# cat >> /etc/rsyslog.conf <<EOF
\$ModLoad imtcp.so
\$InputTCPServerRun 514

local2.error   /var/log/test-rsyslog.log
EOF
# service rsyslog restart

on client:
2. # cat >> /etc/rsyslog.conf <<EOF
local2.error    @@$SERVERS
EOF
3. # /sbin/rsyslogd -d
4. # logger -p local2.error 'communication test'

on server:
5. # grep 'communication test' /var/log/test-rsyslog.log
  
Actual results:
grep does not find the message


Expected results:
grep does find the message
Comment 4 Tomas Heinrich 2012-05-16 06:10:15 EDT
Actually, the issue is not limited to forwarding messages.

If debugging is turned on, the messages are written to stdout (fd 1). When the daemon forks, stdout is closed and something else can be opened as fd 1 (file / socket / ...).
The target gets cluttered by debug messages which possibly exceed the maximum line length which in turn causes message loss.

steps to reproduce:
- first action in rsyslog.conf
  *.* /tmp/all.log
- from shell run
  rsyslogd -c 5 -d
- debug messages (besides syslog messages) end up in all.log
Comment 5 Tomas Heinrich 2012-05-16 06:15:46 EDT
Created attachment 584922 [details]
proposed patch
Comment 8 Tomas Heinrich 2012-05-17 13:01:03 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Previous version of rsyslog attempted to write debugging messages to standard output even when run in background.
This resulted in the debugging information being written to some other output. This was corrected and the debug messages are not
written to standard output when run in background.
Comment 9 Dalibor Pospíšil 2012-05-18 08:26:18 EDT
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1,3 @@
-Previous version of rsyslog attempted to write debugging messages to standard output even when run in background.
This resulted in the debugging information being written to some other output. This was corrected and the debug messages are not
written to standard output when run in background.+Previous version of rsyslog attempted to write debugging messages to standard output even when run in background.
+This resulted in the debugging information being written to some other output. This was corrected and the debug messages are not
+written to standard output when run in background.
Comment 12 errata-xmlrpc 2012-06-20 02:59:11 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2012-0796.html

Note You need to log in before you can comment on or make changes to this bug.