Closed
Bug 847579
Opened 11 years ago
Closed 9 years ago
GC: make testGCOutOfMemory more reliable
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla38
People
(Reporter: terrence, Assigned: sfink)
References
Details
Attachments
(3 files, 1 obsolete file)
1.38 KB,
patch
|
Details | Diff | Splinter Review | |
1.14 KB,
patch
|
terrence
:
review+
|
Details | Diff | Splinter Review |
2.46 KB,
patch
|
terrence
:
review+
|
Details | Diff | Splinter Review |
This test counts how many objects it can allocate, then GC's, then asserts that it can safely allocate max/4 objects. If we increase the max heap size to 2MiB from 512KiB, then the test normally fails. If we insert a few milliseconds of sleep after doing the GC then the test succeeds again. The problem is that the background sweeping may still be running when we start trying to allocate again. This is currently masked by the fact that the heap limit it sets is very close to the starting limit such that max/4 is extremely small and likely to fit in the foreground finalized things. This patch simply triggers a second GC after the first to force us to wait for background finalization to finish. We should probably make the mechanism more robust, but the tree is closed and this is needed now, now, now.
Attachment #720860 -
Flags: review?(wmccloskey)
Reporter | ||
Comment 1•11 years ago
|
||
Comment on attachment 720860 [details] [diff] [review] v0 Bill pointed out in IRC that refillFreeList will block on the background finalizer for us, so this isn't actually the problem. I also don't see this anymore working off of tip instead of the GGC. The allocation paths should be the same between the two builds after we hit the threshold the first time, so I need to figure out what is going wrong there first. Will re-request after I figure out what is happening.
Attachment #720860 -
Flags: review?(wmccloskey)
Assignee | ||
Comment 2•11 years ago
|
||
Attachment #720911 -
Flags: review?(terrence)
Assignee | ||
Updated•11 years ago
|
Assignee: terrence → sphink
Assignee | ||
Comment 3•11 years ago
|
||
The failure is in the second EVAL(), which means JS_EvaluateScript() is returning false.
Attachment #720922 -
Flags: review?(terrence)
Assignee | ||
Updated•11 years ago
|
Attachment #720911 -
Attachment is obsolete: true
Attachment #720911 -
Flags: review?(terrence)
Assignee | ||
Comment 4•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/d14e44a6619d (r=terrence via IRC)
Comment 5•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/d14e44a6619d
Reporter | ||
Updated•11 years ago
|
Attachment #720922 -
Flags: review?(terrence) → review+
Assignee | ||
Comment 6•9 years ago
|
||
This bug was [leave-open] because it was a "temporary" test disable. I tracked down what was happening and left a big comment describing what was going on. Note that I don't fully understand the test case. Eg, why does it need to explicitly wipe out 'array' with "array = []; array.push(0);"? It should be dead after the OOM exception anyway. Then again, why does it not seem to free memory with the JS_GC() call? Oh well.
Attachment #8549960 -
Flags: review?(terrence)
Reporter | ||
Comment 7•9 years ago
|
||
Comment on attachment 8549960 [details] [diff] [review] Re-enable testGCOutOfMemory Review of attachment 8549960 [details] [diff] [review]: ----------------------------------------------------------------- Most excellent!
Attachment #8549960 -
Flags: review?(terrence) → review+
Assignee | ||
Comment 8•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/fc089bc9d516
https://hg.mozilla.org/mozilla-central/rev/fc089bc9d516
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in
before you can comment on or make changes to this bug.
Description
•