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

UnsupportedOperationException: BUG: invoking UndefinedMethod.call; (doing warble) #4029

Closed
areman opened this issue Jul 26, 2016 · 6 comments

Comments

@areman
Copy link
Contributor

areman commented Jul 26, 2016

Since jruby 9.1.0.0 I can't warble a rails application. jruby 9.0.5.0 and 1.7.x work well. I'm running ubuntu x64.

jruby -Xcompile.mode=OFF -Xcompile.invokedynamic=false -d -S warble

backtrace

java.lang.UnsupportedOperationException: BUG: invoking UndefinedMethod.call; report at http://bugs.jruby.org
/home/amos/sample/common/smile/rvm/gems/jruby-9.1.0.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in block in require' /home/amos/sample/common/smile/rvm/gems/jruby-9.1.0.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:inload_dependency'
/home/amos/sample/common/smile/rvm/gems/jruby-9.1.0.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in require' /home/amos/sample/sample/rails/amos/vendor/plugins/amos_base/app/runtime_env/preinitializer.rb:78:in'
/home/amos/sample/common/smile/rvm/gems/jruby-9.1.0.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:1:in block in (root)' /home/amos/sample/common/smile/rvm/gems/jruby-9.1.0.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:inrequire'
/home/amos/sample/common/smile/rvm/gems/jruby-9.1.0.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in load_dependency' /home/amos/sample/common/smile/rvm/gems/jruby-9.1.0.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in'
/home/amos/sample/sample/rails/amos/config/application.rb:6:in block in (root)' /home/amos/sample/common/smile/rvm/gems/jruby-9.1.0.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:1:in(root)'
/home/amos/sample/common/smile/rvm/gems/jruby-9.1.0.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in require' /home/amos/sample/common/smile/rvm/gems/jruby-9.1.0.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in'
/home/amos/sample/common/smile/rvm/gems/jruby-9.1.0.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in block in require' /home/amos/sample/sample/rails/amos/config/environment.rb:2:in(root)'
/home/amos/sample/common/smile/rvm/gems/jruby-9.1.0.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:1:in (root)' /home/amos/sample/common/smile/rvm/gems/jruby-9.1.0.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in'
/home/amos/sample/common/smile/rvm/gems/jruby-9.1.0.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in block in load_dependency' /home/amos/sample/common/smile/rvm/gems/jruby-9.1.0.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:inrequire'
/home/amos/sample/sample/rails/amos/Rakefile:8:in (root)' /home/amos/sample/common/smile/rvm/gems/jruby-9.1.0.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:1:inblock in (root)'
/home/amos/sample/common/smile/rvm/gems/jruby-9.1.0.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:268:in load' /home/amos/sample/common/smile/rvm/gems/jruby-9.1.0.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:inload_dependency'
/home/amos/sample/common/smile/rvm/gems/jruby-9.1.0.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:268:in load' /home/amos/sample/common/smile/rvm/gems/jruby-9.1.0.0/gems/warbler-2.0.3/lib/warbler/application.rb:63:inblock in load_project_rakefile'
/home/amos/sample/common/smile/rvm/gems/jruby-9.1.0.0/gems/warbler-2.0.3/lib/warbler/application.rb:58:in load_project_rakefile' /home/amos/sample/common/smile/rvm/gems/jruby-9.1.0.0/gems/warbler-2.0.3/lib/warbler.rb:26:inproject_application'
/home/amos/sample/common/smile/rvm/gems/jruby-9.1.0.0/gems/warbler-2.0.3/lib/warbler/traits/rails.rb:27:in <eval>' /home/amos/sample/common/smile/rvm/gems/jruby-9.1.0.0/gems/warbler-2.0.3/lib/warbler/traits.rb:29:inbefore_configure'
/home/amos/sample/common/smile/rvm/gems/jruby-9.1.0.0/gems/warbler-2.0.3/lib/warbler/traits.rb:29:in before_configure' /home/amos/sample/common/smile/rvm/gems/jruby-9.1.0.0/gems/warbler-2.0.3/lib/warbler/config.rb:215:inblock in initialize'
config/warble.rb:31:in initialize' /home/amos/sample/common/smile/rvm/gems/jruby-9.1.0.0/gems/warbler-2.0.3/lib/warbler/task.rb:46:ininitialize'
/home/amos/sample/common/smile/rvm/gems/jruby-9.1.0.0/gems/warbler-2.0.3/lib/warbler/application.rb:27:in `load_rakefile'

stacktrace

java.lang.UnsupportedOperationException: BUG: invoking UndefinedMethod.call; report at http://bugs.jruby.org
java.lang.UnsupportedOperationException: BUG: invoking UndefinedMethod.call; report at http://bugs.jruby.org
at org.jruby.internal.runtime.methods.UndefinedMethod.call(UndefinedMethod.java:59)
at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:201)
at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:197)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:161)
at org.jruby.ir.runtime.IRRuntimeHelpers.callOptimizedAref(IRRuntimeHelpers.java:1860)
at org.jruby.ir.instructions.ArrayDerefInstr.interpret(ArrayDerefInstr.java:74)
at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:348)
at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:77)
at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:80)
at org.jruby.internal.runtime.methods.InterpretedIRMethod.INTERPRET_METHOD(InterpretedIRMethod.java:133)
at org.jruby.internal.runtime.methods.InterpretedIRMethod.call(InterpretedIRMethod.java:120)
at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:189)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:129)
at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:332)
at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:77)
at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:80)
at org.jruby.internal.runtime.methods.InterpretedIRMethod.INTERPRET_METHOD(InterpretedIRMethod.java:133)
at org.jruby.internal.runtime.methods.InterpretedIRMethod.call(InterpretedIRMethod.java:120)
at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:189)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:293)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:131)
at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:332)
at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:77)
at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:112)
at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:99)
at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:35)
at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
at org.jruby.Ruby.runInterpreter(Ruby.java:849)
at org.jruby.Ruby.loadFile(Ruby.java:2978)
at org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:235)
at org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:34)
at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:900)
at org.jruby.runtime.load.LoadService.smartLoadInternal(LoadService.java:540)
at org.jruby.runtime.load.LoadService.requireCommon(LoadService.java:427)
at org.jruby.runtime.load.LoadService.require(LoadService.java:393)
at org.jruby.RubyKernel.requireCommon(RubyKernel.java:951)
at org.jruby.RubyKernel.require19(RubyKernel.java:944)
at org.jruby.RubyKernel$INVOKER$s$1$0$require19.call(RubyKernel$INVOKER$s$1$0$require19.gen)
at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneBlock.call(JavaMethod.java:582)
at org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:101)
at org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:101)
at org.jruby.ir.runtime.IRRuntimeHelpers.unresolvedSuper(IRRuntimeHelpers.java:998)
at org.jruby.ir.instructions.ZSuperInstr.interpret(ZSuperInstr.java:71)
at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:348)
at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:161)
at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:132)
at org.jruby.runtime.InterpretedIRBlockBody.yieldDirect(InterpretedIRBlockBody.java:109)
at org.jruby.runtime.IRBlockBody.yieldSpecific(IRBlockBody.java:73)
at org.jruby.runtime.Block.yieldSpecific(Block.java:136)
at org.jruby.ir.runtime.IRRuntimeHelpers.yieldSpecific(IRRuntimeHelpers.java:480)
at org.jruby.ir.instructions.YieldInstr.interpret(YieldInstr.java:74)
at org.jruby.ir.interpreter.InterpreterEngine.processOtherOp(InterpreterEngine.java:550)
at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:203)
at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86)
at org.jruby.internal.runtime.methods.InterpretedIRMethod.INTERPRET_METHOD(InterpretedIRMethod.java:157)
at org.jruby.internal.runtime.methods.InterpretedIRMethod.call(InterpretedIRMethod.java:148)
at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:171)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:177)
at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:325)
at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:161)
at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86)
at org.jruby.internal.runtime.methods.InterpretedIRMethod.INTERPRET_METHOD(InterpretedIRMethod.java:157)
at org.jruby.internal.runtime.methods.InterpretedIRMethod.call(InterpretedIRMethod.java:148)
at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:197)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:313)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:163)
at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:77)
at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:112)
at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:99)
at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:35)
at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
at org.jruby.Ruby.runInterpreter(Ruby.java:849)
at org.jruby.Ruby.loadFile(Ruby.java:2978)
at org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:235)
at org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:34)
at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:900)
at org.jruby.runtime.load.LoadService.smartLoadInternal(LoadService.java:540)
at org.jruby.runtime.load.LoadService.requireCommon(LoadService.java:427)
at org.jruby.runtime.load.LoadService.require(LoadService.java:393)
at org.jruby.RubyKernel.requireCommon(RubyKernel.java:951)
at org.jruby.RubyKernel.require19(RubyKernel.java:944)
at org.jruby.RubyKernel$INVOKER$s$1$0$require19.call(RubyKernel$INVOKER$s$1$0$require19.gen)
at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneBlock.call(JavaMethod.java:582)
at org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:101)
at org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:101)
at org.jruby.ir.runtime.IRRuntimeHelpers.unresolvedSuper(IRRuntimeHelpers.java:998)
at org.jruby.ir.instructions.ZSuperInstr.interpret(ZSuperInstr.java:71)
at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:348)
at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:161)
at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:132)
at org.jruby.runtime.InterpretedIRBlockBody.yieldDirect(InterpretedIRBlockBody.java:109)
at org.jruby.runtime.IRBlockBody.yieldSpecific(IRBlockBody.java:73)
at org.jruby.runtime.Block.yieldSpecific(Block.java:136)
at org.jruby.ir.runtime.IRRuntimeHelpers.yieldSpecific(IRRuntimeHelpers.java:480)

I have no idea where to start with some investigation.

Best Regards,
André

@kares
Copy link
Member

kares commented Jul 26, 2016

hey! latest 9.1 release is 9.1.2.0 ATM ... did you confirm it doesn't work there as well? thanks!

@areman
Copy link
Contributor Author

areman commented Jul 26, 2016

It doesn't work with 9.1.2.0. I tried all releases and the error occoured from 9.1.0.0.

@kares kares added this to the JRuby 9.1.3.0 milestone Jul 26, 2016
@kares kares changed the title UnsupportedOperationException: BUG: invoking UndefinedMethod.call; report at http://bugs.jruby.org UnsupportedOperationException: BUG: invoking UndefinedMethod.call; (doing warble) Jul 26, 2016
@enebo
Copy link
Member

enebo commented Jul 26, 2016

@areman can you grab a nightly at ci.jruby.org and see if this was fixed? We did fix one other Undefined problem last week. If not and you are comfortable building JRuby it would be cool if you could bisect which commit broke this. Otherwise we will probably need some reduced case.

@enebo
Copy link
Member

enebo commented Jul 26, 2016

I doubt this is the actual code but I can repro this now:

JRUBY_OPTS="-Xcompile.mode=OFF -Xcompile.invokedynamic=false -d" jruby -e 'a = {"a": 1}; loop { p a["a"]; class Hash; undef :[]; end }'

@enebo
Copy link
Member

enebo commented Jul 26, 2016

@areman this is likely fixed now but if you could try to get a nightly (ci.jruby.org). I just fired off a new dist build now so it should be done in a while (and of course it will fire again in several hours for our normal run).

The failure starting in 9.1.0.0 makes sense because we added a new special instruction for a["a"] so we can de-duplicate allocating the string key if it happens to be a Hash. Our Hash check uses a Java instanceof Check and any extended Hash (class H < Hash) which mucks with aref ([]) is a candidate for problems. Here is another less bizarre repro:

jruby -e 'class H < Hash; undef []; end; h = H.new; 10.times { h["o"] rescue p $! }'

enebo added a commit that referenced this issue Jul 26, 2016
…: invoking UndefinedMethod.call; (doing warble)
@enebo enebo removed the needs tests label Jul 26, 2016
@areman
Copy link
Contributor Author

areman commented Jul 27, 2016

Today I check version 9.1.3.0 and wrabble works fine, again :-)

Thanks !!

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

No branches or pull requests

4 participants