Closed
Bug 1309903
Opened 7 years ago
Closed 7 years ago
Assertion failure: !minimalBundle(bundle), at BacktrackingAllocator.cpp:1322
Categories
(Core :: JavaScript Engine: JIT, defect, P1)
Core
JavaScript Engine: JIT
Tracking
()
RESOLVED
FIXED
mozilla52
People
(Reporter: cbook, Assigned: jandem)
References
()
Details
(Keywords: assertion)
Attachments
(3 files)
257.34 KB,
text/plain
|
Details | |
3.84 KB,
application/x-javascript
|
Details | |
17.02 KB,
patch
|
bhackett1024
:
review+
gchang
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
found via bughunter and reproduced on current m-c tip windows debug tinderbox build. Steps to reproduce: -> Load http://www.blackdesertfoundry.com/map/#4/-3.82/65.04 --> Assertion failure Assertion failure: !minimalBundle(bundle), at c:/builds/moz2_slave/m-cen-w32-d-000000000000000000/build/src/js/src/jit/BacktrackingAllocator.cpp:1322 affects debug builds from trunk to beta
Reporter | ||
Comment 1•7 years ago
|
||
[Tracking Requested - why for this release]: bughunter real world found
status-firefox50:
--- → affected
status-firefox51:
--- → affected
status-firefox52:
--- → affected
tracking-firefox50:
--- → ?
tracking-firefox51:
--- → ?
tracking-firefox52:
--- → ?
Updated•7 years ago
|
Priority: -- → P1
Comment 3•7 years ago
|
||
This assertion usually indicates a bug in the lowering phase, so a blame cset would be good (bug 1231024 was the last time this came up.)
Flags: needinfo?(bhackett1024)
Comment 4•7 years ago
|
||
(In reply to Brian Hackett (:bhackett) from comment #3) > This assertion usually indicates a bug in the lowering phase, so a blame > cset would be good (bug 1231024 was the last time this came up.) I see that the previous time it took us multiple months to fix the issue, would there be a way to get more information on which LIR instruction causes us to fall in such assertion?
Comment 5•7 years ago
|
||
Setting IONFLAGS=regalloc and looking at the vreg it is trying to allocate when it fails should help with identifying the problematic LIR instruction.
Assignee | ||
Comment 6•7 years ago
|
||
(In reply to Brian Hackett (:bhackett) from comment #3) > This assertion usually indicates a bug in the lowering phase, so a blame > cset would be good Well somebody has to do this.
Flags: needinfo?(jdemooij)
Assignee | ||
Comment 7•7 years ago
|
||
I have a shell test for this. Will post it after it has been reduced more.
Assignee | ||
Comment 8•7 years ago
|
||
This fails with --no-threads on 32-bit.
Assignee | ||
Comment 9•7 years ago
|
||
The problem seems to be with LApplyArgsGeneric, it wants v44 in edx but somehow that use is minimal and minimalBundle returns true. Not sure but this looks like a regalloc bug.
Flags: needinfo?(jdemooij) → needinfo?(bhackett1024)
Assignee | ||
Comment 10•7 years ago
|
||
(In reply to Jan de Mooij [:jandem] from comment #9) > LApplyArgsGeneric Er, s/Args/Array/
Comment 11•7 years ago
|
||
(In reply to Jan de Mooij [:jandem] from comment #9) > The problem seems to be with LApplyArgsGeneric, it wants v44 in edx but > somehow that use is minimal and minimalBundle returns true. Not sure but > this looks like a regalloc bug. The use 'v44 [242,244)' is minimal because that vreg is not usedAtStart, and is fixed to edx, which is also a fixed output register of the instruction (v85). So I think changing the useBoxFixed call in LIRGenerator::visitApplyArray would fix this. Now, despite the apparent conflict between the non-useAtStart useBoxFixed and the fixed output register, the regalloc might be able to allocate this instruction sometimes. I think this is due to the issue that also just came up in bug 1310710, where the regalloc will sort-of-but-not-really treat non-useAtStart fixed registers on call instructions as if they were useAtStart. I think this logic may have been mimicking similar logic in lsra back in the day for compatibility with the existing lowering code, but there isn't a coherent invariant being maintained AFAICT and it would be better if we just plain didn't allow non-useAtStart uses on call instructions. Making this change would require some auditing but it shouldn't be hard to put in place.
Flags: needinfo?(bhackett1024)
Assignee | ||
Comment 12•7 years ago
|
||
Yeah I was wondering about that. If this is an invariant, we definitely need asserts to make this fail reliably. I'll try something.
Assignee | ||
Comment 13•7 years ago
|
||
This forces call instructions to have atStart uses. We already asserted this, but made an exception for fixed registers.
Assignee: nobody → jdemooij
Status: NEW → ASSIGNED
Attachment #8802047 -
Flags: review?(bhackett1024)
Comment 14•7 years ago
|
||
Comment on attachment 8802047 [details] [diff] [review] Patch Review of attachment 8802047 [details] [diff] [review]: ----------------------------------------------------------------- Thanks!
Attachment #8802047 -
Flags: review?(bhackett1024) → review+
Comment 15•7 years ago
|
||
Pushed by jandemooij@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/bc91be30f2aa Fix Ion regalloc to require call instruction uses to be atStart. r=bhackett
Comment 16•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/bc91be30f2aa
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Assignee | ||
Comment 19•7 years ago
|
||
Comment on attachment 8802047 [details] [diff] [review] Patch I think we should take this on Aurora at least. It's probably too late for beta, regalloc patches aren't without risk. Approval Request Comment [Feature/regressing bug #]: Old bug. [User impact if declined]: Potential crashes or assertion failures in debug builds. [Describe test coverage new/current, TreeHerder]: Landed on m-c a few days ago. [Risks and why]: I think low risk, but regalloc is tricky so it's hard to say for sure. [String/UUID change made/needed]: None.
Attachment #8802047 -
Flags: approval-mozilla-aurora?
Comment 20•7 years ago
|
||
Comment on attachment 8802047 [details] [diff] [review] Patch Fix a potential crash. Take it in 51 aurora.
Attachment #8802047 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Reporter | ||
Comment 21•7 years ago
|
||
bugherderuplift |
https://hg.mozilla.org/releases/mozilla-aurora/rev/52773070231c
It maybe too late to this fix in 50, we are in RC mode and only taking fixes for release blocking issues.
You need to log in
before you can comment on or make changes to this bug.
Description
•