Closed Bug 1568119 Opened 5 years ago Closed 5 years ago

Setup OOM simulation testing for MarkPagesInUse

Categories

(Core :: JavaScript: GC, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: pbone, Assigned: pbone)

References

Details

Attachments

(3 files)

Bug 1564674 makes MarkPagesInUse fallible. Should we setup OOM simulation testing for it? How?

(In reply to Paul Bone [:pbone] from comment #0)

Bug 1564674 makes MarkPagesInUse fallible. Should we setup OOM simulation testing for it? How?

You can add | if (js::oom::ShouldFailWithOOM()) { return false; } | to the start of the function. Then write a test case that causes this function to be called and run it via oomTest(), like this:

https://searchfox.org/mozilla-central/source/js/src/jit-test/tests/gc/bug-1238575-2.js

These tests can take a long time to run so it worth trying to find a minimal test case.

(In reply to Jon Coppeard (:jonco) from comment #1)
Oh, also it depends on what you do if this fails. It you crash then we can't OOM test it because we don't catch crashes.

Assignee: nobody → pbone
Status: NEW → ASSIGNED

There are three cases where this function could OOM:

  • Zeal mode - we want to crash if this OOMs
  • Growing the Nursery - We've added a new test to exercise this code path
  • Disabling the Nursery - Plenty of existing tests seem to cover this
    with OOM testing.

Depends on D39457

Pushed by pbone@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c9abaa7c7e58
Setup OOM simulation testing for MarkPagesInUseHard r=jonco
https://hg.mozilla.org/integration/autoland/rev/5f39bfa28b4d
Remove a superflous assert r=jonco
Pushed by pbone@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0abde41f3403
Mark the test as slow so it doesn't cause timeouts r=nbp

(In reply to Pulsebot from comment #7)
Replacing calls to 'gc()' with 'minorgc()' might speed the test up.

Flags: needinfo?(pbone)
Blocks: 1570216

Good idea, (Bug 1570216)

Flags: needinfo?(pbone)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: