system-tools-backends leaves a stale PID file

Bug #298777 reported by Chris Coulson
2
Affects Status Importance Assigned to Milestone
system-tools-backends
Fix Released
Low
system-tools-backends (Ubuntu)
Fix Released
Low
Martin Pitt

Bug Description

Binary package hint: system-tools-backends

If I try to stop system-tools-backends after it was already stopped, I get an error. For example, if I run "sudo invoke-rc.d system-tools-backends" twice, I get:

chr1s@chris-desktop:~$ sudo invoke-rc.d system-tools-backends stop
 * Stopping System Tools Backends system-tools-backends [ OK ]
chr1s@chris-desktop:~$ sudo invoke-rc.d system-tools-backends stop
 * Stopping System Tools Backends system-tools-backends start-stop-daemon: warning: failed to kill 7993: No such process
                                                                                    [ OK ]

This is because when I closed system-tools-backends the first time, it left a stale PID file in /var/run. Manually deleting /var/run/system-tools-backends.pid prevented the init script from failing again.

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

And here is a patch which fixes it

Changed in system-tools-backends:
importance: Undecided → Low
Revision history for this message
Martin Pitt (pitti) wrote :

Looks fine, thank you! Can you please report this upstream and link to it in a patch comment? (https://wiki.ubuntu.com/UbuntuDevelopment/PatchTaggingGuidelines)

Revision history for this message
Martin Pitt (pitti) wrote :

taking for sponsoring.

Changed in system-tools-backends:
assignee: nobody → pitti
status: New → In Progress
Revision history for this message
In , Chris Coulson (chrisccoulson) wrote :

I reported this at https://bugs.launchpad.net/ubuntu/+source/system-tools-backends/+bug/298777:

If I try to stop system-tools-backends after it was already stopped, I get an error. For example, if I run "sudo invoke-rc.d system-tools-backends" twice, I get:

chr1s@chris-desktop:~$ sudo invoke-rc.d system-tools-backends stop
 * Stopping System Tools Backends system-tools-backends [ OK ]
chr1s@chris-desktop:~$ sudo invoke-rc.d system-tools-backends stop
 * Stopping System Tools Backends system-tools-backends start-stop-daemon: warning: failed to kill 7993: No such process
                                                                                    [ OK ]

This is because when I closed system-tools-backends the first time, it left a stale PID file in /var/run. Manually deleting /var/run/system-tools-backends.pid prevented the init script from failing again.

Revision history for this message
In , Chris Coulson (chrisccoulson) wrote :

Created an attachment (id=20453)
cleanup-pid-file.patch

Here is the patch applied in Ubuntu. This applied to version 2.6.0 of system-tools-backends

Changed in system-tools-backends:
status: Unknown → Confirmed
Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Martin,

I sent the bug and patch upstream. Here is a revised debdiff with the tags in the patch.

Thanks

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package system-tools-backends - 2.6.0-2ubuntu2

---------------
system-tools-backends (2.6.0-2ubuntu2) jaunty; urgency=low

  * debian/patches/61_cleanup-pid-file:
    - Delete the PID file when terminated (LP: #298777).

 -- Chris Coulson <email address hidden> Sun, 16 Nov 2008 17:31:57 +0000

Changed in system-tools-backends:
status: In Progress → Fix Released
Revision history for this message
In , Michael Hasselmann (michael-hasselmann) wrote :

The original problem might have been caused by http://bugs.freedesktop.org/show_bug.cgi?id=19604 as the PID file was created without an explicit file mode.

Revision history for this message
In , Milan Bouchet-Valat (nalimilan) wrote :

Pushed as 52b2419d4ad8641c3dd63272f6c1ca97f570bf45. Thanks!

Changed in system-tools-backends:
status: Confirmed → Fix Released
Changed in system-tools-backends:
importance: Unknown → Low
Changed in system-tools-backends:
importance: Low → Unknown
Changed in system-tools-backends:
importance: Unknown → Low
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.