runOffThreadScript() can hang if incremental GC is in progress

RESOLVED FIXED in Firefox 38

Status

()

defect
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: jonco, Assigned: jonco)

Tracking

unspecified
mozilla39
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox38 fixed, firefox39 fixed)

Details

Attachments

(1 attachment)

The testcase for bug 1137341 hangs in opt builds with the fix applied.

The cause is that the runOffThreadScript() shell function waits for the off-thread compilation to finish without taking into account that it might have been deferred due to an ongoing GC of the atoms zone.

The testcase only causes this on opt builds because it tries to schedule a zone GC, but schedulegc() is not present on opt builds but is replaced by a dummy function, so a full GC including the atoms zone is triggered instead.
Blocks: 1137341
This fix is to wait for any ongoing incremental GC to finish in runOffThreadScript().
Attachment #8571440 - Flags: review?(terrence)
Attachment #8571440 - Flags: review?(terrence) → review+
https://hg.mozilla.org/mozilla-central/rev/b90ec0de4d83
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
Comment on attachment 8571440 [details] [diff] [review]
bug1138390-runOffThreadScript

Approval Request Comment
[Feature/regressing bug #]: Requesting this as a test dependency for the uplift of bug 1137341.
[User impact if declined]: None
[Describe test coverage new/current, TreeHerder]: On central for over a week.
[Risks and why]: None, shell-only changes.
[String/UUID change made/needed]: None.
Attachment #8571440 - Flags: approval-mozilla-aurora?
Attachment #8571440 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.