Closed
Bug 1437575
Opened 7 years ago
Closed 7 years ago
Better shutdown hang reporting: all the notifications must be received
Categories
(Core :: DOM: Core & HTML, defect, P2)
Tracking
()
RESOLVED
FIXED
mozilla60
People
(Reporter: baku, Assigned: baku)
References
(Blocks 3 open bugs)
Details
Crash Data
Attachments
(1 file, 1 obsolete file)
6.32 KB,
patch
|
smaug
:
review+
lizzard
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
When firefox shutdown hangs, it's often because some component blocks the main-thread and doesn't not allow the dispatching of the shutdown notifications. Here some bugs: 1405290, 1435958, 1435960, 1435961, 1435962, 1435966, 1435963, 1435964. I want to improve the logging to know when this happens.
Assignee | ||
Comment 1•7 years ago
|
||
Attachment #8950265 -
Flags: review?(bugs)
Assignee | ||
Comment 2•7 years ago
|
||
Attachment #8950265 -
Attachment is obsolete: true
Attachment #8950265 -
Flags: review?(bugs)
Attachment #8950266 -
Flags: review?(bugs)
Comment 3•7 years ago
|
||
Comment on attachment 8950266 [details] [diff] [review] hang.patch >+ >+bool sShutdownCompleted = false; This is read on watchdog thread, but written in the main thread, yet the variable isn't atomic. what guarantees synchronization? Use Atomic. >+XPCOMShutdownCompleted() >+{ >+ MOZ_DIAGNOSTIC_ASSERT(sShutdownCompleted == false); >+ sShutdownCompleted = true; sShutdownNotified >@@ -855,16 +856,18 @@ ShutdownXPCOM(nsIServiceManager* aServMg > > nsCOMPtr<nsIServiceManager> mgr; > rv = NS_GetServiceManager(getter_AddRefs(mgr)); > if (NS_SUCCEEDED(rv)) { > mozilla::KillClearOnShutdown(ShutdownPhase::Shutdown); > observerService->NotifyObservers(mgr, NS_XPCOM_SHUTDOWN_OBSERVER_ID, > nullptr); > } >+ >+ mozilla::XPCOMShutdownCompleted(); Perhaps call this XPCOMShutdownNotified, since xpcom isn't really shutdown yet at this point
Attachment #8950266 -
Flags: review?(bugs) → review+
Pushed by amarchesini@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/9c669d852f87 Better shutdown hang reporting: all the notifications must be received, r=smaug
Updated•7 years ago
|
Priority: -- → P2
Comment 5•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/9c669d852f87
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox60:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
Comment 6•6 years ago
|
||
Want to request uplift here to beta to help potentially diagnose things for bug 1405290?
status-firefox59:
--- → affected
Flags: needinfo?(amarchesini)
Assignee | ||
Comment 7•6 years ago
|
||
Comment on attachment 8950266 [details] [diff] [review] hang.patch Approval Request Comment [Feature/Bug causing the regression]: Shutdown hanging crash report [User impact if declined]: crash report doesn't say why hanging happens and wrongly shows a worker hanging all the time. [Is this code covered by automated tests?]: n/a [Has the fix been verified in Nightly?]:n/a [Needs manual test from QE? If yes, steps to reproduce]: n/a [List of other uplifts needed for the feature/fix]: none [Is the change risky?]: low [Why is the change risky/not risky?]: This patch introduces a check about the receiving of all the shutdown notifications. In case some of them are not received, after X seconds, firefox crashes. [String changes made/needed]: none
Flags: needinfo?(amarchesini)
Attachment #8950266 -
Flags: approval-mozilla-beta?
Comment 8•6 years ago
|
||
Comment on attachment 8950266 [details] [diff] [review] hang.patch Diagnostic patch for shutdown crashes, for beta 14.
Attachment #8950266 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
![]() |
||
Comment 9•6 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-beta/rev/4a24da7b8cd5
Updated•6 years ago
|
Blocks: 1186276, 1248837, IPCError_ShutDownKill, 1308629, 1333409, 1401481, 1415837, 1419108, 1424451, 1439893, 1368983, 1436995
Crash Signature: [@ shutdownhang | mozilla::dom::workers::RuntimeService::Cleanup]
[@ shutdownhang | __psynch_cvwait | <name omitted> | mozilla::dom::workers::RuntimeService::Cleanup ]
[@ shutdownhang | ZwWaitForAlertByThreadId | mozilla::dom::workers::RuntimeService::C…
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•