Closed
Bug 907135
Opened 13 years ago
Closed 13 years ago
Assertion failure: false (MOZ_ASSUME_UNREACHABLE(Modified registers between VM call and OsiPoint)), at jit/shared/CodeGenerator-shared.cpp:521
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla26
People
(Reporter: decoder, Assigned: jonco)
References
Details
(Keywords: assertion, testcase)
Attachments
(1 file, 1 obsolete file)
|
871 bytes,
patch
|
nbp
:
review+
|
Details | Diff | Splinter Review |
The following testcase asserts on mozilla-central revision b7f636fada9f (run with --fuzzing-safe --ion-eager), built with rooting analysis enabled:
gczeal(6);
enableOsiPointRegisterChecks();
function DiagModule(stdlib, foreign) {
var test = foreign.test;
var x = 0.0;
while(1) test(1, x);
}
var foreign = {
test:function(a,b) {
unescape(a+":"+b)
var c = [0.0];
}
}
var fast = DiagModule(this, foreign);
| Assignee | ||
Comment 1•13 years ago
|
||
This needs a SkipRoot in getNewType() to stop the rooting analysis poisoning the hash value.
Comment 2•13 years ago
|
||
Comment on attachment 792939 [details] [diff] [review]
bug907135-rootingAssertion
Review of attachment 792939 [details] [diff] [review]:
-----------------------------------------------------------------
r=me
Attachment #792939 -
Flags: review?(terrence) → review+
| Assignee | ||
Comment 3•13 years ago
|
||
(In reply to Terrence Cole [:terrence] from comment #2)
Duh, I attached the patch to the wrong bug. This is the fix for bug 907147.
I actually couldn't get this one to reproduce for me when I tried it.
| Assignee | ||
Updated•13 years ago
|
Attachment #792939 -
Attachment is obsolete: true
| Reporter | ||
Comment 4•13 years ago
|
||
Did you try on x86 (32 bit) Linux with the configuration options --enable-debug --enable-optimize --enable-valgrind --disable-threadsafe --enable-root-analysis?
If this doesn't repro for you, I can try to get you another test.
| Assignee | ||
Comment 5•13 years ago
|
||
(In reply to Christian Holler (:decoder) from comment #4)
Cheers, I've managed to repro this now - I may not have been using an optimized build before.
Comment 6•13 years ago
|
||
Excellent. I was not able to reproduce either this or bug 907147 yesterday.
I was using:
CC="gcc -m32" CXX="g++ -m32" ./configure --enable-optimize --enable-debug --target=i686-linux-gnu --disable-threadsafe --enable-root-analysis --enable-valgrind --enable-gczeal --enable-more-deterministic --with-system-nspr
I guess it's --enable-more-deterministic that is the issue. Now that Jon has it reproducing, I'll let him take it.
Status: ASSIGNED → NEW
| Assignee | ||
Comment 7•13 years ago
|
||
It looks the rooting analysis is poisoning the contents of a safepoint, and when this is compared against the current register state by verifyOsiPointRegs() it is found to be different.
The safepoint is on the stack, but not in a region indicated as part of the JIT stack by JitActivationIterator. I haven't worked out how this is possible yet.
Some debug output:
CheckStackRootsRangeAndSkipJit
skip jit stack at 0xffffc9c4 to 0xffffcaf4
check range 0xffffc810 to 0xffffc9c4
skip jit stack at 0xffffd18c to 0xffffd264
check range 0xffffcaf4 to 0xffffcc64
Expected value: 0xf7842c30
Actual value: 0xda842c30 loaded from 0xffffcba8
Comment 8•13 years ago
|
||
(In reply to Jon Coppeard (:jonco) from comment #7)
> It looks the rooting analysis is poisoning the contents of a safepoint, and
> when this is compared against the current register state by
> verifyOsiPointRegs() it is found to be different.
>
> The safepoint is on the stack, but not in a region indicated as part of the
> JIT stack by JitActivationIterator. I haven't worked out how this is
> possible yet.
This check is supposed to check if the content remains identical between the call and the exit of one instruction (checked at the OSI point). We are supposed to disable this check by setting a flag on the JitActivation when a GC happen, to avoid having cases where a moving GC change the address of something, knowing that this dumped vector is not marked.
> Some debug output:
>
> CheckStackRootsRangeAndSkipJit
> skip jit stack at 0xffffc9c4 to 0xffffcaf4
> check range 0xffffc810 to 0xffffc9c4
> skip jit stack at 0xffffd18c to 0xffffd264
> check range 0xffffcaf4 to 0xffffcc64
>
> Expected value: 0xf7842c30
> Actual value: 0xda842c30 loaded from 0xffffcba8
How does the poisoning works? Is that for conservatively scan pointers which looks like
dead pointers?
| Assignee | ||
Comment 9•13 years ago
|
||
(In reply to Nicolas B. Pierron [:nbp] from comment #8)
> How does the poisoning works? Is that for conservatively scan pointers
> which looks like dead pointers?
We scan the stack for things that look like pointers, and then check whether there is an active root for that pointer. If not, we poison it by setting the top byte to 0xda.
It sounds like we want to either skip the dumped data, or possibly disable this check entirely if rooting analysis is active.
Comment 10•13 years ago
|
||
(In reply to Jon Coppeard (:jonco) from comment #9)
> (In reply to Nicolas B. Pierron [:nbp] from comment #8)
>
> > How does the poisoning works? Is that for conservatively scan pointers
> > which looks like dead pointers?
>
> We scan the stack for things that look like pointers, and then check whether
> there is an active root for that pointer. If not, we poison it by setting
> the top byte to 0xda.
This means that if we root it once, all the non rooted copy would be poisoned, right?
> It sounds like we want to either skip the dumped data, or possibly disable
> this check entirely if rooting analysis is active.
Then, yes, we should disable these assertions during the rooting analysis.
| Assignee | ||
Comment 11•13 years ago
|
||
(In reply to Nicolas B. Pierron [:nbp] from comment #10)
> This means that if we root it once, all the non rooted copy would be
> poisoned, right?
The analysis will poison all non-rooted things on the stack, yes.
> Then, yes, we should disable these assertions during the rooting analysis.
Ok great. To avoid rebuilding jit code with/without the assertions when enabling/disabling rooting analysis at runtime, I think it would be simplest just to not include these assertions in a rooting analysis build.
| Assignee | ||
Comment 12•13 years ago
|
||
Patch to disable the OSI register checking in rooting analysis builds.
Attachment #793982 -
Flags: review?(nicolas.b.pierron)
Updated•13 years ago
|
Attachment #793982 -
Flags: review?(nicolas.b.pierron) → review+
| Assignee | ||
Comment 13•13 years ago
|
||
| Assignee | ||
Comment 14•13 years ago
|
||
Comment 15•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in
before you can comment on or make changes to this bug.
Description
•