Closed Bug 1734612 Opened 3 years ago Closed 3 years ago

Startup Crash in [@ mozilla::ScriptPreloader::InitCacheInternal]

Categories

(Core :: JavaScript Engine, defect, P1)

Unspecified
Windows
defect

Tracking

()

RESOLVED FIXED
95 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox-esr91 --- unaffected
firefox92 --- unaffected
firefox93 --- unaffected
firefox94 + fixed
firefox95 + fixed

People

(Reporter: aryx, Assigned: arai)

References

(Regression)

Details

(Keywords: crash, regression)

Crash Data

Attachments

(1 file)

Crash report: https://crash-stats.mozilla.org/report/index/e3259484-a527-4128-b916-504690211007

MOZ_CRASH Reason: MOZ_RELEASE_ASSERT(JS::IsTranscodingBytecodeAligned(scriptData.get()))

Top 10 frames of crashing thread:

0 xul.dll mozilla::ScriptPreloader::InitCacheInternal js/xpconnect/loader/ScriptPreloader.cpp:540
1 xul.dll mozilla::ScriptPreloader::InitCache js/xpconnect/loader/ScriptPreloader.cpp:440
2 xul.dll static mozilla::ScriptPreloader::GetSingleton js/xpconnect/loader/ScriptPreloader.cpp:115
3 xul.dll xpc::InitializeJSContext js/xpconnect/src/nsXPConnect.cpp:99
4 xul.dll XREMain::XRE_mainRun toolkit/xre/nsAppRunner.cpp:5013
5 xul.dll XREMain::XRE_main toolkit/xre/nsAppRunner.cpp:5477
6 xul.dll XRE_main toolkit/xre/nsAppRunner.cpp:5536
7 firefox.exe wmain toolkit/xre/nsWindowsWMain.cpp:138
8 firefox.exe __scrt_common_main_seh /builds/worker/workspace/obj-build/browser/app/d:/agent/_work/1/s/src/vctools/crt/vcstartup/src/startup/exe_common.inl:288
9 kernel32.dll BaseThreadInitThunk 
Flags: needinfo?(mgaudet)
Summary: Crash in [@ mozilla::ScriptPreloader::InitCacheInternal] → Startup Crash in [@ mozilla::ScriptPreloader::InitCacheInternal]
Assignee: nobody → arai.unmht
Status: NEW → ASSIGNED
Flags: needinfo?(mgaudet) → needinfo?(arai.unmht)
Priority: -- → P1

so far I cannot find any case that it doesn't align there, unless we accidentally support module in preloader cache.
I can add more asserts to see if it's file corruption, and if that's the case we can add fallback path.

Flags: needinfo?(arai.unmht)
Depends on: 1734624
Depends on: 1734625

No diagnostic assert hits so far in DevEdition 94.0b4 :(. How practical is a backout if we don't make headway on this soon? We don't want to ship a new startup crash in 94.

Flags: needinfo?(arai.unmht)

Thank you for checking crash reports :)

the above patch replaces the assertion with soft error.
if the unexpected content is found in the cache file, we ignore such content and stop reading from the cache.

Flags: needinfo?(arai.unmht)

Comment on attachment 9245642 [details]
Bug 1734612 - Use soft error and stop reading startup cache file if the content is unexpected. r?tcampbell!

Beta/Release Uplift Approval Request

  • User impact if declined: Startup crash if the cache file is corrupted.
    This has no automated tests or manual tests, since it's basically caused by corrupted file.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This changes assertion to soft error for file corruption case.
    and ignore the remaining of the cache file.
  • String changes made/needed:
Attachment #9245642 - Flags: approval-mozilla-beta?
Pushed by arai_a@mac.com:
https://hg.mozilla.org/integration/autoland/rev/8f3257e6d425
Use soft error and stop reading startup cache file if the content is unexpected. r=tcampbell
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch

Comment on attachment 9245642 [details]
Bug 1734612 - Use soft error and stop reading startup cache file if the content is unexpected. r?tcampbell!

Approved for 94.0b6

Attachment #9245642 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: