Closed
Bug 1135141
Opened 10 years ago
Closed 10 years ago
jsapi-tests fails with JS_GC_ZEAL=2,10
Categories
(Core :: JavaScript: GC, defect)
Core
JavaScript: GC
Tracking
()
RESOLVED
FIXED
mozilla39
Tracking | Status | |
---|---|---|
firefox39 | --- | fixed |
People
(Reporter: terrence, Assigned: terrence)
References
(Blocks 1 open bug)
Details
Attachments
(4 files)
(deleted),
patch
|
jonco
:
review+
terrence
:
checkin+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
terrence
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
terrence
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
jonco
:
review+
|
Details | Diff | Splinter Review |
We seem to get OOM errors when we GC too frequently? Something here smells very fishy.
Jon's build also fails, but in different tests than mine, so this must be a race of some sort. My failures appear to be out of PossiblyOOM, our test code; however, when I print the actual OOM_ static values, they are not such that they could be failing. Upshot, I've got no idea what's going on yet.
Assignee | ||
Comment 1•10 years ago
|
||
As discussed on IRC, the issue here is that, first, off-thread sweeping is running constantly because of the constant GC's and this is resulting in massive, massive fragmentation of the heap. Secondly, in debug builds, compacting keeps the set of empty arenas around for a full GC cycle so that accessing unrelocated pointers will crash.
When we run a second GC immediately after the first LAST_DITCH, this clears the saved, free arenas and the program can finish easily within an 8MiB heap (although still 8x more space than non-zeal because of non-object fragmentation). If, alternatively, we stop background sweeping by waiting on all GCs the fragmentation goes away entirely.
As a halfway point, this patch waits on background sweeping after a LAST_DITCH GC. Jon is going to post a patch that additionally throws away empty arenas on LAST_DITCH GC, which should largely solve the problem. That said, the fragmentation issue does remain, although at a lower level.
Attachment #8567224 -
Flags: review?(jcoppeard)
Comment 2•10 years ago
|
||
Comment on attachment 8567224 [details] [diff] [review]
finish_sweeping_automatically_on_last_ditch-v0.diff
Review of attachment 8567224 [details] [diff] [review]:
-----------------------------------------------------------------
Great. It occurs to me that we probably want this for the MEM_PRESSURE reason too.
Attachment #8567224 -
Flags: review?(jcoppeard) → review+
Comment 3•10 years ago
|
||
Here's the patch, but it doesn't fix all the failures.
Attachment #8567867 -
Flags: review?(terrence)
Comment 4•10 years ago
|
||
Here's a patch to fix a crash in the jsapi-test harness if a test fails due to OOM when creating a global. It makes createGlobal() only update the 'global' member if it succeeds.
Attachment #8567868 -
Flags: review?(terrence)
Comment 5•10 years ago
|
||
In particular testCloneScript fails reliably for me.
Disabling compacting doesn't help, but disabling background sweeping makes it pass.
testGCOutOfMemory also fails in zeal mode 2, and bug 1049440 is already open for that.
Assignee | ||
Updated•10 years ago
|
Attachment #8567867 -
Flags: review?(terrence) → review+
Assignee | ||
Updated•10 years ago
|
Attachment #8567868 -
Flags: review?(terrence) → review+
Assignee | ||
Comment 6•10 years ago
|
||
(In reply to Jon Coppeard (:jonco) from comment #5)
> In particular testCloneScript fails reliably for me.
>
> Disabling compacting doesn't help, but disabling background sweeping makes
> it pass.
The reason we OOM with a high zeal frequency is that the number of allocations between GCs is much much lower than the number of things we can fit on a page. Thus, we necessarily generate a handful of fragmented and unrecoverable pages if we don't allow the mutator to continue allocating from the same page(s) immediately after the GC. I think the right solution here is to wait for background sweeping if we are doing a zeal-induced GC.
> testGCOutOfMemory also fails in zeal mode 2, and bug 1049440 is already open
> for that.
I had forgotten about that bug, or I would have re-used it.
Assignee | ||
Comment 7•10 years ago
|
||
Keywords: leave-open
Assignee | ||
Comment 8•10 years ago
|
||
As discussed and as commented.
Attachment #8568201 -
Flags: review?(jcoppeard)
Assignee | ||
Updated•10 years ago
|
Attachment #8567224 -
Flags: checkin+
Assignee | ||
Comment 9•10 years ago
|
||
(In reply to Terrence Cole [:terrence] from comment #7)
> https://hg.mozilla.org/integration/mozilla-inbound/rev/7332e3a8953a
Oh, this has a green try run, too:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=f8cf97b7ae07
Comment 10•10 years ago
|
||
Updated•10 years ago
|
Attachment #8568201 -
Flags: review?(jcoppeard) → review+
Comment 11•10 years ago
|
||
Assignee | ||
Comment 13•10 years ago
|
||
Keywords: leave-open
Comment 14•10 years ago
|
||
Assignee: nobody → terrence
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox39:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in
before you can comment on or make changes to this bug.
Description
•