Closed
Bug 1385512
Opened 7 years ago
Closed 7 years ago
Intermittent bug1109328.js | bug1109328.js:7:1 Error: attempt to set maxBytes to the value less than the current gcBytes (1007616) (code 3, args "--baseline-eager")
Categories
(Core :: JavaScript Engine, defect, P5)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla57
Tracking | Status | |
---|---|---|
firefox57 | --- | fixed |
People
(Reporter: intermittent-bug-filer, Assigned: sfink)
Details
(Keywords: intermittent-failure, Whiteboard: [stockwell fixed:logic])
Attachments
(1 file, 1 obsolete file)
714 bytes,
patch
|
jonco
:
review+
|
Details | Diff | Splinter Review |
Filed by: wkocher [at] mozilla.com https://treeherder.mozilla.org/logviewer.html#?job_id=119056955&repo=mozilla-inbound https://archive.mozilla.org/pub/spidermonkey/tinderbox-builds/mozilla-inbound-win32-debug/mozilla-inbound_win32-debug_spidermonkey-compacting-bm77-build1-build4.txt.gz
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Comment 4•7 years ago
|
||
a recent increase in failures, but not enough to focus on the bug
Comment hidden (Intermittent Failures Robot) |
Comment 6•7 years ago
|
||
seems like this picked up in the last week. :naveed, I see you as the triage owner, could you help prioritize this and find someone to own this?
Flags: needinfo?(nihsanullah)
Whiteboard: [stockwell needswork]
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Assignee | ||
Comment 9•7 years ago
|
||
This is failing most of the time on the tier 3 Windows SM(cgc) jobs. I'm not sure why it's failing so frequently, but it seems inherently racy. The relevant code is doing gcparam("maxBytes", gcparam("gcBytes")); As best I can figure, this must grab out the current number of remaining GC bytes, then some other thread comes along and decrements gcBytes, and now you're trying to set maxBytes to something smaller than your current usage. I don't know exactly what was required for the original test, so I'm just doing a blind modification to something similar that won't race.
Attachment #8908684 -
Flags: review?(jcoppeard)
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → sphink
Status: NEW → ASSIGNED
Comment 10•7 years ago
|
||
Comment on attachment 8908684 [details] [diff] [review] Do not race with gcBytes Review of attachment 8908684 [details] [diff] [review]: ----------------------------------------------------------------- I agree with yoyur analysis. ::: js/src/jit-test/tests/debug/bug1109328.js @@ +3,5 @@ > } catch (e) {} > g = newGlobal() > g.parent = this > g.eval("Debugger(parent).onExceptionUnwind=(function(){})"); > +gcparam("maxBytes", gcparam("maxBytes") - 8); But I think this changes the meaning of the test though? I'd be totally fine with adding |gczeal(0)| so we don't trigger GCs that can race with us.
Assignee | ||
Comment 11•7 years ago
|
||
(In reply to Jon Coppeard (:jonco) from comment #10) > Comment on attachment 8908684 [details] [diff] [review] > Do not race with gcBytes > > Review of attachment 8908684 [details] [diff] [review]: > ----------------------------------------------------------------- > > I agree with yoyur analysis. > > ::: js/src/jit-test/tests/debug/bug1109328.js > @@ +3,5 @@ > > } catch (e) {} > > g = newGlobal() > > g.parent = this > > g.eval("Debugger(parent).onExceptionUnwind=(function(){})"); > > +gcparam("maxBytes", gcparam("maxBytes") - 8); > > But I think this changes the meaning of the test though? > > I'd be totally fine with adding |gczeal(0)| so we don't trigger GCs that can > race with us. It does change the meaning of the test, but (1) the bug it was testing is fixed now, and (2) all I can think of is that this test was using this maxBytes setting to trigger a GC. So avoiding GC triggers is going to change the test in the same way. I'm not confident of my analysis, but how about this: I'll leave it as decrementing maxBytes, but I'll also insert an explicit GC call just in case that's all that was going on. Otherwise, I'm not sure how to do this in a non-racy way.
Flags: needinfo?(nihsanullah)
Assignee | ||
Comment 12•7 years ago
|
||
There's a good chance this wouldn't actually trigger the original bug, since it may cause a GC in at some awkward time during shutdown instead of during the script execution, but I'm not sure what to do about that other than removing the maxBytes < gcBytes check and making it internally clamp to gcBytes. But it seems like it probably catches more mistakes the way it is.
Attachment #8908735 -
Flags: review?(jcoppeard)
Assignee | ||
Updated•7 years ago
|
Attachment #8908684 -
Attachment is obsolete: true
Attachment #8908684 -
Flags: review?(jcoppeard)
Comment 13•7 years ago
|
||
Comment on attachment 8908735 [details] [diff] [review] Do not race with gcBytes Review of attachment 8908735 [details] [diff] [review]: ----------------------------------------------------------------- Sorry, I didn't explain that very well. This test is only failing in the CGC test runs with zeal mode 10 enabled. So I was suggesting something that didn't affect the operation of the test when there was no zeal mode active. Having said that... any test that uses a mechanism like this to trigger a GC at just the right spot is bogus and fragile and is almost certainly not exercising the same code path as it did when it was added. So it doesn't really matter either way.
Attachment #8908735 -
Flags: review?(jcoppeard) → review+
Assignee | ||
Comment 14•7 years ago
|
||
(In reply to Jon Coppeard (:jonco) from comment #13) > Comment on attachment 8908735 [details] [diff] [review] > Do not race with gcBytes > > Review of attachment 8908735 [details] [diff] [review]: > ----------------------------------------------------------------- > > Sorry, I didn't explain that very well. > > This test is only failing in the CGC test runs with zeal mode 10 enabled. > So I was suggesting something that didn't affect the operation of the test > when there was no zeal mode active. Ah! Sorry, obvious in retrospect. > Having said that... any test that uses a mechanism like this to trigger a GC > at just the right spot is bogus and fragile and is almost certainly not > exercising the same code path as it did when it was added. So it doesn't > really matter either way. Yeah, I'd rather not avoid the observed race with gczeal, because it leaves a race in place that could come back if we start doing something else that touches gcBytes offthread. Thanks!
Comment 15•7 years ago
|
||
Pushed by sfink@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/c385f15231d2 Do not race with gcBytes, r=jonco
Comment 16•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c385f15231d2
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox57:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Comment hidden (Intermittent Failures Robot) |
Updated•7 years ago
|
Whiteboard: [stockwell unknown] → [stockwell fixed:logic]
You need to log in
before you can comment on or make changes to this bug.
Description
•