run-parts does not seem to reap its children

Bug #792847 reported by Vladimir Kolesnikov
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
debianutils
Fix Released
Unknown
debianutils (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: debianutils

An excerpt from "ps faux | less":

root 738 0.0 0.0 18928 928 ? Ss May03 0:06 cron
root 15859 0.0 0.0 60684 1728 ? S May31 0:00 \_ CRON
root 15864 0.0 0.0 4220 584 ? Ss May31 0:00 \_ /bin/sh -c test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
root 15866 0.0 0.0 4120 580 ? S May31 0:00 \_ run-parts --report /etc/cron.daily
root 15870 0.0 0.0 0 0 ? Z May31 0:00 \_ [apt] <defunct>

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: debianutils 3.4.3ubuntu1
ProcVersionSignature: Ubuntu 2.6.38-8.42-server 2.6.38.2
Uname: Linux 2.6.38-8-server x86_64
Architecture: amd64
Date: Sat Jun 4 16:57:12 2011
ExecutablePath: /bin/run-parts
InstallationMedia: Ubuntu-Server 10.04.2 LTS "Lucid Lynx" - Release amd64 (20110211.1)
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/sh
SourcePackage: debianutils
UpgradeStatus: Upgraded to natty on 2011-05-03 (31 days ago)

Revision history for this message
Vladimir Kolesnikov (sjinks) wrote :
Revision history for this message
Maarten Bezemer (veger) wrote :

It seems to fixed upstream, so Ubuntu needs a version update

Changed in debianutils:
status: Unknown → Fix Released
Revision history for this message
Maarten Bezemer (veger) wrote :

I cannot reproduce the problem myself (and thus also not check whether the upstream fix indeed fixes this problem). So leaving the status at new

Revision history for this message
Maarten Bezemer (veger) wrote :

debianutils now has version 4.2.1ubuntu1 available (see bug # 933051) which includes the mentioned upstream fix.

Could you upgrade to this version and report back whether the upgrade indeed solved the problem, or that there is something else going on?

Changed in debianutils (Ubuntu):
status: New → Incomplete
Revision history for this message
Lauri Tirkkonen (lotheac) wrote :

Here's a test case: a program that forks a longer running process (could be a daemon) and exits. debianutils 4.0.2 is buggy, and waits until the forked program exits:

% run-parts --report . & sleep 1 && ps xf
[1] 2742
  PID TTY STAT TIME COMMAND
28460 ? S 0:00 sshd: ltirkkon@pts/0
28461 pts/0 Ss 0:00 \_ -zsh
 2742 pts/0 SN 0:00 \_ run-parts --report .
 2744 pts/0 ZN 0:00 | \_ [fork-sleeper] <defunct>
 2746 pts/0 R+ 0:00 \_ ps xf
 2745 pts/0 SN 0:00 ./fork-sleeper

4.2.1ubuntu1 fixes this issue:

% run-parts --report . & sleep 1 && ps xf
[1] 1952
[1] + done run-parts --report .
  PID TTY STAT TIME COMMAND
28460 ? S 0:00 sshd: ltirkkon@pts/0
28461 pts/0 Ss 0:00 \_ -zsh
 1956 pts/0 R+ 0:00 \_ ps xf
 1955 pts/0 SN 0:00 ./fork-sleeper

Revision history for this message
Vladimir Kolesnikov (sjinks) wrote :

Hi Maarten,

Where can I get the newest .deb from?

# dpkg -l | grep debianutils
ii debianutils 4.0.2 Miscellaneous utilities specific to Debian

# apt-cache policy debianutils
debianutils:
  Installed: 4.0.2
  Candidate: 4.0.2
  Version table:
 *** 4.0.2 0
        500 http://us.archive.ubuntu.com/ubuntu/ oneiric/main amd64 Packages
        100 /var/lib/dpkg/status

I don't see 4.2.1ubuntu1 in the official repositories.

Revision history for this message
Maarten Bezemer (veger) wrote :

It is in the precise repository: https://launchpad.net/ubuntu/precise/+source/debianutils/
You'd have to grab it from there.

If it really solves the issue (which seems to be the case as pointed out by Lauri Tirkkonen), we could try to accept it into oneiric, I suppose.

Revision history for this message
Vladimir Kolesnikov (sjinks) wrote :

OK I have installed it from the Precise.

The only problem is that the bug happens rarely - e.g., once in a several weeks (I usually see it once a month or so) - thus it will take some time to confirm that the bug does not happen anymore.

Revision history for this message
Lauri Tirkkonen (lotheac) wrote :

I think the original problem reported was caused by apt restarting a daemon after installing/upgrading a package -- at least I think that's what happened to me. Vladimir, check your apt logs if it upgraded a package when this problem occurred.

Revision history for this message
Lauri Tirkkonen (lotheac) wrote :

So can we get this to oneiric or should I package it myself? In effect, this causes cron.daily not to run the next day if a daemon is restarted by unattended-upgrades.

Revision history for this message
Maarten Bezemer (veger) wrote :

If you need a fix for the bug in previous versions of Ubuntu, please follow the instructions for "How to request new packages" at https://help.ubuntu.com/community/UbuntuBackports#Requesting_New_Backports

If the request is declined, I am afraid you'd need to package it yourself.

Also, please let us know whether the new version solves the problem or not. So we can update this bug report.

Revision history for this message
Maarten Bezemer (veger) wrote :

Note: if your backporting request is accepted. Let me know, and I'll create such a backport

Revision history for this message
Lauri Tirkkonen (lotheac) wrote :

Ok. I've already stated that the updated version fixes my issue (which I assume is the same as the original issue, not reported by me).

Revision history for this message
Maarten Bezemer (veger) wrote :

This bug report is being closed due to the last comments regarding this being fixed with the update. Thank you again for taking the time to report this bug and helping to make Ubuntu better. Please submit any future bugs you may find.

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

Other bug subscribers

Remote bug watches

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