Closed
Bug 1471949
Opened 8 years ago
Closed 8 years ago
Assertion failure: backgroundSweepZones.ref().isEmpty(), at js/src/gc/GC.cpp:3609 with OOM
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla63
| Tracking | Status | |
|---|---|---|
| firefox-esr52 | --- | unaffected |
| firefox-esr60 | --- | unaffected |
| firefox61 | --- | unaffected |
| firefox62 | --- | unaffected |
| firefox63 | --- | fixed |
People
(Reporter: decoder, Assigned: jonco)
References
Details
(4 keywords, Whiteboard: [jsbugmon:update])
Attachments
(1 file)
|
5.71 KB,
patch
|
sfink
:
review+
|
Details | Diff | Splinter Review |
The following testcase crashes on mozilla-central revision e5fd22d48987 (build with --enable-posix-nspr-emulation --enable-valgrind --enable-gczeal --disable-tests --disable-profiling --enable-debug --enable-optimize, run with --fuzzing-safe --ion-offthread-compile=off min.js):
if (!(gczeal(15)))
oomAfterAllocations(5)
gcslice(11);
Backtrace:
received signal SIGSEGV, Segmentation fault.
0x0000000000f09af8 in js::gc::GCRuntime::assertBackgroundSweepingFinished (this=this@entry=0x7ffff5f19710) at js/src/gc/GC.cpp:3609
#0 0x0000000000f09af8 in js::gc::GCRuntime::assertBackgroundSweepingFinished (this=this@entry=0x7ffff5f19710) at js/src/gc/GC.cpp:3609
#1 0x0000000000f1af70 in js::gc::GCRuntime::sweepZones (this=this@entry=0x7ffff5f19710, fop=fop@entry=0x7fffffffe000, destroyingRuntime=destroyingRuntime@entry=false) at js/src/gc/GC.cpp:3904
#2 0x0000000000f3a77b in js::gc::GCRuntime::incrementalCollectSlice (this=this@entry=0x7ffff5f19710, budget=..., reason=reason@entry=JS::gcreason::API, session=...) at js/src/gc/GC.cpp:7231
#3 0x0000000000f3b965 in js::gc::GCRuntime::gcCycle (this=this@entry=0x7ffff5f19710, nonincrementalByAPI=nonincrementalByAPI@entry=false, budget=..., reason=reason@entry=JS::gcreason::API) at js/src/gc/GC.cpp:7531
#4 0x0000000000f3c10d in js::gc::GCRuntime::collect (this=this@entry=0x7ffff5f19710, nonincrementalByAPI=nonincrementalByAPI@entry=false, budget=..., reason=reason@entry=JS::gcreason::API) at js/src/gc/GC.cpp:7705
#5 0x0000000000f3cc71 in js::gc::GCRuntime::finishGC (this=0x7ffff5f19710, reason=reason@entry=JS::gcreason::API) at js/src/gc/GC.cpp:7819
#6 0x0000000000f3d89f in JS::FinishIncrementalGC (cx=cx@entry=0x7ffff5f17000, reason=reason@entry=JS::gcreason::API) at js/src/gc/GC.cpp:8661
#7 0x0000000000f3d8c7 in js::gc::FinishGC (cx=cx@entry=0x7ffff5f17000) at js/src/gc/GC.cpp:7988
#8 0x000000000044451b in CancelOffThreadJobsForRuntime (cx=0x7ffff5f17000) at js/src/shell/js.cpp:411
#9 main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at js/src/shell/js.cpp:9407
rax 0x0 0
rbx 0x7fffffffdec0 140737488346816
rcx 0x7ffff6c212dd 140737333301981
rdx 0x0 0
rsi 0x7ffff6ef0770 140737336248176
rdi 0x7ffff6eef540 140737336243520
rbp 0x7fffffffdf10 140737488346896
rsp 0x7fffffffdeb0 140737488346800
r8 0x7ffff6ef0770 140737336248176
r9 0x7ffff7fe4780 140737354024832
r10 0x58 88
r11 0x7ffff6b977a0 140737332737952
r12 0x7ffff5f19710 140737319638800
r13 0x7fffffffdeb8 140737488346808
r14 0x7ffff5f19790 140737319638928
r15 0x7ffff5f19000 140737319636992
rip 0xf09af8 <js::gc::GCRuntime::assertBackgroundSweepingFinished()+504>
=> 0xf09af8 <js::gc::GCRuntime::assertBackgroundSweepingFinished()+504>: movl $0x0,0x0
0xf09b03 <js::gc::GCRuntime::assertBackgroundSweepingFinished()+515>: ud2
Updated•8 years ago
|
Whiteboard: [jsbugmon:update,bisect] → [jsbugmon:update]
Comment 1•8 years ago
|
||
JSBugMon: Bisection requested, result:
=== Treeherder Build Bisection Results by autoBisect ===
The "bad" changeset has the timestamp "20150917010649" and the hash "13046b64bc825bd87963c5c69dd60550622e26f8".
The "good" changeset has the timestamp "20150921151939" and the hash "bfb0223e309336ced37770e5ce235bc68caf4acd".
Likely fix window: https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=13046b64bc825bd87963c5c69dd60550622e26f8&tochange=bfb0223e309336ced37770e5ce235bc68caf4acd
| Assignee | ||
Comment 2•8 years ago
|
||
This is probably a result of my changes in bug 1469640. I'll look into it next week when I'm back from PTO if no one else gets to it first.
| Assignee | ||
Comment 3•8 years ago
|
||
The problem was that after my previous changes we didn't handle OOM starting the background sweep thread. This also adds a couple of MOZ_ALWAYS_USEs to GCParallelTask and renames GCRuntime::startBackgroundAllocTaskIfIdle to tryStartBackgroundAllocTaskIfIdle to indicate that it might not succeed.
Assignee: nobody → jcoppeard
Attachment #8989381 -
Flags: review?(sphink)
Comment 4•8 years ago
|
||
Comment on attachment 8989381 [details] [diff] [review]
bug1471949-bg-sweep-oom
Review of attachment 8989381 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/gc/Allocator.cpp
@@ +352,5 @@
>
> // /////////// Arena -> Thing Allocator //////////////////////////////////////
>
> void
> +GCRuntime::tryStartBackgroundAllocTaskIfIdle()
It would make sense to me for this to return a (non-MOZ_MUST_USE) bool, documented in the header to mean that it failed to start. (I would expect it to return true if it's already running.)
Attachment #8989381 -
Flags: review?(sphink) → review+
| Assignee | ||
Comment 5•8 years ago
|
||
(In reply to Steve Fink [:sfink] [:s:] from comment #4)
> It would make sense to me for this to return a (non-MOZ_MUST_USE) bool,
> documented in the header to mean that it failed to start. (I would expect it
> to return true if it's already running.)
OK I'll do that.
Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/777029266bf7
Handle OOM starting background sweep task r=sfink
Comment 7•8 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Updated•8 years ago
|
status-firefox61:
--- → unaffected
status-firefox62:
--- → unaffected
status-firefox-esr52:
--- → unaffected
status-firefox-esr60:
--- → unaffected
Flags: in-testsuite+
You need to log in
before you can comment on or make changes to this bug.
Description
•