Assertion failure: CurrentThreadIsGCMarking() || CurrentThreadCanAccessZone(zone), at /js/src/gc/Cell.h:463 with FinalizationRegistry
Categories
(Core :: JavaScript Engine, defect, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox-esr128 | --- | unaffected |
| firefox-esr140 | --- | unaffected |
| firefox142 | --- | unaffected |
| firefox143 | --- | unaffected |
| firefox144 | + | verified |
People
(Reporter: decoder, Assigned: jonco)
References
(Blocks 1 open bug, Regression)
Details
(5 keywords, Whiteboard: [bugmon:update,bisected,confirmed])
Attachments
(2 files, 1 external file)
The following testcase crashes on mozilla-central revision 20250908-3927f21c92c9 (debug build, run with --fuzzing-safe --ion-offthread-compile=off --enable-symbols-as-weakmap-keys):
evalInWorker(`
function a() {}
b = function() {}
c = new FinalizationRegistry(b)
a(c.register(Symbol.hasInstance) )
`)
Backtrace:
received signal SIGSEGV, Segmentation fault.
#0 0x0000555556eede88 in js::gc::TenuredCell::zone() const ()
#1 0x000055555797d219 in js::gc::GCRuntime::registerWithFinalizationRegistry(JSContext*, JS::Handle<JS::Value>, JS::Handle<js::FinalizationRecordObject*>) ()
#2 0x00005555570de18b in js::FinalizationRegistryObject::register_(JSContext*, unsigned int, JS::Value*) ()
#3 0x000055555704ecb5 in CallJSNative(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), js::CallReason, JS::CallArgs const&) ()
#4 0x000055555704e3c0 in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) ()
#5 0x0000555557062239 in js::Interpret(JSContext*, js::RunState&) ()
#6 0x000055555704d934 in js::RunScript(JSContext*, js::RunState&) ()
#7 0x0000555557050f41 in js::ExecuteKernel(JSContext*, JS::Handle<JSScript*>, JS::Handle<JSObject*>, js::AbstractFramePtr, JS::MutableHandle<JS::Value>) ()
#8 0x000055555705152f in js::Execute(JSContext*, JS::Handle<JSScript*>, JS::Handle<JSObject*>, JS::MutableHandle<JS::Value>) ()
#9 0x00005555571a05d2 in ExecuteScript(JSContext*, JS::Handle<JSObject*>, JS::Handle<JSScript*>, JS::MutableHandle<JS::Value>) ()
#10 0x00005555571a03e0 in JS_ExecuteScript(JSContext*, JS::Handle<JSScript*>, JS::MutableHandle<JS::Value>) ()
#11 0x0000555556f1f78a in WorkerMain(std::unique_ptr<WorkerInput, JS::DeletePolicy<WorkerInput> >) ()
#12 0x0000555556f1fcfa in js::detail::ThreadTrampoline<void (&)(std::unique_ptr<WorkerInput, JS::DeletePolicy<WorkerInput> >), std::unique_ptr<WorkerInput, JS::DeletePolicy<WorkerInput> > >::Start(void*) ()
#13 0x0000555556f7a6ad in set_alt_signal_stack_and_start(PthreadCreateParams*) ()
rax 0x0 0
rbx 0x7ffff4248000 140737289420800
rcx 0x1cf 463
rdx 0x7ffff7804563 140737345766755
rsi 0x0 0
rdi 0x7ffff7805700 140737345771264
rbp 0x7ffff4bfe160 140737299603808
rsp 0x7ffff4bfe150 140737299603792
r8 0x0 0
r9 0x3 3
r10 0x0 0
r11 0x293 659
r12 0x7ffff4bfe1e0 140737299603936
r13 0x7ffff4bfe248 140737299604040
r14 0x7ffff4bfe1e0 140737299603936
r15 0x7ffff4bfe230 140737299604016
rip 0x555556eede88 <js::gc::TenuredCell::zone() const+280>
=> 0x555556eede88 <_ZNK2js2gc11TenuredCell4zoneEv+280>: mov %rcx,(%rax)
0x555556eede8b <_ZNK2js2gc11TenuredCell4zoneEv+283>: call 0x555556f673e0 <abort>
| Reporter | ||
Comment 1•1 year ago
|
||
| Reporter | ||
Comment 2•1 year ago
|
||
| Reporter | ||
Comment 3•1 year ago
|
||
Very similar and with same assertion:
evalInWorker(` new WeakRef(Symbol.hasInstance)`)
Comment 4•1 year ago
|
||
Verified bug as reproducible on mozilla-central 20250908082214-3927f21c92c9.
The bug appears to have been introduced in the following build range:
Start: 9786291f3312a108c81c8ef5ce0bde18fdc4e6af (20250905010130)
End: 9e06db4da20903f3daed4e3295ad8ac2f990984d (20250904082226)
Pushlog: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=9786291f3312a108c81c8ef5ce0bde18fdc4e6af&tochange=9e06db4da20903f3daed4e3295ad8ac2f990984d
Comment 5•1 year ago
|
||
Bug 1863140 seems like the obvious choice for a regressor from that range.
Comment 6•1 year ago
|
||
Set release status flags based on info from the regressing bug 1863140
| Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
| Assignee | ||
Comment 7•1 year ago
|
||
Well known symbols are a problem for finalization tracking because we are not
able to safely access their zone if they are in the shared atoms zone.
The spec says we don't need to bother though as they are likely never to be
collected. So we can skip tracking these targets.
Comment 9•1 year ago
|
||
Updated•1 year ago
|
Updated•1 year ago
|
Comment 10•1 year ago
|
||
Verified bug as fixed on rev mozilla-central 20250910212829-11b5377f9bfc.
Removing bugmon keyword as no further action possible. Please review the bug and re-add the keyword for further analysis.
Updated•7 months ago
|
Description
•