Closed Bug 1703481 Opened 5 years ago Closed 5 years ago

Crash in [@ OOM | unknown | js::AutoEnterOOMUnsafeRegion::crash | js::MovableCellHasher<T>::hash]

Categories

(Core :: JavaScript: GC, defect)

defect

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox87 --- unaffected
firefox88 --- wontfix
firefox89 --- wontfix
firefox90 --- fixed

People

(Reporter: aryx, Assigned: jandem)

References

(Regression)

Details

(Keywords: crash, regression)

Crash Data

Attachments

(1 file)

Distribution is ~50% for each of Windows 7 & 10, 80% for 32-bit and 20% for 64-bit. THere are 30-60 crashes per 88 beta version.

Crash report: https://crash-stats.mozilla.org/report/index/d0ab2392-5ce1-4d7b-97ae-b72150210406

MOZ_CRASH Reason: [unhandlable oom] failed to allocate uid

Top 10 frames of crashing thread:

0 libxul.so js::AutoEnterOOMUnsafeRegion::crash js/src/vm/JSContext.cpp:1193
1 libxul.so js::MovableCellHasher<JSObject*>::hash js/src/gc/Barrier.cpp:231
2 libxul.so js::EmptyShape::getInitialShape js/src/vm/Shape.cpp:1979
3 libxul.so js::NewObjectWithGivenTaggedProto js/src/vm/JSObject.cpp:849
4 libxul.so js::CreateThisForFunction js/src/vm/PlainObject.cpp:46
5 libxul.so MaybeCreateThisForConstructor js/src/vm/Interpreter.cpp:324
6 libxul.so js::InternalCallOrConstruct js/src/vm/Interpreter.cpp:541
7 libxul.so InternalConstruct js/src/vm/Interpreter.cpp:627
8 libxul.so js::ConstructFromStack js/src/vm/Interpreter.cpp:670
9 libxul.so js::jit::DoCallFallback js/src/jit/BaselineIC.cpp:1821
Flags: needinfo?(jdemooij)

It's easy to fix this OOM by using hasHash and ensureHash in InitialShapeEntry, but I think that mechanism results in doing the unique-id lookup twice! This code path is pretty hot and I don't think that's worth the overhead.

This is still high enough volume that we should keep it on the radar to fix as soon as possible. That said, it looks unlikely to be for 88 at this point.

I'm looking into this to see if there's a way to fix this OOM without it either affecting performance or becoming really complicated.

This way we only do the duplicate lookup the first time an object is used as prototype.

Assignee: nobody → jdemooij
Status: NEW → ASSIGNED
Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/46f7a204fe42 Ensure proto object has a unique id when setting the IsUsedAsPrototype flag. r=jonco
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch

Jan, is that something we should uplift in RC?

The volume of crashes on nightly seems unchanged after the patch so it is not clear that the issue in beta/release would be fixed by an uplift. Wontfix for 89 as we build our Release Candidate today.

Has Regression Range: --- → yes
Regressions: 1770268
Flags: needinfo?(jdemooij)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: