Assertion failure: inited == hasPrototype(key), at vm/GlobalObject.h:334 with OOM
Categories
(Core :: JavaScript Engine: JIT, defect, P2)
Tracking
()
People
(Reporter: gkw, Assigned: nbp)
References
(Blocks 1 open bug)
Details
(4 keywords, Whiteboard: [fuzzblocker])
Attachments
(4 files, 2 obsolete files)
Reporter | ||
Comment 1•9 years ago
|
||
Comment 2•9 years ago
|
||
Reporter | ||
Comment 3•9 years ago
|
||
Comment 4•9 years ago
|
||
Comment 5•9 years ago
|
||
Comment 6•9 years ago
|
||
Comment 7•9 years ago
|
||
Updated•9 years ago
|
Comment 8•9 years ago
|
||
Reporter | ||
Updated•9 years ago
|
Updated•9 years ago
|
Comment 9•9 years ago
|
||
Comment 11•9 years ago
|
||
Reporter | ||
Comment 12•9 years ago
|
||
Comment 13•9 years ago
|
||
Comment 14•9 years ago
|
||
Comment 16•9 years ago
|
||
Comment 17•9 years ago
|
||
Updated•9 years ago
|
Updated•8 years ago
|
Comment 21•7 years ago
|
||
Reporter | ||
Comment 22•7 years ago
|
||
Comment 23•7 years ago
|
||
Reporter | ||
Comment 24•7 years ago
|
||
Comment 25•7 years ago
|
||
Comment 26•7 years ago
|
||
Updated•6 years ago
|
Comment 28•6 years ago
|
||
Updated•6 years ago
|
Reporter | ||
Comment 29•6 years ago
|
||
I can't seem to reproduce the testcase in comment 17 anymore - bisecting the fix to:
autobisectjs shows this is probably related to the following changeset:
The first good revision is:
changeset: https://hg.mozilla.org/mozilla-central/rev/40993c0bdc7a
user: Jan de Mooij
date: Tue May 08 15:05:41 2018 +0200
summary: Bug 1459258 - Improve InlineMap OOM testing and fix some issues. r=jonco
Jan, I don't suppose this may be the fix?
Comment 30•6 years ago
|
||
(In reply to Gary Kwong [:gkw] [:nth10sd] from comment #29)
Jan, I don't suppose this may be the fix?
No, it likely just requires a different testcase to trigger this. Do you happen to have one? :)
Reporter | ||
Comment 31•6 years ago
|
||
Nope, but we'll hope a new one shows up.
Comment 32•6 years ago
|
||
Updated•6 years ago
|
Updated•3 years ago
|
Comment 35•2 years ago
|
||
In the process of migrating remaining bugs to the new severity system, the severity for this bug cannot be automatically determined. Please retriage this bug using the new severity system.
Assignee | ||
Comment 36•2 years ago
|
||
Checking today, this bug still exists.
Assignee | ||
Comment 37•2 years ago
|
||
This bug came up as the oomTest
function attempt to resume the initialization
of the global after encountering a first failure. We are forced to keep the
field initialization as it is checked during the initialization process and
might be even more convoluted to work around it.
This patch approach this re-entry issue by discarding the already initialized
fields in case of failure, thus restoring the state of the global object
builtins. The prototype and constructor object allocated would no longer be
referenced and would be trashed by the next garbage collection.
Updated•2 years ago
|
Comment 38•2 years ago
|
||
The severity field for this bug is relatively low, S4. However, the bug has 5 duplicates.
:nbp, could you consider increasing the bug severity?
For more information, please visit auto_nag documentation.
Assignee | ||
Comment 39•2 years ago
|
||
(In reply to Release mgmt bot [:suhaib / :marco/ :calixte] from comment #38)
The severity field for this bug is relatively low, S4. However, the bug has 5 duplicates.
:nbp, could you consider increasing the bug severity?
No, because this spans 7 years of fuzzing activity, and this bug is not blocking fuzzers.
The severity field defines how users are impacted, and in this case our users are most likely never impacted by this bug.
Comment 40•2 years ago
|
||
The last needinfo from me was triggered in error by recent activity on the bug. I'm clearing the needinfo since this is a very old bug and I don't know if it's still relevant.
Comment 42•2 years ago
|
||
This is an automated crash issue comment:
Summary: Assertion failure: inited == hasPrototype(key), at /js/src/vm/GlobalObject.h:414
Build version: mozilla-central revision 20220713-3c4cd53e0604
Build flags:
Runtime options: --fuzzing-safe --ion-offthread-compile=off test.js
Testcase:
a = evalcx('lazy')
oomTest(() => a < 0)
Backtrace:
received signal SIGSEGV, Segmentation fault.
0x57c70a2f in js::GlobalObject::classIsInitialized(JSProtoKey) const ()
#0 0x57c70a2f in js::GlobalObject::classIsInitialized(JSProtoKey) const ()
#1 0x57cc1646 in js::GlobalObject::getOrCreateObjectPrototype(JSContext*, JS::Handle<js::GlobalObject*>) ()
#2 0x581ea217 in JS_ResolveStandardClass(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::PropertyKey>, bool*) ()
#3 0x57b90383 in sandbox_resolve(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::PropertyKey>, bool*) ()
#4 0x57f27086 in bool js::NativeLookupOwnPropertyInline<(js::AllowGC)1, (js::LookupResolveMode)1>(JSContext*, js::MaybeRooted<js::NativeObject*, (js::AllowGC)1>::HandleType, js::MaybeRooted<JS::PropertyKey, (js::AllowGC)1>::HandleType, js::PropertyResult*) ()
#5 0x57f2cebc in bool NativeGetPropertyInline<(js::AllowGC)1>(JSContext*, js::MaybeRooted<js::NativeObject*, (js::AllowGC)1>::HandleType, js::MaybeRooted<JS::Value, (js::AllowGC)1>::HandleType, js::MaybeRooted<JS::PropertyKey, (js::AllowGC)1>::HandleType, IsNameLookup, js::MaybeRooted<JS::Value, (js::AllowGC)1>::MutableHandleType) ()
#6 0x57f2ce1b in js::NativeGetProperty(JSContext*, JS::Handle<js::NativeObject*>, JS::Handle<JS::Value>, JS::Handle<JS::PropertyKey>, JS::MutableHandle<JS::Value>) ()
#7 0x57b95630 in js::GetProperty(JSContext*, JS::Handle<JSObject*>, JS::Handle<JSObject*>, JS::Handle<JS::PropertyKey>, JS::MutableHandle<JS::Value>) ()
#8 0x57ee3b62 in MaybeCallMethod(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::PropertyKey>, JS::MutableHandle<JS::Value>) ()
#9 0x57ee35b6 in JS::OrdinaryToPrimitive(JSContext*, JS::Handle<JSObject*>, JSType, JS::MutableHandle<JS::Value>) ()
#10 0x57ee40cd in js::ToPrimitiveSlow(JSContext*, JSType, JS::MutableHandle<JS::Value>) ()
#11 0x57cc84f1 in Interpret(JSContext*, js::RunState&) ()
#12 0x57cc4179 in js::RunScript(JSContext*, js::RunState&) ()
#13 0x57cd7bb3 in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) ()
#14 0x57cd91cc in InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) ()
#15 0x57cd939e in js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) ()
#16 0x57deb264 in JS_CallFunction(JSContext*, JS::Handle<JSObject*>, JS::Handle<JSFunction*>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) ()
#17 0x5815557b in IterativeFailureTest::testIteration(unsigned int, unsigned int, bool&, JS::MutableHandle<JS::Value>) ()
#18 0x5815528e in IterativeFailureTest::testThread(unsigned int) ()
#19 0x581548ec in RunIterativeFailureTest(JSContext*, JS::CallArgs const&, IterativeFailureTest::FailureSimulator&) ()
#20 0x5816a730 in OOMTest(JSContext*, unsigned int, JS::Value*) ()
#21 0x57cd84a1 in CallJSNative(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), js::CallReason, JS::CallArgs const&) ()
[...]
#33 0x57b48210 in main ()
eax 0x567d7c74 1451064436
ebx 0x592061b4 1495294388
ecx 0x59207c9c 1495301276
edx 0xf7badcc7 -138748729
esi 0x1 1
edi 0x0 0
ebp 0xfffb3b78 4294654840
esp 0xfffb3b60 4294654816
eip 0x57c70a2f <js::GlobalObject::classIsInitialized(JSProtoKey) const+223>
=> 0x57c70a2f <_ZNK2js12GlobalObject18classIsInitializedE10JSProtoKey+223>: movl $0x19e,0x0
0x57c70a39 <_ZNK2js12GlobalObject18classIsInitializedE10JSProtoKey+233>: call 0x57bd373f <abort>
Comment 43•2 years ago
|
||
Comment 44•2 years ago
|
||
Comment 45•2 years ago
|
||
Fwiw, I did some checks in our system and apparently this bug is not only active but it is one of the most frequent bugs hit in fuzzing. We should consider fixing this if possible.
Updated•2 years ago
|
Comment 46•2 years ago
|
||
This bug prevents fuzzing from making progress; however, it has low severity. It is important for fuzz blocker bugs to be addressed in a timely manner (see here why?).
:nbp, could you increase the severity?
For more information, please visit auto_nag documentation.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 47•2 years ago
|
||
Object and Function prototype initialization is stateful, and mutate the global
as it is initializing the content of the Global. Attempts at making this process
transactional was not successful.
Thus, JSProto_Object
and JSProto_Function
are now initialized as part of the
Global creation.
Failures to initialize the global might lead to have a Realm with a partially
initialized global. Such realm appears to have a valid global using
hasLiveGlobal()
. When catching failures, such global might still be used
despite being partially initialized. A new field initializingGlobal_
is added
to Realm
to track whether the global is live or not. Failures to comply with
this requirement would cause the garbage collector to reclaim the Realm and
global in case of failure. This should be avoided during the initialization as
the global is rooted by the GlobalObject::new_
function.
Comment 48•2 years ago
|
||
Comment 49•2 years ago
|
||
Backed out for causing SM bustages.
Backout link: https://hg.mozilla.org/integration/autoland/rev/98bd6837a642b704333c59824d19b17ce1509a19
Failure log: https://treeherder.mozilla.org/logviewer?job_id=397940734&repo=autoland&lineNumber=12843
Comment 50•2 years ago
|
||
bugherder |
Updated•2 years ago
|
Updated•2 years ago
|
Comment 51•2 years ago
|
||
This was immediately backed out, so it shouldn't be marked FIXED, AFAICT.
Updated•2 years ago
|
Updated•2 years ago
|
Comment 52•2 years ago
|
||
(In reply to Andrew McCreight [:mccr8] from comment #51)
This was immediately backed out, so it shouldn't be marked FIXED, AFAICT.
It seems landed from comment 50? Also searchfox knows these changes.
Assignee | ||
Comment 53•2 years ago
|
||
(In reply to Jens Stutte [:jstutte] from comment #52)
(In reply to Andrew McCreight [:mccr8] from comment #51)
This was immediately backed out, so it shouldn't be marked FIXED, AFAICT.
It seems landed from comment 50? Also searchfox knows these changes.
It has landed once more after being backed out for missing annotations in the test cases that it landed with.
Additional patches are now dependent on this change, and additional fixes are on their way to landing too.
Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
Description
•