Closed Bug 1988655 Opened 1 year ago Closed 29 days ago

Crash in [@ JS::loader::ModuleLoaderBase::FinishLoadingImportedModule]

Categories

(Core :: JavaScript Engine, defect, P3)

ARM64
All
defect

Tracking

()

RESOLVED FIXED
157 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr140 --- unaffected
firefox-esr153 --- wontfix
firefox143 --- wontfix
firefox144 --- wontfix
firefox145 --- wontfix
firefox155 --- wontfix
firefox156 --- wontfix
firefox157 --- fixed

People

(Reporter: release-mgmt-account-bot, Assigned: allstars.chh)

References

(Blocks 2 open bugs, Regression)

Details

(Keywords: crash, regression)

Crash Data

Attachments

(2 files)

Crash report: https://crash-stats.mozilla.org/report/index/9b2a297b-df11-4a36-b3ba-cc5570250915

MOZ_CRASH Reason: MOZ_CRASH(JS::FinishLoadingImportedModule(aCx, referrer, moduleReqObj, payload, module, usePromise))

Top 10 frames of crashing thread:

0  XUL  MOZ_CrashSequence  mfbt/Assertions.h:253
0  XUL  JS::loader::ModuleLoaderBase::FinishLoadingImportedModule  js/loader/ModuleLoaderBase.cpp:329
1  XUL  JS::loader::ModuleLoaderBase::ProcessDynamicImport  js/loader/ModuleLoaderBase.cpp:1531
2  XUL  JS::loader::ModuleLoadRequest::ProcessDynamicImport  js/loader/ModuleLoadRequest.h:113
2  XUL  mozilla::dom::ScriptLoader::ProcessRequest  dom/script/ScriptLoader.cpp:2396
3  XUL  mozilla::dom::ScriptLoader::ProcessPendingRequests  dom/script/ScriptLoader.cpp
4  XUL  mozilla::dom::ScriptLoader::DeferCheckpointReached  dom/script/ScriptLoader.cpp:4582
4  XUL  nsContentSink::DidBuildModelImpl  dom/base/nsContentSink.cpp:838
5  XUL  nsHtml5TreeOpExecutor::DidBuildModel  parser/html/nsHtml5TreeOpExecutor.cpp:190
6  XUL  nsHtml5TreeOpExecutor::RunFlushLoop  parser/html/nsHtml5TreeOpExecutor.cpp:692

By querying Nightly crashes reported within the last 2 months, here are some insights about the signature:

  • First crash report: 2025-08-13
  • Process type: Content
  • Is startup crash: No
  • Has user comments: No
  • Is null crash: Yes - 3 out of 4 crashes happened on null or near null memory address

The Bugbug bot thinks this bug should belong to the 'Core::JavaScript Engine' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: General → JavaScript Engine

Sort of awkward because I think this will also crash like this on OOM.

Flags: needinfo?(allstars.chh)
Blocks: sm-modules
Severity: -- → S3
Priority: -- → P3
Assignee: nobody → allstars.chh
Flags: needinfo?(allstars.chh)

Regressed by bug 1980126 which added MOZ_ALWAYS_TRUE() instead of ignoring the return value.

URL: 1980126
URL: 1980126
Keywords: regression
Regressed by: 1980126

Set release status flags based on info from the regressing bug 1980126

This is probably OOM and it's not clear the best way to handle it here.

The test case causes JS::FinishLoadingImportedModule to fail at iteration 85.

Currently this prevents the promise from being fulfilled and the test case hangs.

The Gecko policy to to crash on OOM. Therefore we should call mozalloc_handle_oom or mozalloc_abort here to crash and report the failure as OOM.

Attachment #9631516 - Attachment description: Bug 1988655 - Handle OOM in FinishLoadingImportedModule. r?jonco! → Bug 1988655 - Handle OOM and uncatchable exception in FinishLoadingImportedModule. r?jonco!
Status: NEW → RESOLVED
Closed: 29 days ago
Resolution: --- → FIXED
Target Milestone: --- → 157 Branch
QA Whiteboard: [qa-triage-done-c158/b157]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: