Skip to content
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

Failures in JRuby 9.0.5.0 on Sinatra build #3633

Closed
zzak opened this issue Feb 2, 2016 · 11 comments
Closed

Failures in JRuby 9.0.5.0 on Sinatra build #3633

zzak opened this issue Feb 2, 2016 · 11 comments
Assignees
Labels
jit
Milestone

Comments

@zzak
Copy link

@zzak zzak commented Feb 2, 2016

Hello!

We're seeing the following failures in Sinatra on latest JRuby, I can reproduce with 9.0.5.0 on my machine:

  1) Error:
HelpersTest::TestSession#test_accepts_an_options_hash_0:
LoadError: no such file to load -- krypt/ossl
    org/jruby/RubyKernel.java:937:in `require'
    /Users/zscott/.gem/jruby/2.2.3/gems/jruby-openssl-0.9.4/lib/jopenssl19/openssl.rb:23:in `<top>'
    org/jruby/RubyKernel.java:955:in `load'
    /Users/zscott/.gem/jruby/2.2.3/gems/jruby-openssl-0.9.4/lib/jopenssl/load.rb:1:in `<top>'
    org/jruby/RubyKernel.java:937:in `require'
    /Users/zscott/.gem/jruby/2.2.3/gems/jruby-openssl-0.9.4/lib/jopenssl/load.rb:18:in `<top>'
    org/jruby/RubyKernel.java:937:in `require'
    /Users/zscott/.gem/jruby/2.2.3/gems/jruby-openssl-0.9.4/lib/openssl.rb:1:in `<top>'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1761:in `setup_sessions'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1713:in `setup_default_middleware'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1482:in `build'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1475:in `new'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1464:in `prototype'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1489:in `block in call'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1786:in `synchronize'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1489:in `call'
    /Users/zscott/.gem/jruby/2.2.3/bundler/gems/rack-7ba4ad9f7c9a/lib/rack/lint.rb:49:in `_call'
    /Users/zscott/.gem/jruby/2.2.3/bundler/gems/rack-7ba4ad9f7c9a/lib/rack/lint.rb:37:in `call'
    /Users/zscott/.gem/jruby/2.2.3/gems/rack-test-0.6.3/lib/rack/mock_session.rb:30:in `request'
    /Users/zscott/.gem/jruby/2.2.3/gems/rack-test-0.6.3/lib/rack/test.rb:244:in `process_request'
    /Users/zscott/.gem/jruby/2.2.3/gems/rack-test-0.6.3/lib/rack/test.rb:58:in `get'
    /Users/zscott/.gem/jruby/2.2.3/gems/jruby-openssl-0.9.4/lib/openssl.rb:1:in `block in (root)'


  2) Error:
HelpersTest::TestSession#test_allows_disabling_session_secret_0:
NameError: uninitialized constant Rack::Session::Cookie
    org/jruby/RubyModule.java:3212:in `const_missing'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1761:in `setup_sessions'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1713:in `setup_default_middleware'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1482:in `build'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1475:in `new'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1464:in `prototype'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1489:in `block in call'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1786:in `synchronize'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1489:in `call'
    /Users/zscott/.gem/jruby/2.2.3/bundler/gems/rack-7ba4ad9f7c9a/lib/rack/lint.rb:49:in `_call'
    /Users/zscott/.gem/jruby/2.2.3/bundler/gems/rack-7ba4ad9f7c9a/lib/rack/lint.rb:37:in `call'
    /Users/zscott/.gem/jruby/2.2.3/gems/rack-test-0.6.3/lib/rack/mock_session.rb:30:in `request'
    /Users/zscott/.gem/jruby/2.2.3/gems/rack-test-0.6.3/lib/rack/test.rb:244:in `process_request'
    /Users/zscott/.gem/jruby/2.2.3/gems/rack-test-0.6.3/lib/rack/test.rb:58:in `get'
    /Users/zscott/code/sinatra/test/helpers_test.rb:537:in `block in test_allows_disabling_session_secret_0'
    /Users/zscott/code/sinatra/test/helper.rb:125:in `silence_warnings'
    /Users/zscott/code/sinatra/test/helpers_test.rb:536:in `block in test_allows_disabling_session_secret_0'


  3) Error:
HelpersTest::TestSession#test_creates_a_new_session_when_none_provided_0:
NameError: uninitialized constant Rack::Session::Cookie
    org/jruby/RubyModule.java:3212:in `const_missing'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1761:in `setup_sessions'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1713:in `setup_default_middleware'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1482:in `build'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1475:in `new'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1464:in `prototype'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1489:in `block in call'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1786:in `synchronize'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1489:in `call'
    /Users/zscott/.gem/jruby/2.2.3/bundler/gems/rack-7ba4ad9f7c9a/lib/rack/lint.rb:49:in `_call'
    /Users/zscott/.gem/jruby/2.2.3/bundler/gems/rack-7ba4ad9f7c9a/lib/rack/lint.rb:37:in `call'
    /Users/zscott/.gem/jruby/2.2.3/gems/rack-test-0.6.3/lib/rack/mock_session.rb:30:in `request'
    /Users/zscott/.gem/jruby/2.2.3/gems/rack-test-0.6.3/lib/rack/test.rb:244:in `process_request'
    /Users/zscott/.gem/jruby/2.2.3/gems/rack-test-0.6.3/lib/rack/test.rb:58:in `get'
    /Users/zscott/code/sinatra/test/helpers_test.rb:488:in `block in test_creates_a_new_session_when_none_provided_0'


  4) Error:
HelpersTest::TestSession#test_sets_a_default_session_secret_0:
NameError: uninitialized constant Rack::Session::Cookie
    org/jruby/RubyModule.java:3212:in `const_missing'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1761:in `setup_sessions'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1713:in `setup_default_middleware'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1482:in `build'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1475:in `new'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1464:in `prototype'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1489:in `block in call'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1786:in `synchronize'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1489:in `call'
    /Users/zscott/.gem/jruby/2.2.3/bundler/gems/rack-7ba4ad9f7c9a/lib/rack/lint.rb:49:in `_call'
    /Users/zscott/.gem/jruby/2.2.3/bundler/gems/rack-7ba4ad9f7c9a/lib/rack/lint.rb:37:in `call'
    /Users/zscott/.gem/jruby/2.2.3/gems/rack-test-0.6.3/lib/rack/mock_session.rb:30:in `request'
    /Users/zscott/.gem/jruby/2.2.3/gems/rack-test-0.6.3/lib/rack/test.rb:244:in `process_request'
    /Users/zscott/.gem/jruby/2.2.3/gems/rack-test-0.6.3/lib/rack/test.rb:58:in `get'
    /Users/zscott/code/sinatra/test/helpers_test.rb:520:in `block in test_sets_a_default_session_secret_0'


  5) Error:
HelpersTest::TestSession#test_inserts_session_middleware_0:
NameError: uninitialized constant Rack::Session::Cookie
    org/jruby/RubyModule.java:3212:in `const_missing'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1761:in `setup_sessions'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1713:in `setup_default_middleware'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1482:in `build'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1475:in `new'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1464:in `prototype'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1489:in `block in call'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1786:in `synchronize'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1489:in `call'
    /Users/zscott/.gem/jruby/2.2.3/bundler/gems/rack-7ba4ad9f7c9a/lib/rack/lint.rb:49:in `_call'
    /Users/zscott/.gem/jruby/2.2.3/bundler/gems/rack-7ba4ad9f7c9a/lib/rack/lint.rb:37:in `call'
    /Users/zscott/.gem/jruby/2.2.3/gems/rack-test-0.6.3/lib/rack/mock_session.rb:30:in `request'
    /Users/zscott/.gem/jruby/2.2.3/gems/rack-test-0.6.3/lib/rack/test.rb:244:in `process_request'
    /Users/zscott/.gem/jruby/2.2.3/gems/rack-test-0.6.3/lib/rack/test.rb:58:in `get'
    /Users/zscott/code/sinatra/test/helpers_test.rb:504:in `block in test_inserts_session_middleware_0'


  6) Error:
SettingsTest::TestProtection#test_sets_up_RemoteToken_if_sessions_are_enabled_0:
NameError: uninitialized constant Rack::Session::Cookie
    org/jruby/RubyModule.java:3212:in `const_missing'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1761:in `setup_sessions'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1713:in `setup_default_middleware'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1482:in `build'
    /Users/zscott/code/sinatra/lib/sinatra/base.rb:1475:in `new'
    /Users/zscott/code/sinatra/test/settings_test.rb:563:in `block in test_sets_up_RemoteToken_if_sessions_are_enabled_0'
    /Users/zscott/code/sinatra/test/settings_test.rb:523:in `track'
    /Users/zscott/code/sinatra/test/settings_test.rb:562:in `block in test_sets_up_RemoteToken_if_sessions_are_enabled_0'

