-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Havlak crash #1594
Comments
With ykjit/ykllvm#226 applied, I've instrumented the interpreter with a print statement that shows what bytecodes are executed and diffed the output from the above test unjitted and jitted: --- log.vanilla 2025-02-11 13:19:39.590391228 +0000
+++ log.yk 2025-02-11 13:18:18.714655663 +0000
...
debug_bytecode: count=1794, pc=21, opcode=RETURN0
debug_bytecode: count=1795, pc=7, opcode=RETURN0
+yk-jit-event: execute-side-trace
debug_bytecode: count=1796, pc=6, opcode=FORLOOP
-debug_bytecode: count=1797, pc=7, opcode=RETURN0
-debug_bytecode: count=1798, pc=5, opcode=RETURN0
-debug_bytecode: count=1799, pc=8, opcode=RETURN0
-debug_bytecode: count=1800, pc=5, opcode=RETURN0
-debug_bytecode: count=1801, pc=4, opcode=RETURN0
-debug_bytecode: count=1802, pc=5, opcode=RETURN0
-debug_bytecode: count=1803, pc=92, opcode=RETURN
+yk-jit-event: deoptimise
+debug_bytecode: count=1797, pc=6, opcode=FORLOOP
+debug_bytecode: count=1798, pc=4, opcode=MOVE
+debug_bytecode: count=1799, pc=5, opcode=CALL
+debug_bytecode: count=1800, pc=0, opcode=LOADNIL
+debug_bytecode: count=1801, pc=1, opcode=GETTABUP
+debug_bytecode: count=1802, pc=2, opcode=SELF
+debug_bytecode: count=1803, pc=3, opcode=LOADI
+debug_bytecode: count=1804, pc=4, opcode=CALL
+debug_bytecode: count=1805, pc=0, opcode=GETTABUP
+debug_bytecode: count=1806, pc=1, opcode=EQ
+debug_bytecode: count=1807, pc=4, opcode=GETFIELD
+debug_bytecode: count=1808, pc=5, opcode=GETTABLE
+debug_bytecode: count=1809, pc=6, opcode=RETURN1
+debug_bytecode: count=1810, pc=5, opcode=SELF
+/home/vext01/research/yklua/src/lua: havlak.1594.lua:94: attempt to index a nil value
+stack traceback:
+ havlak.1594.lua:94: in local 'A'
+ havlak.1594.lua:37: in method 'K'
+ havlak.1594.lua:90: in method 'A'
+ havlak.1594.lua:104: in method 'C'
+ havlak.1594.lua:143: in method 'C'
+ havlak.1594.lua:130: in method 'G'
+ havlak.1594.lua:149: in method 'I'
+ havlak.1594.lua:152: in main chunk
+ [C]: in ? This shows that program semantics deviate when executing a side trace. I'm now getting shrinkray find a smaller program where the executed bytecodes still differ. Maybe this will give us a smaller program than above. EDIT: sadly it was unable to make the program smaller. |
This could still be a deopt problem. Note how it only deviates after deopt. |
I agree: that seems almost certainly to be a deopt problem given the clear deviation one can see in the diff. Which is both annoying and good, because we've got a strong lead as to what to look at: presumably if we check |
When spilling a register A, not only update the mapping of this register A, but also the mappings of any other register B that aliases with register A. Fixes ykjit/yk#1594 Co-authored-by: Lukas Diekmann <lukas.diekmann@gmail.com>
When spilling a register A, not only update the mapping of this register A, but also the mappings of any other register B that aliases with register A. Fixes ykjit/yk#1594 Co-authored-by: Lukas Diekmann <lukas.diekmann@gmail.com>
Today's yk and yklua:
YKD_OPT=0
as another bug currently triggers.This is the most reduced test I've managed so far:
This reduced test will fail deterministically no matter what you set
YKD_SERIALISE_COMPILATION
to.The text was updated successfully, but these errors were encountered: