[Fission] Crash in [@ mozilla::ipc::IPDLParamTraits<T>::Read] (Attempt to deserialize absent BrowsingContext)
Categories
(Core :: Storage: localStorage & sessionStorage, defect, P1)
Tracking
()
Fission Milestone | M5 |
Tracking | Status | |
---|---|---|
firefox-esr68 | --- | unaffected |
firefox71 | --- | unaffected |
firefox72 | --- | unaffected |
firefox73 | - | disabled |
firefox74 | + | fixed |
People
(Reporter: jan, Assigned: ytausky)
References
(Regression)
Details
(Keywords: crash, nightly-community, regression)
Crash Data
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
After some hours I clicked on the green message in the main menu to apply an update and instead of restarting, a crash reporter popped up.
This bug is for crash report bp-d07bcfcf-e504-4687-954f-9544a0191214.
MOZ_CRASH(Attempt to deserialize absent BrowsingContext)
Top 10 frames of crashing thread:
0 libxul.so mozilla::ipc::IPDLParamTraits<mozilla::dom::BrowsingContext*>::Read docshell/base/BrowsingContext.cpp:1510
1 libxul.so mozilla::dom::PContentParent::OnMessageReceived ipc/ipdl/PContentParent.cpp:12005
2 libxul.so mozilla::ipc::MessageChannel::DispatchMessage ipc/glue/MessageChannel.cpp:2209
3 libxul.so mozilla::ipc::MessageChannel::RunMessage ipc/glue/MessageChannel.cpp:1973
4 libxul.so nsThread::ProcessNextEvent ipc/glue/MessageChannel.cpp:2004
5 libxul.so <name omitted> xpcom/threads/nsThreadUtils.cpp:486
6 libxul.so mozilla::ipc::MessagePump::Run ipc/glue/MessagePump.cpp:87
7 libxul.so MessageLoop::Run ipc/chromium/src/base/message_loop.cc:290
8 libxul.so nsBaseAppShell::Run widget/nsBaseAppShell.cpp:137
9 libxul.so nsAppStartup::Run toolkit/components/startup/nsAppStartup.cpp:272
Reporter | ||
Comment 1•5 years ago
|
||
This crash spiked. It looks like there was a regression between build 20191213094653 (0 crashes) and 20191213214322 (39 crashes/22 installs):
https://hg.mozilla.org/mozilla-central/firefoxreleases#d1ac49b9eb3enightlylinux6420191213094653
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=d1ac49b9eb3efcc46210bb7ad810c80ba74f7dd7&tochange=f09f24f2b545919ab0db4bd352c276779c58bcc6
Updated•5 years ago
|
Comment 3•5 years ago
|
||
(In reply to Jan Andre Ikenmeyer [:darkspirit] from comment #0)
After some hours I clicked on the green message in the main menu to apply an update and instead of restarting, a crash reporter popped up.
I've hit this crash a few times, and it was in the same circumstance.
Given the unusually high volume on nightly, this is a blocking issue.
Comment 5•5 years ago
|
||
This is not a Fission-specific bug (only 22% of these crash reports have Fission enabled), though Fission does seem to exacerbate this crash signature. Less than 4% of other Nightly crashes have Fission enabled.
Correction: This crash is Fission-specific. Andrew points out (in comment 9 below) that the crash reports with this signature and reason "Attempt to deserialize absent BrowsingContext" are all Fission.
Updated•5 years ago
|
Comment 6•5 years ago
|
||
I looked at 5 of these crashes, and they were all crashing during deserialization of the first argument to the PContent::SessionStorageData message. Two of them were happening when we're in XPCOM shutdown, doing "profile-before-change", but the others weren't.
Comment 7•5 years ago
|
||
Bug 1593246 is in the regression range in comment 0, and it looks like it added calls to SessionStorageData. Jan, maybe you could take a look, with Yaron out on PTO? Thanks.
Updated•5 years ago
|
Updated•5 years ago
|
Comment 8•5 years ago
|
||
SessionStorageManager::SendSessionStorageDataToParentProcess() does guard against the BC being discarded, so we're not hitting any assert on the sending side. Maybe there's some kind of race where the BC goes away entirely in the parent before it is discarded in the child?
Comment 9•5 years ago
|
||
(In reply to Chris Peterson [:cpeterson] from comment #5)
This is not a Fission-specific bug (only 22% of these crash reports have Fission enabled), though Fission does seem to exacerbate this crash signature. Less than 4% of other Nightly crashes have Fission enabled.
Unfortunately [@ mozilla::ipc::IPDLParamTraits<T>::Read ] is a pretty generic signature (which we should improve by adding something to the prefix or skip list, though I don't know how much that will help). If I search for crashes where the crash reason contains "Attempt to deserialize absent BrowsingContext", then 100% of them have Fission enabled. I looked at a few of the ones with that Read thing as a signature that didn't have Fission enabled, and they looked different. So I'd say this particular crash is Fission-specific.
Comment 10•5 years ago
|
||
If this is Fission-only, we don't need to track this for 73.
Reporter | ||
Comment 11•5 years ago
|
||
This crash can also be triggered just by closing tabs.
Comment 12•5 years ago
|
||
Currently the #2 overall signature on 73 nightly.
Comment 13•5 years ago
|
||
This signature is still rather highly on nightly - can we get an update on where we are next week?
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 15•5 years ago
|
||
I'm creating a Pernosco session with a suitable scenario to better understand how shutdown interacts with session storage. Once it's ready I'll try to figure out how the BrowsingContext
can disappear in the parent before the session storage data is received.
Assignee | ||
Comment 16•5 years ago
|
||
:darkspirit, you mentioned it's possible to trigger this by closing tabs; how often can you reproduce this? Does it happen more often in particular websites? So far I didn't manage to reproduce the crash.
Reporter | ||
Comment 17•5 years ago
|
||
Last crash so far was on 2019-12-30: bp-eb863b44-11f3-4a63-b628-057d70191230
Crashing tabs was only possible if I had many inactive tabs and tried to close them by Ctrl+W. The crash happened after closing about 4 tabs or so.
Reporter | ||
Comment 18•5 years ago
|
||
Last crash so far was on 2019-12-30: bp-eb863b44-11f3-4a63-b628-057d70191230
Ha, I should reenable fission... ;)
Updated•5 years ago
|
Comment 19•5 years ago
|
||
[Tracking Requested - why for this release]: This is a Fission-only crash, so I don't think it needs to be tracked for Firefox 74. (There are crashes with this signature on other branches, but they are different issues.)
Comment 20•5 years ago
|
||
(In reply to Yaron Tausky [:ytausky] from comment #16)
:darkspirit, you mentioned it's possible to trigger this by closing tabs; how often can you reproduce this? Does it happen more often in particular websites? So far I didn't manage to reproduce the crash.
I hit this crash 3-4 times a day, but I don't have reliable STR. The crash seems to often happen when I'm switching from Firefox to another application. I have many Google Docs tabs open and sometimes a long-running YouTube tab playing.
Socorro Super Search shows a bunch of random URLs, including about:newtab but also some YouTube and Twitch URLs:
Assignee | ||
Comment 21•5 years ago
|
||
Under some (yet) unclear conditions it's possible for a content
process to send session storage data for a browsing context that's
already been discarded. This leads to an assertion failure when
deserializing the IPC message. This commit works around this issue
by sending the browsing context's ID over IPC and issuing a warning
instead of asserting that the browsing context still exists.
Comment 22•5 years ago
|
||
Assignee | ||
Comment 23•5 years ago
|
||
I'm landing a workaround patch that should stop the crashes, but marking the bug leave-open to investigate why this situation occurs at all.
Comment 24•5 years ago
|
||
We have some other bugs filed about things getting discarded at the wrong time, so maybe this is related to that? kmag has patches up for review in bug 1582832, so maybe those will improve the situation.
Comment 25•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Comment 26•5 years ago
|
||
It looks like the patch did make this crash go away, so I suppose it is more "fixed" than "disabled".
Assignee | ||
Comment 27•5 years ago
|
||
It's still unclear why the crash happened in the first place, but I don't think we'll get to the bottom of this now. Therefore closing.
Updated•5 years ago
|
Description
•