Here's the build: https://travis-ci.org/sinatra/sinatra/builds/105858800

/cc @rkh

@kares
Copy link
Member

@kares kares commented Feb 2, 2016

first error is due: .gem/jruby/2.2.3/gems/jruby-openssl-0.9.4 that's a fairly old version that needs to be uninstalled for (any recent) JRuby. just gem uninstall jruby-openssl jruby has one as a default gem.

the rest seems that Rack::Session::Cookie is not loaded?

@kares
Copy link
Member

@kares kares commented Feb 2, 2016

💚 build at sinatra/sinatra#1091 ... expect this to be a local mess at /Users/zscott

@kares kares added this to the Invalid or Duplicate milestone Feb 2, 2016
@zzak
Copy link
Author

@zzak zzak commented Feb 3, 2016

@kares Sorry, it was the wrong stack trace, here it is:

 1) Error:

HelpersTest::TestSend_file#test_sends_the_contents_of_the_file_0:

Java::JavaLang::NoSuchMethodError: home.travis.$_dot_rvm.gems.jruby_minus_9_dot_0_dot_5_dot_0.gems.mustermann_minus_0_dot_4_dot_0.lib.mustermann.regexp_based.hash:0(Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/runtime/builtin/IRubyObject;
    home.travis.$_dot_rvm.gems.jruby_minus_9_dot_0_dot_5_dot_0.gems.mustermann_minus_0_dot_4_dot_0.lib.mustermann.regexp_based.RUBY$method$initialize$0(/home/travis/.rvm/gems/jruby-9.0.5.0/gems/mustermann-0.4.0/lib/mustermann/regexp_based.rb:18)
    org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:101)
    org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:124)
    org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:273)
    org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:79)
    org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:83)
    org.jruby.RubyClass.newInstance(RubyClass.java:891)
    org.jruby.RubyClass$INVOKER$i$newInstance.call(RubyClass$INVOKER$i$newInstance.gen)
    org.jruby.ir.runtime.IRRuntimeHelpers.unresolvedSuper(IRRuntimeHelpers.java:965)
    org.jruby.ir.runtime.IRRuntimeHelpers.unresolvedSuperSplatArgs(IRRuntimeHelpers.java:947)
    home.travis.$_dot_rvm.gems.jruby_minus_9_dot_0_dot_5_dot_0.gems.mustermann_minus_0_dot_4_dot_0.lib.mustermann.pattern.invokeSuper2:-unknown-super-target-(/home/travis/.rvm/gems/jruby-9.0.5.0/gems/mustermann-0.4.0/lib/mustermann/pattern.rb)

    home.travis.$_dot_rvm.gems.jruby_minus_9_dot_0_dot_5_dot_0.gems.mustermann_minus_0_dot_4_dot_0.lib.mustermann.pattern.RUBY$block$new$2(/home/travis/.rvm/gems/jruby-9.0.5.0/gems/mustermann-0.4.0/lib/mustermann/pattern.rb:56)

    org.jruby.runtime.CompiledIRBlockBody.yieldDirect(CompiledIRBlockBody.java:140)
    org.jruby.runtime.IRBlockBody.yieldSpecific(IRBlockBody.java:73)
    org.jruby.runtime.Block.yieldSpecific(Block.java:135)
    org.jruby.ir.runtime.IRRuntimeHelpers.yieldSpecific(IRRuntimeHelpers.java:480)

    home.travis.$_dot_rvm.gems.jruby_minus_9_dot_0_dot_5_dot_0.gems.tool_minus_0_dot_2_dot_3.lib.tool.equality_map.RUBY$method$fetch$0(/home/travis/.rvm/gems/jruby-9.0.5.0/gems/tool-0.2.3/lib/tool/equality_map.rb:38)

    org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:101)
    org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:144)
    org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:229)
    org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:203)
    org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:209)

    home.travis.$_dot_rvm.gems.jruby_minus_9_dot_0_dot_5_dot_0.gems.mustermann_minus_0_dot_4_dot_0.lib.mustermann.pattern.invokeOther15:fetch(/home/travis/.rvm/gems/jruby-9.0.5.0/gems/mustermann-0.4.0/lib/mustermann/pattern.rb)

    home.travis.$_dot_rvm.gems.jruby_minus_9_dot_0_dot_5_dot_0.gems.mustermann_minus_0_dot_4_dot_0.lib.mustermann.pattern.RUBY$method$new$0(/home/travis/.rvm/gems/jruby-9.0.5.0/gems/mustermann-0.4.0/lib/mustermann/pattern.rb:56)

    org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:101)
    org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:144)
    org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:229)
    org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:205)
    org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:193)

    home.travis.$_dot_rvm.gems.jruby_minus_9_dot_0_dot_5_dot_0.gems.mustermann_minus_0_dot_4_dot_0.lib.mustermann.invokeOther23:new(/home/travis/.rvm/gems/jruby-9.0.5.0/gems/mustermann-0.4.0/lib/mustermann.rb)

    home.travis.$_dot_rvm.gems.jruby_minus_9_dot_0_dot_5_dot_0.gems.mustermann_minus_0_dot_4_dot_0.lib.mustermann.RUBY$method$new$0(/home/travis/.rvm/gems/jruby-9.0.5.0/gems/mustermann-0.4.0/lib/mustermann.rb:66)

    org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:101)
    org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:129)
    org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:194)
    org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:197)
    org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:161)

    home.travis.build.sinatra.sinatra.lib.sinatra.base.invokeOther1:new(/home/travis/build/sinatra/sinatra/lib/sinatra/base.rb)

    home.travis.build.sinatra.sinatra.lib.sinatra.base.RUBY$method$compile$0(/home/travis/build/sinatra/sinatra/lib/sinatra/base.rb:1625)

    org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:131)
    org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:194)
    org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:197)
    org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:313)
    org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:163)

    home.travis.build.sinatra.sinatra.lib.sinatra.base.invokeOther7:compile(/home/travis/build/sinatra/sinatra/lib/sinatra/base.rb)

    home.travis.build.sinatra.sinatra.lib.sinatra.base.RUBY$method$compile!$0(/home/travis/build/sinatra/sinatra/lib/sinatra/base.rb:1613)

    org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:101)
    org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:124)
    org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:171)
    org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:283)
    org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:69)

    home.travis.build.sinatra.sinatra.lib.sinatra.base.invokeOther10:compile!(/home/travis/build/sinatra/sinatra/lib/sinatra/base.rb)

    home.travis.build.sinatra.sinatra.lib.sinatra.base.RUBY$method$route$0(/home/travis/build/sinatra/sinatra/lib/sinatra/base.rb:1592)

    org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:101)
    org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:159)
    org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:264)
    org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:363)
    org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:237)
    org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:241)

    home.travis.build.sinatra.sinatra.lib.sinatra.base.invokeOther3:route(/home/travis/build/sinatra/sinatra/lib/sinatra/base.rb)

    home.travis.build.sinatra.sinatra.lib.sinatra.base.RUBY$method$get$0(/home/travis/build/sinatra/sinatra/lib/sinatra/base.rb:1380)

    org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:101)
    org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:129)
    org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:194)
    org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:323)
    org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:173)
    org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:177)
    org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:325)
    org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:77)
    org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:132)
    org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:148)
    org.jruby.runtime.IRBlockBody.doYield(IRBlockBody.java:186)
    org.jruby.runtime.BlockBody.yield(BlockBody.java:105)
    org.jruby.runtime.Block.yieldNonArray(Block.java:170)
    org.jruby.RubyBasicObject.yieldUnder(RubyBasicObject.java:1730)
    org.jruby.RubyBasicObject.specificEval(RubyBasicObject.java:1753)
    org.jruby.RubyModule.module_eval(RubyModule.java:2693)
    org.jruby.RubyModule$INVOKER$i$module_eval.call(RubyModule$INVOKER$i$module_eval.gen)
    org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:303)
    org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:141)
    org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:145)

    home.travis.build.sinatra.sinatra.lib.sinatra.base.invokeOther2:class_eval(/home/travis/build/sinatra/sinatra/lib/sinatra/base.rb)

    home.travis.build.sinatra.sinatra.lib.sinatra.base.RUBY$method$new$0(/home/travis/build/sinatra/sinatra/lib/sinatra/base.rb:1944)

    org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:101)
    org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:129)
    org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:194)
    org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:171)
    org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:177)

    home.travis.build.sinatra.sinatra.test.helper.invokeOther1:new(/home/travis/build/sinatra/sinatra/test/helper.rb)

    home.travis.build.sinatra.sinatra.test.helper.RUBY$method$mock_app$0(/home/travis/build/sinatra/sinatra/test/helper.rb:64)

    org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:101)
    org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:124)

    ...

