truffleruby
truffleruby copied to clipboard
commonmarker test suite fails with dead handle
The test suite fails like so (note: it's actually a lot faster to run the test suite on jvm-ce than jvm):
$ chruby truffleruby-jvm-ce
$ bundle exec rake test TESTOPTS="-s0 -v"
...
TestSpec#test_to_html_example_553 = 0.00 s = .
TestSpec#test_sourcepos_example_436 =
truffleruby: Unexpected internal exception in at_exit,
please report it to https://github.com/oracle/truffleruby/issues.
dead handle 0xbad000000002280 (com.oracle.truffle.api.CompilerDirectives.ShouldNotReachHere)
from com.oracle.truffle.api.CompilerDirectives.shouldNotReachHere(CompilerDirectives.java:574)
from com.oracle.truffle.api.CompilerDirectives.shouldNotReachHere(CompilerDirectives.java:520)
from org.truffleruby.cext.UnwrapNode$UnwrapNativeNode.raiseError(UnwrapNode.java:95)
from org.truffleruby.cext.UnwrapNode$UnwrapNativeNode.unwrapTaggedObject(UnwrapNode.java:80)
from org.truffleruby.cext.UnwrapNodeGen$UnwrapNativeNodeGen.execute(UnwrapNodeGen.java:482)
from org.truffleruby.cext.UnwrapNode.longToWrapper(UnwrapNode.java:253)
from org.truffleruby.cext.UnwrapNodeGen.execute(UnwrapNodeGen.java:100)
from org.truffleruby.cext.CExtNodes$CallWithCExtLockAndFrameAndUnwrapNode.callWithCExtLockAndFrame(CExtNodes.java:249)
from org.truffleruby.cext.CExtNodesFactory$CallWithCExtLockAndFrameAndUnwrapNodeFactory$CallWithCExtLockAndFrameAndUnwrapNodeGen.execute(CExtNodesFactory.java:599)
from org.truffleruby.language.locals.WriteLocalVariableNode.execute(WriteLocalVariableNode.java:28)
from org.truffleruby.language.RubyNode.doExecuteVoid(RubyNode.java:64)
from org.truffleruby.language.control.SequenceNode.execute(SequenceNode.java:34)
from org.truffleruby.core.module.ModuleNodes$DefineMethodNode$CallMethodWithLambdaBody.execute(ModuleNodes.java:1482)
from org.truffleruby.language.RubyLambdaRootNode.execute(RubyLambdaRootNode.java:84)
/home/eregon/code/truffleruby-ws/graal/sdk/mxbuild/linux-amd64/GRAALVM_A33290E019_JAVA20/graalvm-a33290e019-java20-23.0.0-dev/languages/ruby/lib/truffle/truffle/cext_ruby.rb:22:in `next'
from /home/eregon/code/commonmarker/lib/commonmarker/node.rb:71:in `each'
from /home/eregon/code/commonmarker/lib/commonmarker/renderer.rb:24:in `block in out'
from /home/eregon/code/commonmarker/lib/commonmarker/renderer.rb:21:in `each'
from /home/eregon/code/commonmarker/lib/commonmarker/renderer.rb:21:in `out'
from /home/eregon/code/commonmarker/lib/commonmarker/renderer/html_renderer.rb:133:in `strong'
from /home/eregon/code/commonmarker/lib/commonmarker/renderer.rb:44:in `render'
from /home/eregon/code/commonmarker/lib/commonmarker/renderer.rb:28:in `block in out'
from /home/eregon/code/commonmarker/lib/commonmarker/renderer.rb:21:in `each'
from /home/eregon/code/commonmarker/lib/commonmarker/renderer.rb:21:in `out'
from /home/eregon/code/commonmarker/lib/commonmarker/renderer.rb:24:in `block (2 levels) in out'
from /home/eregon/code/commonmarker/lib/commonmarker/node.rb:72:in `each'
from /home/eregon/code/commonmarker/lib/commonmarker/renderer.rb:24:in `block in out'
from /home/eregon/code/commonmarker/lib/commonmarker/renderer.rb:21:in `each'
from /home/eregon/code/commonmarker/lib/commonmarker/renderer.rb:21:in `out'
from /home/eregon/code/commonmarker/lib/commonmarker/renderer/html_renderer.rb:23:in `block (2 levels) in paragraph'
from /home/eregon/code/commonmarker/lib/commonmarker/renderer.rb:84:in `container'
from /home/eregon/code/commonmarker/lib/commonmarker/renderer/html_renderer.rb:22:in `block in paragraph'
from /home/eregon/code/commonmarker/lib/commonmarker/renderer.rb:78:in `block'
from /home/eregon/code/commonmarker/lib/commonmarker/renderer/html_renderer.rb:21:in `paragraph'
from /home/eregon/code/commonmarker/lib/commonmarker/renderer.rb:44:in `render'
from /home/eregon/code/commonmarker/lib/commonmarker/renderer.rb:28:in `block in out'
from /home/eregon/code/commonmarker/lib/commonmarker/renderer.rb:21:in `each'
from /home/eregon/code/commonmarker/lib/commonmarker/renderer.rb:21:in `out'
from /home/eregon/code/commonmarker/lib/commonmarker/renderer.rb:24:in `block (2 levels) in out'
from /home/eregon/code/commonmarker/lib/commonmarker/node.rb:72:in `each'
from /home/eregon/code/commonmarker/lib/commonmarker/renderer.rb:24:in `block in out'
from /home/eregon/code/commonmarker/lib/commonmarker/renderer.rb:21:in `each'
from /home/eregon/code/commonmarker/lib/commonmarker/renderer.rb:21:in `out'
from /home/eregon/code/commonmarker/lib/commonmarker/renderer.rb:53:in `document'
from /home/eregon/code/commonmarker/lib/commonmarker/renderer/html_renderer.rb:6:in `document'
from /home/eregon/code/commonmarker/lib/commonmarker/renderer.rb:38:in `render'
from /home/eregon/code/commonmarker/test/test_spec.rb:26:in `test_sourcepos_example_436'
I'll merge that first and we can investigate this dead handle issue later, they don't seem related.
Command-line to repro similar error: ruby -rbundler/setup -Ilib:test test/test_spec.rb -s0 -v
The whole test suite passes if we just keep all handles (obviously just a workaround):
TRUFFLERUBYOPT="--experimental-options --keep-handles-alive" bundle exec rake test TESTOPTS="-s0 -v"
Originally posted by @eregon in https://github.com/oracle/truffleruby/issues/2830#issuecomment-1405182665