Closed
Bug 845966
Opened 12 years ago
Closed 12 years ago
Detect hung startup and/or shutdown
Categories
(Firefox Health Report Graveyard :: Client: Desktop, defect)
Firefox Health Report Graveyard
Client: Desktop
Tracking
(firefox20 unaffected, firefox21 fixed)
RESOLVED
FIXED
Firefox 22
Tracking | Status | |
---|---|---|
firefox20 | --- | unaffected |
firefox21 | --- | fixed |
People
(Reporter: gps, Assigned: gps)
Details
Attachments
(1 file, 1 obsolete file)
3.61 KB,
patch
|
rnewman
:
review+
bajaj
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
We don't have timeouts for startup and shutdown events. This could bite us with shutdown hangs (as evidenced in bug 845842).
Assignee | ||
Comment 1•12 years ago
|
||
There were gaps in the existing tests. We were simulating exceptions after the promise had already been resolved. I'm kinda surprised we didn't know about this until now!
Anyway, I applied some nice test-driven development with this patch. I was able to produce the hang in test. Then, I fixed it.
We still have a gap in test coverage for storage init. But, that one is a little bit more difficult to monkeypatch. The bug with collector was definitely there with storage. And, it is patched as well - just untested.
We should definitely uplift this to Aurora.
Assignee | ||
Comment 2•12 years ago
|
||
Irving: Please apply the patch, |./mach build services browser|, then verify the shutdown hangs go away. I expect the stack error to still be there and for FHR to not init. But at least we are a bit more graceful about things.
Flags: needinfo?(irving)
Assignee | ||
Comment 3•12 years ago
|
||
I should qref before submitting patches.
Attachment #719237 -
Attachment is obsolete: true
Attachment #719237 -
Flags: review?(rnewman)
Attachment #719241 -
Flags: review?(rnewman)
Comment 4•12 years ago
|
||
Comment on attachment 719241 [details] [diff] [review]
Be more robust about errors during startup, v2
Review of attachment 719241 [details] [diff] [review]:
-----------------------------------------------------------------
::: services/healthreport/healthreporter.jsm
@@ +240,1 @@
> this._log.warn("Collector is in progress of initializing. Waiting to finish.");
Let's log before this `if` if initializeHadError, just so we get a message like "Shutting down immediately: initialize failed."
Attachment #719241 -
Flags: review?(rnewman) → review+
Assignee | ||
Comment 5•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/8087b8019bf6
With slightly restructured if block so we log initializeHadError.
Updated•12 years ago
|
Target Milestone: --- → mozilla22
Assignee | ||
Comment 6•12 years ago
|
||
Comment on attachment 719241 [details] [diff] [review]
Be more robust about errors during startup, v2
[Approval Request Comment]
Bug caused by (feature/regressing bug #): Firefox Health Report core code
User impact if declined: Possible shutdown hangs.
Testing completed (on m-c, etc.): Landed on inbound a few hours ago. I'm fine with a day of testing on Nightly before uplift. There is a new xpcshell test for the failure. Manual spot testing reveals FHR still works with this patch.
Risk to taking this patch (and alternatives if risky): I think it's riskier to have FHR enabled on Aurora without this patch.
String or UUID changes made by this patch: None
Attachment #719241 -
Flags: approval-mozilla-aurora?
Assignee | ||
Comment 7•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment 8•12 years ago
|
||
I tried this out with the logging patch gps gave me for bug 845842, and my debug build no longer hangs on shutdown. Still a lot of failures in the log, but I'm pretty sure those are all because of 845842 related issues.
Flags: needinfo?(irving)
Comment 9•12 years ago
|
||
Comment on attachment 719241 [details] [diff] [review]
Be more robust about errors during startup, v2
Given the user impact & risk & considering we will be enabling FHR on aurora by tomorrow per 844181, approving for uplift.
Attachment #719241 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Assignee | ||
Comment 10•12 years ago
|
||
status-firefox20:
--- → unaffected
status-firefox21:
--- → fixed
Comment 11•12 years ago
|
||
Gregory, do you know of a way I could simulate a startup/shutdown hang so I can verify this?
Assignee | ||
Comment 12•12 years ago
|
||
(In reply to Anthony Hughes, Mozilla QA (:ashughes) from comment #11)
> Gregory, do you know of a way I could simulate a startup/shutdown hang so I
> can verify this?
You'd have to trigger an error in FHR's internals. The only way you will reliably be able to do that is to monkeypatch a function to always throw. The class at https://hg.mozilla.org/mozilla-central/file/ec68e56cafa3/services/healthreport/modules-testing/utils.jsm#l214 essentially implements a derived type that overrides some functions to always throw. You'll want to do something similar. The trick will be to install this code on the built-in health reporter instance at run-time. That will be difficult if not impossible.
Comment 13•12 years ago
|
||
Thanks Gregory. Given the time constraints I don't think we'll reasonably be able to test this. If testing this is a Beta blocker then I'll need to re-evaluate that decision.
Updated•12 years ago
|
Component: Metrics and Firefox Health Report → Client: Desktop
Product: Mozilla Services → Firefox Health Report
Target Milestone: mozilla22 → Firefox 22
Updated•6 years ago
|
Product: Firefox Health Report → Firefox Health Report Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•