RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 820996 - rsyslog writes debug messages to fd 1 even after forking
Summary: rsyslog writes debug messages to fd 1 even after forking
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: rsyslog
Version: 6.3
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: 6.4
Assignee: Tomas Heinrich
QA Contact: Dalibor Pospíšil
URL:
Whiteboard:
Depends On:
Blocks: 805204
TreeView+ depends on / blocked
 
Reported: 2012-05-11 14:06 UTC by Dalibor Pospíšil
Modified: 2012-06-20 06:59 UTC (History)
2 users (show)

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.
Clone Of:
Environment:
Last Closed: 2012-06-20 06:59:11 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0796 0 normal SHIPPED_LIVE Moderate: rsyslog security, bug fix, and enhancement update 2012-06-19 19:29:32 UTC

Description Dalibor Pospíšil 2012-05-11 14:06:52 UTC
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 10:10:15 UTC
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 10:15:46 UTC
Created attachment 584922 [details]
proposed patch

Comment 8 Tomas Heinrich 2012-05-17 17:01:03 UTC
    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 12:26:18 UTC
    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 06:59:11 UTC
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.