Crash in [@ mozilla::GlobalStyleSheetCache::LoadSheetFromSharedMemory]
Categories
(Core :: Layout, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox119 | --- | unaffected |
| firefox120 | --- | unaffected |
| firefox121 | --- | wontfix |
| firefox122 | --- | wontfix |
| firefox123 | --- | wontfix |
| firefox124 | --- | affected |
People
(Reporter: cpeterson, Unassigned)
Details
(Keywords: crash)
Crash Data
This might be a regression in 121. There are 45 crash reports from 2 installs of Firefox Android build ID 20231031093058.
Crash report: https://crash-stats.mozilla.org/report/index/c1f8dbe3-303c-4162-bbca-cde4c0231102
MOZ_CRASH Reason: MOZ_DIAGNOSTIC_ASSERT(false) (NS_SUCCEEDED(NS_NewURI(getter_AddRefs(uri), aURL)))
Top 10 frames of crashing thread:
0 libxul.so mozilla::GlobalStyleSheetCache::LoadSheetFromSharedMemory layout/style/GlobalStyleSheetCache.cpp:290
1 libxul.so mozilla::GlobalStyleSheetCache::GlobalStyleSheetCache layout/style/UserAgentStyleSheetList.h:23
1 libxul.so mozilla::GlobalStyleSheetCache::Singleton layout/style/GlobalStyleSheetCache.cpp:429
2 libxul.so mozilla::dom::Document::FillStyleSetUserAndUASheets dom/base/Document.cpp:3144
2 libxul.so mozilla::dom::Document::FillStyleSet dom/base/Document.cpp:3201
2 libxul.so mozilla::dom::Document::CreatePresShell dom/base/Document.cpp:6952
3 libxul.so nsDocumentViewer::InitPresentationStuff layout/base/nsDocumentViewer.cpp:702
4 libxul.so nsDocumentViewer::InitInternal layout/base/nsDocumentViewer.cpp:909
5 libxul.so nsDocShell::SetupNewViewer docshell/base/nsDocShell.cpp:8129
5 libxul.so nsDocShell::Embed docshell/base/nsDocShell.cpp:5603
Comment 1•3 years ago
|
||
The bug is linked to a topcrash signature, which matches the following criterion:
- Top 10 AArch64 and ARM crashes on nightly
For more information, please visit BugBot documentation.
Updated•3 years ago
|
Comment 2•3 years ago
|
||
So the only thing I can reasonably think about is a corrupted omnijar of sorts. It's just failing to parse a resource:// URI from our UA stylesheets.
Without the UA stylesheets we can't really continue. We could build them into the binary or something I guess, but...
Updated•3 years ago
|
| Reporter | ||
Comment 3•3 years ago
|
||
Thanks for looking. Let's wait to see if these crashes continue or if they're from just a few users with corrupted installs. We have 104 crash reports from 8 Nightly installs so far, which is pretty low volume for a "top crash".
Comment 4•2 years ago
|
||
(In reply to Chris Peterson [:cpeterson] from comment #3)
Thanks for looking. Let's wait to see if these crashes continue or if they're from just a few users with corrupted installs.
Looks like this continues to just be from a few presumably-corrupted installs. This past week we have 68 crashes, coming from only 3 installations, for example.
Updated•2 years ago
|
Comment 5•2 years ago
|
||
The pattern continues; the past week has 88 crashes, from 4 installs (60 of them from a single install).
cpeterson, what do you think we should do with this?
(In a perfect world we could detect this and toggle a redownload of omnijar or something, but that's probably nontrivial and not robust, and might re-break depending on the source of the corruption, e.g. flaky memory/disk. And maybe every update is effectively a redownload of omnijar anyway?)
Updated•2 years ago
|
| Reporter | ||
Comment 6•2 years ago
|
||
Is the omnijar unpacked at first run after install and updates?
Looks like we have crash reports from many different device models, so this is more than just a couple users with "bad hardware". I wonder why we never saw these GlobalStyleSheetCache::LoadSheetFromSharedMemory() crashes before version 121.0a1. The function name GlobalStyleSheetCache::LoadSheetFromSharedMemory has existed since 2019, so maybe there was an omnijar corruption regression in 121?
The earliest crash report is from build ID 20231122095244 (2023-11-22), followed by crashes from build IDs from every subsequent day: 2023-11-23, 2023-11-24, 2023-11-25, 2023-11-26, and then the reports start skipping a couple days. So if this is a code regression, there is a good chance it landed on 2023-11-20 or 2023-11-21. Someone should review the Gecko and Fenix commit logs for those dates.
Comment 7•2 years ago
•
|
||
(In reply to Chris Peterson [:cpeterson] from comment #6)
Is the omnijar unpacked at first run after install and updates?
Per slack, sounds like this file isn't exactly unpacked, and it's under the control of Android, since it's part of the APK, I think. (which means we can't just redownload it on our own)
nalexander mentioned a known old-ish race condition with omnijar reading, but it's not clear if this hypothetical omnijar corruption might be connected to that or not.
if this is a code regression, there is a good chance it landed on 2023-11-20 or 2023-11-21. Someone should review the Gecko and Fenix commit logs for those dates.
I can't personally commit to being that "someone" and doing a thorough commit-log audit at the moment, but I did take a quick look. Here's the pushlog from 11/19 through 11/22, being a bit broader with the ends of the possible guilty-range (in part because I'm not 100% certain about how the hg.m.o pushlog-query-timezones match against build ID timzeone; I think hg.m.o URLs like the one below use UTC, whereas the build ID is probably PST):
https://hg.mozilla.org/mozilla-central/pushloghtml?startdate=2023-11-19&enddate=2023-11-23
I don't see anything obviously omnijar-related in there, but I do see one commit possibly related to the assert itself in there: bug 1863874, "Don't set the relevant global on stylesheets until sheet is complete" (commit here)
Emilio, is it conceivable that bug 1863874 could've made this LoadSheetFromSharedMemory assertion start firing somehow?
(I do see that we had to paper over a diffferent assertion failure as part of that bug, so I wonder if this one might have some tangential connection to an invariant that bug 1863874 tickled too.
Comment 8•2 years ago
|
||
No, because UA sheets never have, never will have associated globals.
Comment 9•2 years ago
•
|
||
(In reply to Daniel Holbert [:dholbert] from comment #7)
nalexander mentioned a known old-ish race condition with omnijar reading, but it's not clear if this hypothetical omnijar corruption might be connected to that or not.
That omnijar-reading issue is discussed in bug 1675823 comment 19 (and its dependencies), and bug 1639821 comment 97, among other places.
One shot-in-the-dark explanation for why-we-just-started-tripping-this-particular-assertion: maybe there was a subtle change in the contents of omni.ja (a change to size/ordering/included-files somewhere), caused by some benign commit in the pushlog, and that was sufficient to move these UA stylesheets "out of reach" in scenarios where we've got corruption?
Comment 10•2 years ago
|
||
Based on the topcrash criteria, the crash signature linked to this bug is not a topcrash signature anymore.
For more information, please visit BugBot documentation.
Updated•2 years ago
|
Updated•2 years ago
|
Comment 11•1 year ago
|
||
Closing because no crashes reported for 12 weeks.
Description
•