wait-for-state restarts whoopsie every 30sec
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | One Hundred Papercuts |
High
|
Unassigned | ||
| | upstart |
Undecided
|
Unassigned | ||
| | upstart (Ubuntu) |
Wishlist
|
Unassigned | ||
| | whoopsie (Ubuntu) |
High
|
Didier Roche | ||
| | whoopsie-preferences (Ubuntu) |
Undecided
|
Didier Roche | ||
Bug Description
wait-for-state is restarting whoopsie every 30sec:
[14103.317598] init: whoopsie main process ended, respawning
[14133.330315] init: wait-for-state (whoopsienetwor
[14133.396185] init: whoopsie main process (10227) terminated with status 1
[14133.396205] init: whoopsie main process ended, respawning
[14163.409765] init: wait-for-state (whoopsienetwor
[14163.468346] init: whoopsie main process (10237) terminated with status 1
[14163.468366] init: whoopsie main process ended, respawning
[14193.485204] init: wait-for-state (whoopsienetwor
[14193.560511] init: whoopsie main process (10249) terminated with status 1
[14193.560531] init: whoopsie main process ended, respawning
The problem in wait-for-state.conf is this line:
status $WAIT_FOR | grep -q "$TARGET_
TARGET_GOAL is either "start" or "stop".
WAIT_STATE by default is "started", but there is no job status like "start/started".
so WAIT_STATE needs to be something like "running" (or "waiting" for goal of "stop").
ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: upstart 1.13.2-0ubuntu6
ProcVersionSign
Uname: Linux 3.18.0-9-generic x86_64
ApportVersion: 2.15.1-0ubuntu2
Architecture: amd64
CurrentDesktop: Unity
Date: Tue Jan 20 20:59:02 2015
InstallationDate: Installed on 2014-09-03 (139 days ago)
InstallationMedia: Ubuntu 14.10 "Utopic Unicorn" - Alpha amd64 (20140902)
ProcKernelCmdline: BOOT_IMAGE=
SourcePackage: upstart
UpgradeStatus: No upgrade log present (probably fresh install)
UpstartBugCategory: System
UpstartRunningS
UpstartRunningS
modified.
mtime.conffile.
Related branches
- Didier Roche: Approve on 2015-03-13
- Daisy Pluckers: Pending requested 2015-03-07
-
Diff: 12 lines (+1/-1)1 file modifieddata/whoopsie.conf (+1/-1)
| Michael Blennerhassett (mjblenner) wrote : | #1 |
| tags: | added: patch |
| Changed in upstart (Ubuntu): | |
| status: | New → Confirmed |
| Changed in upstart (Ubuntu): | |
| importance: | Undecided → High |
| Changed in upstart: | |
| status: | New → Confirmed |
| Changed in hundredpapercuts: | |
| status: | New → Confirmed |
| importance: | Undecided → High |
| Steve Langasek (vorlon) wrote : | #5 |
The second part of the patch proposed to upstart's wait-for-state job is reasonable, but has nothing to do with the behavior shown here. And the first part of the patch is wrong. It's not appropriate to change the default wait-for-state behavior that other packages are relying on.
/etc/init/
status network-manager >/dev/null 2>&1 && start wait-for-state WAITER=whoopsie WAIT_FOR=
- 'GOAL' is incorrect; the variable name is 'TARGET_GOAL', but start is the default so this is a cosmetic issue.
- because network-manager runs a service, WAIT_STATE=running needs to be specified here.
- changing any of this will not cause whoopsie to stop respawning. All of the wait-for-state handling happens in a *pre-start* script which has been written to ignore any failure from wait-for-state. The logs in this bug clearly show that there is a main process which is exiting.
[14103.317598] init: whoopsie main process ended, respawning
This means that whoopsie itself is exiting for some reason and then being respawned. wait-for-state is in no way causing whoopsie to be restarted; the only thing wait-for-state is doing is causing enough of a delay in the pre-start that the respawn limit is never hit, causing this to loop indefinitely. But the real issue is whatever is causing whoopsie to exit in the first place.
| Changed in upstart (Ubuntu): | |
| importance: | High → Wishlist |
| Changed in whoopsie (Ubuntu): | |
| status: | New → Triaged |
| assignee: | nobody → Didier Roche (didrocks) |
| Steve Langasek (vorlon) wrote : | #6 |
This is a regression introduced in the last whoopsie upload in vivid. Prior to this, the upstart job included deliberate handling in /etc/init/
| Michael Blennerhassett (mjblenner) wrote : | #7 |
Looking at man 8 init, there is no job state "started", so having WAIT_STATE=started is exactly equal to WAIT_STATE=foobar, since they both don't exit.
So you may as well change it to something sensible.
Also, the reason that whoopsie exits as soon as it is respawned is that there is already another whoopsie process running, that either was started by something else (apport?), or upstart tost track of it.
Either way, fixing the wait-for-state (this patch or fixing whoopsie.conf), fixes the 30sec respawn bug.
| Changed in whoopsie (Ubuntu): | |
| importance: | Undecided → High |
| Clint Byrum (clint-fewbar) wrote : | #8 |
Michael, agree that 'started' is the wrong thing to look for and has probably caused a few confusing things through the years since wait-for-state has been in use. I think the patch should be merged.
| Didier Roche (didrocks) wrote : | #9 |
@Steve: I think I understand what happens.
On package upgrade, if the job is disabled, then, there is an upstart .override file written to disable it and so, that behavior shouldn't be triggered. I guess this case happens currently if you disable through ubuntu-
However, I see that there is another value about report_metrics that we don't use for job enablement status.
I propose to do the following on ubuntu-
This should prevent whoopsie to loop when the job is disabled and only have the current enablement state in one place (through libwhoopsie-
I can set the other changes that you described as well to fix the upstart job, just following what you see as I'm in no way an upstart expert :)
| Alan (alanjas) wrote : | #10 |
Tail of dmesg..
[ 4517.664355] init: wait-for-state (whoopsienetwor
[ 4517.720627] init: whoopsie main process (7492) terminated with status 1
[ 4517.720645] init: whoopsie main process ended, respawning
| Chad Miller (cmiller) wrote : | #11 |
@didrocks, I see this bug on my laptop. Ping me if you want testing or info.
| Changed in whoopsie-preferences (Ubuntu): | |
| assignee: | nobody → Didier Roche (didrocks) |
| Didier Roche (didrocks) wrote : | #12 |
Fixed, I added as well Michael's upstart job enhancement in this upload (even if that doesn't fix the real issue, still a nice addition). Didn't merge into upstream trunk as I don't have access right, but Brian would merge them back.
| Changed in upstart: | |
| status: | Confirmed → Invalid |
| Changed in upstart (Ubuntu): | |
| status: | Confirmed → Invalid |
| Changed in whoopsie (Ubuntu): | |
| status: | Triaged → Fix Committed |
| Changed in whoopsie-preferences (Ubuntu): | |
| status: | New → Fix Committed |
| Changed in hundredpapercuts: | |
| status: | Confirmed → Invalid |
| Launchpad Janitor (janitor) wrote : | #13 |
This bug was fixed in the package whoopsie-
---------------
whoopsie-
* Now use service status (upstart and systemd) to notify if crash reporting
is enabled (LP: #1412719)
* Default file for whoopsie settings (only used for report_metrics currently)
is now /etc/whoopsie (LP: #1431432)
* debian/control: add Breaks to ensure we dep on the right whoopsie version
* Update Standards-Version.
-- Didier Roche <email address hidden> Thu, 12 Mar 2015 17:39:30 +0100
| Changed in whoopsie-preferences (Ubuntu): | |
| status: | Fix Committed → Fix Released |
| Launchpad Janitor (janitor) wrote : | #14 |
This bug was fixed in the package whoopsie - 0.2.47
---------------
whoopsie (0.2.47) vivid; urgency=medium
[ Didier Roche ]
* Remove /etc/default/
(LP: #1431432)
- debian/
- debian/
by gnome-control-
(LP: #1412719)
Refactor the logic for caching report_crashes as well.
- debian/
service started after upgrade and keep it disable if it was disabled
- Makefile, data/whoopsie: remove the conffile so that we don't ship it
* Bump Standards-Version
[ Michael Blennerhassett ]
* Under upstart: Set the WAIT_STATE to get wait-for-state to do something
useful. GOAL is also not needed.
-- Didier Roche <email address hidden> Thu, 12 Mar 2015 17:21:58 +0100
| Changed in whoopsie (Ubuntu): | |
| status: | Fix Committed → Fix Released |


This patch changes the defaults for wait-for-state.conf to something sensible for WAIT_STATE.