console log consumes fds upon job restart/respawn

Bug #940290 reported by Tuomo Tanskanen
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
upstart
Fix Released
Medium
James Hunt
upstart (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Upstart is consuming more and more fds for restarted/respawned jobs. It is not losing the references, as fds are closed upon stopping the job.

Test case:
sudo cat >/etc/init/test.conf <<EOF
console log
respawn

script
  echo "foo"
  sleep 9999
end script

post-start exec echo "bar"
EOF
sudo start test
sudo ls -l /proc/1/fd | grep test (one fd)
sudo restart test
sudo ls -l /proc/1/fd | grep test (two fds)
sudo killall sleep
sudo ls -l /proc/1/fd | grep test (three fds)
sudo stop test
sudo ls -l /proc/1/fd | grep test (zero fds)

Tested on Ubuntu 12.04, Upstart 1.4-0ubuntu8, also upstream 1.4.

Related branches

James Hunt (jamesodhunt)
Changed in upstart:
importance: Undecided → Medium
status: New → Confirmed
assignee: nobody → James Hunt (jamesodhunt)
Revision history for this message
Tuomo Tanskanen (tuomotanskanen) wrote :

Revision 1363 seems to fix this, thank you.

James Hunt (jamesodhunt)
Changed in upstart (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Changed in upstart:
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package upstart - 1.5-0ubuntu1

---------------
upstart (1.5-0ubuntu1) precise; urgency=low

  * FFe. LP: #962124.
  * New upstream 1.5 release.
    - fix boot failure when /dev/pts is not mounted before upstart starts.
      LP: #936667.
    - fix a file descriptor leak on job restarts. LP: #940290.
  * debian/conf/failsafe.conf: Added missing "emits" which breaks
    'initctl check-config'.
  * debian/manpages/upstart-events.7: Added 'failsafe-boot' and
    'recovery' events.
 -- James Hunt <email address hidden> Thu, 22 Mar 2012 13:50:31 +0000

Changed in upstart (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.