Open Bug 1990708 Opened 1 year ago Updated 3 months ago

Crash in [@ mozilla::dom::InferenceSession::Init]

Categories

(Core :: Machine Learning: General, defect)

Other
Windows 11
defect

Tracking

()

Tracking Status
firefox145 --- affected

People

(Reporter: release-mgmt-account-bot, Unassigned, NeedInfo)

References

(Blocks 1 open bug)

Details

(Keywords: crash)

Crash Data

Crash report: https://crash-stats.mozilla.org/report/index/c87020b5-1058-4947-a737-c92910250920

MOZ_CRASH Reason: MOZ_CRASH(CreateSession error)

Top 10 frames of crashing thread:

0  xul.dll  mozilla::dom::InferenceSession::Init  dom/onnx/InferenceSession.cpp:385
1  xul.dll  mozilla::dom::InferenceSession::Create  dom/onnx/InferenceSession.cpp:285
2  xul.dll  mozilla::dom::InferenceSession_Binding::create  dom/bindings/ONNXBinding.cpp:2314
3  xul.dll  mozilla::dom::StaticMethodPromiseWrapper  dom/bindings/BindingUtils.cpp:3347
4  xul.dll  CallJSNative  js/src/vm/Interpreter.cpp:501
4  xul.dll  js::InternalCallOrConstruct  js/src/vm/Interpreter.cpp:597
4  xul.dll  InternalCall  js/src/vm/Interpreter.cpp:664
4  xul.dll  js::CallFromStack  js/src/vm/Interpreter.cpp:669
4  xul.dll  js::Interpret  js/src/vm/Interpreter.cpp:3287
5  xul.dll  MaybeEnterInterpreterTrampoline  js/src/vm/Interpreter.cpp:395

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

  • First crash report: 2025-09-20
  • Process type: Content
  • Is startup crash: No
  • Has user comments: No
  • Is null crash: No
Component: General → Machine Learning

The severity field is not set for this bug.
:tarek, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(tziade)

The bug is linked to a topcrash signature, which matches the following criterion:

  • Top 10 desktop browser crashes on nightly

For more information, please visit BugBot documentation.

Keywords: topcrash

Please triage this Nightly crash.

Flags: needinfo?(tarek) → needinfo?(tburrell)

I asked claude to look into why the volume is increasing for Nightly since May, hopefully it's helpful:

Volume grew because the audience for InferenceSession grew, not because the failure rate on any individual call spiked. Between May and now, Firefox Nightly added or expanded:

  • Smart Tab Grouping (Bug 2012177 makes it use native)
  • Semantic search over history (Bug 2039131 rolls it out via Nimbus, model can be swapped)
  • Address autofill classification (Bug 2035232, Nightly-only)
  • LLM-based telemetry (Bug 2033537)

Each of those, layered on top of the existing translations and Smart Window consumers, pushes more Nightly users through a code path that MOZ_CRASHes on any CreateSession failure.

The real bug behind the crash

Independent of what's driving volume: MOZ_CRASH("CreateSession error") is the wrong response to a runtime error. If ONNX runtime rejects a model at session-create time, the correct behavior is to reject the JS promise with an appropriate error — not crash the entire content process. Every feature that uses ML would benefit from the fallback code the JS caller already has (best-onnx retries on wasm), but that fallback can't fire because the process is dead first.

See Also: → 2046861

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.

Keywords: topcrash
You need to log in before you can comment on or make changes to this bug.