From travis: https://travis-ci.org/sinatra/sinatra/jobs/106516310

@kares
Copy link
Member

@kares kares commented Feb 3, 2016

🃏 mustermann striped down reproduction .rb piece :

require 'mustermann'

counter = 0
10_000.times do
  counter += 1
  Mustermann::AST::Pattern.new("/#{counter}")
end
java.lang.NoSuchMethodError: home.kares.workspace.oss.jruby.lib.ruby.gems.shared.gems.mustermann_minus_0_dot_4_dot_0.lib.mustermann.regexp_based.hash:0(Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/runtime/builtin/IRubyObject;
                    initialize at /home/kares/workspace/oss/jruby/lib/ruby/gems/shared/gems/mustermann-0.4.0/lib/mustermann/regexp_based.rb:18
                   invokeExact at org/jruby/internal/runtime/methods/CompiledIRMethod.java:233
                          call at org/jruby/internal/runtime/methods/CompiledIRMethod.java:94
                          call at org/jruby/internal/runtime/methods/MixedModeIRMethod.java:98
                  cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:273
                     callBlock at org/jruby/runtime/callsite/CachingCallSite.java:79
                          call at org/jruby/runtime/callsite/CachingCallSite.java:83
                   newInstance at org/jruby/RubyClass.java:893
               unresolvedSuper at org/jruby/ir/runtime/IRRuntimeHelpers.java:986
      unresolvedSuperSplatArgs at org/jruby/ir/runtime/IRRuntimeHelpers.java:968
                  block in new at /home/kares/workspace/oss/jruby/lib/ruby/gems/shared/gems/mustermann-0.4.0/lib/mustermann/pattern.rb:56
                   yieldDirect at org/jruby/runtime/CompiledIRBlockBody.java:140
                 yieldSpecific at org/jruby/runtime/IRBlockBody.java:73
                 yieldSpecific at org/jruby/runtime/Block.java:135
                 yieldSpecific at org/jruby/ir/runtime/IRRuntimeHelpers.java:480
                         fetch at /home/kares/workspace/oss/jruby/lib/ruby/gems/shared/gems/tool-0.2.3/lib/tool/equality_map.rb:38
                   invokeExact at org/jruby/internal/runtime/methods/CompiledIRMethod.java:233
                          call at org/jruby/internal/runtime/methods/CompiledIRMethod.java:106
                          call at org/jruby/internal/runtime/methods/CompiledIRMethod.java:131
                          call at org/jruby/internal/runtime/methods/MixedModeIRMethod.java:203
                  cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:343
                     callBlock at org/jruby/runtime/callsite/CachingCallSite.java:205
                          call at org/jruby/runtime/callsite/CachingCallSite.java:209
                           new at /home/kares/workspace/oss/jruby/lib/ruby/gems/shared/gems/mustermann-0.4.0/lib/mustermann/pattern.rb:56
                   invokeExact at org/jruby/internal/runtime/methods/CompiledIRMethod.java:233
                          call at org/jruby/internal/runtime/methods/CompiledIRMethod.java:106
                          call at org/jruby/internal/runtime/methods/CompiledIRMethod.java:122
                          call at org/jruby/internal/runtime/methods/MixedModeIRMethod.java:168
                          call at org/jruby/internal/runtime/methods/DynamicMethod.java:197
                  cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:313
                          call at org/jruby/runtime/callsite/CachingCallSite.java:163
@kares kares added the jit label Feb 8, 2016
@headius
Copy link
Member

@headius headius commented Feb 13, 2016

@zzak That trace looks like a bug in JIT, but I'm not sure how it would happen.

@headius
Copy link
Member

@headius headius commented Feb 13, 2016

Ok, this shouldn't be bad. The method in question is here:

    def initialize(string, **options)
      super
      regexp       = compile(**options)
      @peek_regexp = /\A(#{regexp})/
      @regexp      = /\A#{regexp}\Z/
    end

And it's the compile line that's blowing up. So something about processing kwrest on the call side is not jitting right.

@headius
Copy link
Member

@headius headius commented Feb 13, 2016

Hmm. I'm still having no luck reproducing this on my local system with either 9.0.5.0 or master on Java 8.

@headius
Copy link
Member

@headius headius commented Feb 13, 2016

If someone else can reproduce this consistently with @kares' script, please run it with -Xcompile.dump and gist the output somewhere.

@kares
Copy link
Member

@kares kares commented Feb 14, 2016

@headius reproducing consistently (tried recent master) ... here's my setup https://gist.github.com/kares/410a35e3ba69bdf2a770

you'll find a -Xcompile.dump output as well, used script.rb as above except for a missing require :

require 'mustermann'
require 'mustermann/sinatra'

counter = 0
1000.times do

  counter += 1
  Mustermann::AST::Pattern.new("/#{counter}")
end

... previously a failed to narrow this down further except as you say that its kwrest related

@kares kares self-assigned this Feb 22, 2016
@kares kares closed this in 8f0378e Feb 22, 2016
@headius
Copy link
Member

@headius headius commented Mar 4, 2016

Nice find!

@zzak
Copy link
Author

@zzak zzak commented Mar 7, 2016

Wooooooo!! 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.