oracle / truffleruby

A high performance implementation of the Ruby programming language, built on GraalVM.
https://www.graalvm.org/ruby/
Other
3.01k stars 184 forks source link

dead handle in nokogiri test suite #3503

Open flavorjones opened 6 months ago

flavorjones commented 6 months ago

Seeing sporadic "dead handle" errors in CI.

For example: https://github.com/sparklemotion/nokogiri/actions/runs/8194425716/job/22410492610#step:7:114

Version truffleruby 23.1.2, like ruby 3.2.2, Oracle GraalVM Native [x86_64-linux]

dead handle 0xbad000000023028 (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:107)
    from org.truffleruby.cext.UnwrapNode$UnwrapNativeNode.unwrapTaggedObject(UnwrapNode.java:92)
    from org.truffleruby.cext.UnwrapNodeGen$UnwrapNativeNodeGen$Inlined.executeAndSpecialize(UnwrapNodeGen.java:421)
    from org.truffleruby.cext.UnwrapNodeGen$UnwrapNativeNodeGen$Inlined.execute(UnwrapNodeGen.java:387)
    from org.truffleruby.cext.UnwrapNode.longToWrapper(UnwrapNode.java:270)
    from org.truffleruby.cext.UnwrapNodeGen$Inlined.executeAndSpecialize(UnwrapNodeGen.java:183)
    from org.truffleruby.cext.UnwrapNodeGen$Inlined.execute(UnwrapNodeGen.java:1[58](https://github.com/sparklemotion/nokogiri/actions/runs/8194425716/job/22410492610#step:7:59))
    from org.truffleruby.cext.CExtNodes$CallWithCExtLockAndFrameAndUnwrapNode.callWithCExtLockAndFrame(CExtNodes.java:258)
    from org.truffleruby.cext.CExtNodesFactory$CallWithCExtLockAndFrameAndUnwrapNodeFactory$CallWithCExtLockAndFrameAndUnwrapNodeGen.executeAndSpecialize(CExtNodesFactory.java:577)
    from org.truffleruby.cext.CExtNodesFactory$CallWithCExtLockAndFrameAndUnwrapNodeFactory$CallWithCExtLockAndFrameAndUnwrapNodeGen.execute(CExtNodesFactory.java:556)
    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:1373)
    from org.truffleruby.language.RubyLambdaRootNode.execute(RubyLambdaRootNode.java:84)
/home/runner/.rubies/truffleruby-23.1.2/lib/truffle/truffle/cext_ruby.rb:23:in `parent'
    from /home/runner/work/nokogiri/nokogiri/test/xml/test_node_set.rb:[60](https://github.com/sparklemotion/nokogiri/actions/runs/8194425716/job/22410492610#step:7:61)2:in `block (4 levels) in <class:TestNodeSet>'
    from /home/runner/work/nokogiri/nokogiri/lib/nokogiri/xml/node_set.rb:237:in `block in each'
    from /home/runner/work/nokogiri/nokogiri/lib/nokogiri/xml/node_set.rb:236:in `upto'
    from /home/runner/work/nokogiri/nokogiri/lib/nokogiri/xml/node_set.rb:236:in `each'

I'll collect more here as I see them, along with the ruby backtrace.

From https://github.com/oracle/truffleruby/issues/3478#issuecomment-1984397555 & https://github.com/oracle/truffleruby/issues/3478#issuecomment-2002760652

flavorjones commented 3 months ago

https://github.com/sparklemotion/nokogiri/actions/runs/9709463631/job/26798206017#step:6:46

dead handle 0xbad000000159ea0 (com.oracle.truffle.api.CompilerDirectives.ShouldNotReachHere)
    from com.oracle.truffle.api.CompilerDirectives.shouldNotReachHere(CompilerDirectives.java:603)
    from com.oracle.truffle.api.CompilerDirectives.shouldNotReachHere(CompilerDirectives.java:549)
    from org.truffleruby.cext.UnwrapNode$UnwrapNativeNode.raiseError(UnwrapNode.java:107)
    from org.truffleruby.cext.UnwrapNode$UnwrapNativeNode.unwrapTaggedObject(UnwrapNode.java:92)
    from org.truffleruby.cext.UnwrapNodeGen$UnwrapNativeNodeGen$Inlined.execute(UnwrapNodeGen.java:367)
    from org.truffleruby.cext.UnwrapNode.unwrapGeneric(UnwrapNode.java:286)
    from org.truffleruby.cext.UnwrapNodeGen$Inlined.execute(UnwrapNodeGen.java:156)
    from org.truffleruby.cext.CExtNodes$CallWithCExtLockAndFrameAndUnwrapNode.callWithCExtLockAndFrame(CExtNodes.java:262)
    from org.truffleruby.cext.CExtNodesFactory$CallWithCExtLockAndFrameAndUnwrapNodeFactory$CallWithCExtLockAndFrameAndUnwrapNodeGen.execute(CExtNodesFactory.java:5[54](https://github.com/sparklemotion/nokogiri/actions/runs/9709463631/job/26798206017#step:6:55))
    from org.truffleruby.language.locals.WriteLocalVariableNode.execute(WriteLocalVariableNode.java:28)
    from org.truffleruby.language.RubyContextSourceNode.executeVoid(RubyContextSourceNode.java:23)
    from org.truffleruby.language.control.SequenceNode.execute(SequenceNode.java:32)
    from org.truffleruby.core.module.ModuleNodes$DefineMethodNode$CallMethodWithLambdaBody.execute(ModuleNodes.java:1373)
    from org.truffleruby.language.RubyLambdaRootNode.execute(RubyLambdaRootNode.java:84)
/home/runner/.rubies/truffleruby-head/lib/truffle/truffle/cext_ruby.rb:24:in `parent'
    from /home/runner/work/nokogiri/nokogiri/test/xml/test_node_set.rb:602:in `block (4 levels) in <class:TestNodeSet>'
    from /home/runner/work/nokogiri/nokogiri/lib/nokogiri/xml/node_set.rb:237:in `block in each'
    from /home/runner/work/nokogiri/nokogiri/lib/nokogiri/xml/node_set.rb:236:in `upto'
    from /home/runner/work/nokogiri/nokogiri/lib/nokogiri/xml/node_set.rb:236:in `each'
    from /home/runner/work/nokogiri/nokogiri/test/xml/test_node_set.rb:[60](https://github.com/sparklemotion/nokogiri/actions/runs/9709463631/job/26798206017#step:6:61)1:in `test_0002_wraps each node within a dup of the Node argument'