rsyslogd holds open stderr fd from environment that ran its init script

Bug #413023 reported by Max Bowsher
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
rsyslog (Debian)
Fix Released
Unknown
rsyslog (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: rsyslog

Chasing the trail of a hung "run-parts --report /etc/cron.daily" with a defunct logrotate child, I found that rsyslogd was holding an open fd to the write end of run-parts' pipe as its stderr.

It seems that rsyslogd is inheriting stderr from the process executing "/etc/init.d/rsyslog reload" and holding it open - this is bad.

ProblemType: Bug
Architecture: amd64
Date: Thu Aug 13 13:42:36 2009
DistroRelease: Ubuntu 9.10
NonfreeKernelModules: nvidia
Package: rsyslog 4.2.0-1ubuntu2
ProcEnviron:
 LANGUAGE=en_GB.UTF-8
 LC_COLLATE=C
 PATH=(custom, user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-5.24-generic
SourcePackage: rsyslog
Uname: Linux 2.6.31-5-generic x86_64

Related branches

Revision history for this message
Max Bowsher (maxb) wrote :
Michael Terry (mterry)
Changed in rsyslog (Ubuntu):
assignee: nobody → Michael Terry (mterry)
status: New → In Progress
Changed in rsyslog (Debian):
status: Unknown → Fix Released
Revision history for this message
Michael Terry (mterry) wrote :

Here's a merge from Debian to pick up this fix and a few others. I also included a patch from bug 407862 and updated deroot.patch to help issues like bug 401433 (though it won't fix the root cause of that one) by just ignoring /proc/kmsg if we can't read from it, rather than keep trying to read it from the kernel directly.

Changed in rsyslog (Ubuntu):
assignee: Michael Terry (mterry) → nobody
status: In Progress → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package rsyslog - 4.2.0-2ubuntu1

---------------
rsyslog (4.2.0-2ubuntu1) karmic; urgency=low

  [ Michael Terry ]
  * Merge from debian unstable (LP: #413023), remaining changes:
    - Run as rsyslog:rsyslog
    - Allow reading /proc/kmsg when non-root
    - Cleanly upgrade from sysklogd
  * debian/patches/deroot.patch: Don't allow using the klogctl function to
    read klog messages. Rather, allow /proc/kmsg or nothing, since we have
    special support for reading /proc/kmsg while unprivileged.

  [ Neil Wilson ]
  * debian/rsyslog.init: Set blocksize for dd (LP: #407862) and restore
    reload init argument to original lightweight reload

 -- Michael Terry <email address hidden> Thu, 13 Aug 2009 15:43:29 -0400

Changed in rsyslog (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.