Intermittent Windows 10 xpcshell crashes in NS_DispatchToMainThread
Categories
(Core :: Networking, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox73 | --- | fixed |
People
(Reporter: gbrown, Assigned: valentin)
References
Details
(Whiteboard: [necko-triaged])
Crash Data
Attachments
(1 file)
I notice there are a lot of recent xpcshell test failures affecting various tests which involve a crash in NS_DispatchToMainThread.
We seem to be hitting an assertion at
nsCOMPtr<nsIThread> thread;
nsresult rv = NS_GetMainThread(getter_AddRefs(thread));
if (NS_WARN_IF(NS_FAILED(rv))) {
NS_ASSERTION(false,
"Failed NS_DispatchToMainThread() in shutdown; leaking");
![]() |
Reporter | |
Comment 2•5 years ago
|
||
It looks like these are all on Windows 10.
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=281112605&repo=autoland&lineNumber=2098
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=281096414&repo=autoland&lineNumber=2122
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=280578062&repo=autoland&lineNumber=2221
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=281112605&repo=autoland&lineNumber=2098
![]() |
||
Comment 3•5 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=1603840 has the clearest assertion stack, which shows that something is going wrong in nsNotifyAddrListener::NotifyObservers
, probably dispatching tasks well after shutdown has completed.
https://bugzilla.mozilla.org/show_bug.cgi?id=1601674 has roughly the same stack.
Other bugs have garbage for stacks, but e.g. https://bugzilla.mozilla.org/show_bug.cgi?id=1592769 has RtlpHpSegPageRangeShrink
in the stack, which bug 1603840 does too. I'm going to venture that all of these would be fixed by making nsNotifyAddrListener
not dispatch tasks after xpcom-shutdown-threads
or thereabouts.
![]() |
||
Updated•5 years ago
|
![]() |
Reporter | |
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 5•5 years ago
|
||
Comment 7•5 years ago
|
||
bugherder |
![]() |
Reporter | |
Comment 11•5 years ago
|
||
Thanks Valentin. Your change appears to have stopped the frequent crashes.
However, I noticed one crash that looks very similar and happened well after your fix landed:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=281980567&repo=autoland&lineNumber=2069
I haven't seen any others / not sure if it's worth follow-up...just pointing it out.
Assignee | ||
Comment 12•5 years ago
|
||
(In reply to Geoff Brown [:gbrown] from comment #11)
Thanks Valentin. Your change appears to have stopped the frequent crashes.
However, I noticed one crash that looks very similar and happened well after your fix landed:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=281980567&repo=autoland&lineNumber=2069
I haven't seen any others / not sure if it's worth follow-up...just pointing it out.
patched_BaseThreadInitThunk(int, void*, void*) [WindowsDllBlocklist.cpp:23220e6aef9d9290cb4d1b40d435145f979e962c : 582 + 0x
It looks like the blocklist is creating a thread after shutdown?
I think that's a different bug.
Updated•5 years ago
|
Comment 13•5 years ago
|
||
Hi Valentin, is there anything that QA can help with here? And if so, could you provide us with STR? Thanks!
Assignee | ||
Comment 14•5 years ago
|
||
(In reply to Catalin Sasca, QA [:csasca] from comment #13)
Hi Valentin, is there anything that QA can help with here? And if so, could you provide us with STR? Thanks!
I doubt there's a way to manually reproduce this.
Description
•