Closed Bug 1435961 Opened 6 years ago Closed 2 years ago

nsUrlClassifierDBService::Shutdown() blocks the shutdown of other components

Categories

(Core :: DOM: Core & HTML, defect, P3)

58 Branch
defect

Tracking

()

RESOLVED DUPLICATE of bug 1435343

People

(Reporter: baku, Unassigned)

References

(Blocks 2 open bugs)

Details

(Keywords: crash, topcrash-thunderbird, Whiteboard: [tbird topcrash])

Crash Data

https://crash-stats.mozilla.com/report/index/abebf122-97e0-4c84-9927-f88ed0180205#allthreads

Here it seems that nsUrlClassifierDBService::Shutdown() blocks the main-thread dispatching SyncRunnable that doesn't return. Because this is done when xpcom-shutdown notification is received, this doesn't allow other components to receive the same notification, and, eventually, fx crashes.
Blocks: 1437575
Blocks: 1405290
This appears to be due to using SyncRunnables/DISPATCH_SYNC from mainthread, probably because they need to wait for some other thread to do something during shutdown, and if they return from Observe the shutdown sequence will continue.

Instead, anything which needs to do other-thread actions or wait should use an AsyncShutdown blocker (nsIAsyncShutdownClient, etc) - you can see this  in action in C++ code in MediaManager.cpp.  Then you don't need to use a sync message from the shutdown observer/etc.
Priority: -- → P3
Crash Signature: [@ mozilla::dom::workerinternals::RuntimeService::CrashIfHanging ]
Component: DOM → DOM: Core & HTML
Blocks: 1633342
No longer blocks: 1633342
Blocks: 1633342
No longer blocks: 1435343
Whiteboard: [tbird crash]

At the time that crash-stats stopped accepting Thunderbird crashes, this was #4 crash for Thunderbird 91.3.0, right up there with numerous other shutdown crashes

  • shutdownhang | NtUserPeekMessage | _PeekMessage - bug 1643264, bug 1547541, bug 1306838
  • shutdownhang | RtlAcquireSRWLockExclusive | mozilla::detail::RunnableFunction<T>::Run - bug 1630597
  • shutdownhang | mozilla::TaskController::GetRunnableForMTTask | mozilla::AppWindow::ShowModal - (no bug)
  • shutdownhang | NtCallbackReturn - bug 1749139

etc

Whiteboard: [tbird crash] → [tbird topcrash]

#4 crash for 102.0.3

The severity field for this bug is set to normal. However, the bug has the topcrash keyword.
:hsinyi, could you consider increasing the severity of this top-crash bug? If the crash isn't "top" anymore, could you drop the topcrash keyword?

For more information, please visit auto_nag documentation.

Flags: needinfo?(htsai)

(In reply to Release mgmt bot [:suhaib / :marco/ :calixte] from comment #4)

The severity field for this bug is set to normal. However, the bug has the topcrash keyword.
:hsinyi, could you consider increasing the severity of this top-crash bug? If the crash isn't "top" anymore, could you drop the topcrash keyword?

For more information, please visit auto_nag documentation.

Per comment 3, it's a topcrash for thunderbird. According to the triage guideline, I am not sure the "severity" flag is the best place to reflect that.

Jens, I admit that I didn't read through all the comments here and in https://bugzilla.mozilla.org/show_bug.cgi?id=1435343. But what's the difference between these two? The exact same crash signature is linked here and there.

Flags: needinfo?(htsai) → needinfo?(jstutte)

This bug wanted to talk about one special case that can cause this. I have not checked if this case is still in the reports, but we cannot really distinguish cases based on this signature, so I would keep all investigations in the other bug. If we find a better way to classify the crashes automatically, we might want to create new bugs. Finding this better way could be part of the investigations in bug 1435343.

Status: NEW → RESOLVED
Closed: 2 years ago
Flags: needinfo?(jstutte)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.