indicator-weather refuses to start, saying "Another instance of this program is already running" when that is not true.
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Weather Indicator | Status tracked in 2.0 | |||||
2.0 |
Fix Released
|
Medium
|
Unassigned | |||
Baltix |
New
|
Undecided
|
Unassigned | |||
indicator-weather (Ubuntu) |
Fix Released
|
Medium
|
Andrew Starr-Bochicchio | |||
Precise |
Fix Released
|
Medium
|
Unassigned |
Bug Description
--- SRU Justification ---
[IMPACT]
When indicator-weather crashes (which is unfortunately fairly often for some users), it sometimes leaves behind a pid file in /tmp. The current pid file checking can sometimes match pids that match part of some other process number. This can cause users to not be able to restart the program after a crash. This fix requires that the pid number matches exactly.
[TESTCASE]
Run indicator-weather and wait for a crash.
Restart indicator-weather.
With the version in precise, it can sometimes not be restarted with this error:
/usr/lib/
import gobject._gobject
Another instance of this program is already running
With the version in precise-proposed, it will always restart.
For extra points, try to start a second instance of indicator-weather. With both versions, this should fail.
[Regression Potential]
Very little. It is a one line change. If there was an issue, it would only display in the same circumstances as this bug, trying to restart after a crash.
---
Description: Ubuntu 11.10
Release: 11.10
indicator-weather:
Installed: 11.05.31-0ubuntu2.1
Candidate: 11.05.31-0ubuntu2.1
Version table:
*** 11.05.31-0ubuntu2.1 0
500 http://
100 /var/lib/
11.
500 http://
Expect the indicator to start when run, but it does not but gives the following error message:
/usr/lib/
import gobject._gobject
Another instance of this program is already running
At some stage I assume the indicator crashed and left a file in /tmp called indicator-
Changed in indicator-weather (Ubuntu Precise): | |
status: | New → Triaged |
Changed in indicator-weather (Ubuntu): | |
status: | Confirmed → Triaged |
importance: | Undecided → Medium |
Changed in indicator-weather (Ubuntu Precise): | |
importance: | Undecided → Medium |
Changed in indicator-weather (Ubuntu): | |
status: | Triaged → In Progress |
assignee: | nobody → Andrew Starr-Bochicchio (andrewsomething) |
tags: |
added: verification-done removed: verification-needed |
description: | updated |
no longer affects: | weather-indicator/3.0 |
I've now checked the source code. Unfortunatly, I did not check the contents of the .pid file before deleting it. However, I can see from my directory listing that the length was only 3 characters. Looking at the pid checking code, perhaps the 3 characters matched in part some other process number. I've attached a potential patch to avoid this.