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

InvalidTransformException with jdk 8u5 and jruby 1.7.12 #1764

Closed
jillesvangurp opened this issue Jun 26, 2014 · 8 comments
Closed

InvalidTransformException with jdk 8u5 and jruby 1.7.12 #1764

jillesvangurp opened this issue Jun 26, 2014 · 8 comments

Comments

@jillesvangurp
Copy link

We ran into an invokedynamic related error below after upgrading to jdk 8u5 on centos 6.5. When we switched off invokedynamic the problem went away so it seems something is wrong there. Previously the code ran fine on openjdk 1.7u55 with jruby 1.7.12 which would still have invokedynamic switched off by default as I understand?.

Java::JavaLang::RuntimeException

com.headius.invokebinder.InvalidTransformException: java.lang.IllegalAccessException: no such method: rubyjit.Arel::Nodes::Equality$$operator_4f7ea62eb61d7ee7f026f44eb616c423c4bcf211681842940.file(Arel::Nodes::Equality$$operator_4f7ea62eb61d7ee7f026f44eb616c423c4bcf211681842940,ThreadContext,IRubyObject,Block)IRubyObject/invokeStatic

["org.jruby.runtime.invokedynamic.InvocationLinker.createRubyHandle(InvocationLinker.java:1689)", "org.jruby.runtime.invokedynamic.InvocationLinker.access$900(InvocationLinker.java:75)", "org.jruby.runtime.invokedynamic.InvocationLinker$RubyCallGenerator.generate(InvocationLinker.java:715)", "org.jruby.runtime.invokedynamic.InvocationLinker.tryDispatchDirect(InvocationLinker.java:765)", "org.jruby.runtime.invokedynamic.InvocationLinker.getTarget(InvocationLinker.java:775)", "org.jruby.runtime.invokedynamic.InvocationLinker.invocationFallback(InvocationLinker.java:137)", "rubyjit.ActiveRecord::SpawnMethods$$merge_5d65fae5b0deaa9f0b105979a51e3e844882485d681842940.block_3$RUBY$file(/opt/linko-rails-jruby/vendor/bundle/jruby/1.9/gems/activerecord-3.2.17/lib/active_record/relation/spawn_methods.rb:39)", "rubyjit$ActiveRecord::SpawnMethods$$merge_5d65fae5b0deaa9f0b105979a51e3e844882485d681842940$block_3$RUBY$file.call(rubyjit$ActiveRecord::SpawnMethods$$merge_5d65fae5b0deaa9f0b1 05979a51e3e844882485d681842940$block_3$RUBY$file)", "org.jruby.runtime.CompiledBlock19.yield(CompiledBlock19.java:135)", "org.jruby.runtime.Block.yield(Block.java:142)", "org.jruby.RubyArray.rejectBang(RubyArray.java:2622)", "org.jruby.RubyArray.reject_bang(RubyArray.java:2643)", "org.jruby.RubyArray.rejectCommon(RubyArray.java:2600)", "org.jruby.RubyArray.reject(RubyArray.java:2606)", "rubyjit.ActiveRecord::SpawnMethods$$merge_5d65fae5b0deaa9f0b105979a51e3e844882485d681842940.file(/opt/linko-rails-jruby/vendor/bundle/jruby/1.9/gems/activerecord-3.2.17/lib/active_record/relation/spawn_methods.rb:37)", "rubyjit.ActiveRecord::SpawnMethods$$merge_5d65fae5b0deaa9f0b105979a51e3e844882485d681842940.file(/opt/linko-rails-jruby/vendor/bundle/jruby/1.9/gems/activerecord-3.2.17/lib/active_record/relation/spawn_methods.rb)", "org.jruby.internal.runtime.methods.JittedMethod.call(JittedMethod.java:181)", "org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:32 6)", "org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170)", "org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)", "org.jruby.ast.DAsgnNode.interpret(DAsgnNode.java:110)", "org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)", "org.jruby.ast.BlockNode.interpret(BlockNode.java:71)", "org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)", "org.jruby.runtime.Interpreted19Block.evalBlockBody(Interpreted19Block.java:206)", "org.jruby.runtime.Interpreted19Block.yield(Interpreted19Block.java:194)", "org.jruby.runtime.Interpreted19Block.call(Interpreted19Block.java:125)", "org.jruby.runtime.Block.call(Block.java:101)", "org.jruby.RubyProc.call(RubyProc.java:290)", "org.jruby.internal.runtime.methods.ProcMethod.call(ProcMethod.java:64)", "rubyjit.ActiveRecord::Delegation$$of_2bd83e8652203dfda38c36f9155b36fdd8f53885681842940.block_0$RUBY$file(/opt/linko-rails-jruby/vendor/bundle/jruby/1.9/gems/activerecord-3.2.17/lib/active_rec ord/relation/delegation.rb:18)", "rubyjit$ActiveRecord::Delegation$$of_2bd83e8652203dfda38c36f9155b36fdd8f53885681842940$block_0$RUBY$file.call(rubyjit$ActiveRecord::Delegation$$of_2bd83e8652203dfda38c36f9155b36fdd8f53885681842940$block_0$RUBY$file)", "org.jruby.runtime.CompiledBlock19.yieldSpecificInternal(CompiledBlock19.java:117)", "org.jruby.runtime.CompiledBlock19.yieldSpecific(CompiledBlock19.java:92)", "org.jruby.runtime.Block.yieldSpecific(Block.java:111)", "org.jruby.runtime.invokedynamic.InvocationLinker.yieldSpecificFallback(InvocationLinker.java:412)", "rubyjit.ActiveRecord::Relation$$scoping_864cd08298e96882196793a5c4892622a090a7e4681842940.block_0$RUBY$file(/opt/linko-rails-jruby/vendor/bundle/jruby/1.9/gems/activerecord-3.2.17/lib/active_record/relation.rb:241)", "rubyjit$ActiveRecord::Relation$$scoping_864cd08298e96882196793a5c4892622a090a7e4681842940$block_0$RUBY$file.call(rubyjit$ActiveRecord::Relation$$scoping_864cd08298e96882196793a5c4892622a090a7 e4681842940$block_0$RUBY$file)", "org.jruby.runtime.CompiledBlock19.yieldSpecificInternal(CompiledBlock19.java:117)", "org.jruby.runtime.CompiledBlock19.yieldSpecific(CompiledBlock19.java:92)", "org.jruby.runtime.Block.yieldSpecific(Block.java:111)", "org.jruby.runtime.invokedynamic.InvocationLinker.yieldSpecificFallback(InvocationLinker.java:412)", "rubyjit.ActiveRecord::Scoping::ClassMethods$$with_scope_aabb6b6ff8866c41e45e0abc3f956131e5974c20681842940.chained_0_ensure_1$RUBY$ensure(/opt/linko-rails-jruby/vendor/bundle/jruby/1.9/gems/activerecord-3.2.17/lib/active_record/scoping.rb:98)", "rubyjit.ActiveRecord::Scoping::ClassMethods$$with_scope_aabb6b6ff8866c41e45e0abc3f956131e5974c20681842940.file(/opt/linko-rails-jruby/vendor/bundle/jruby/1.9/gems/activerecord-3.2.17/lib/active_record/scoping.rb:97)", "rubyjit.ActiveRecord::Scoping::ClassMethods$$with_scope_aabb6b6ff8866c41e45e0abc3f956131e5974c20681842940.file(/opt/linko-rails-jruby/vendor/bundle/jruby/1.9/gems/a ctiverecord-3.2.17/lib/active_record/scoping.rb)", "org.jruby.ast.executable.AbstractScript.file(AbstractScript.java:46)", "org.jruby.internal.runtime.methods.JittedMethod.call(JittedMethod.java:241)", "rubyjit.ActiveRecord::Relation$$scoping_864cd08298e96882196793a5c4892622a090a7e4681842940.file(/opt/linko-rails-jruby/vendor/bundle/jruby/1.9/gems/activerecord-3.2.17/lib/active_record/relation.rb:241)", "rubyjit.ActiveRecord::Relation$$scoping_864cd08298e96882196793a5c4892622a090a7e4681842940.file(/opt/linko-rails-jruby/vendor/bundle/jruby/1.9/gems/activerecord-3.2.17/lib/active_record/relation.rb)", "org.jruby.internal.runtime.methods.JittedMethod.call(JittedMethod.java:161)", "org.jruby.runtime.invokedynamic.InvocationLinker.fail(InvocationLinker.java:1049)",

@donv
Copy link
Member

donv commented Feb 12, 2015

We just got this error with JRuby 1.7.13/1.7.19 and Java 1.8.0_25-b17 on OS X:

Java::JavaLang::RuntimeException: com.headius.invokebinder.InvalidTransformException: java.lang.IllegalAccessException: no such method: rubyjit.Module$$set_name_cache_18af043350d512042b3f510825073a8d77abb2c81528902577.__file__(Module$$set_name_cache_18af043350d512042b3f510825073a8d77abb2c81528902577,ThreadContext,IRubyObject,IRubyObject,IRubyObject,Block)IRubyObject/invokeStatic
org.jruby.runtime.invokedynamic.InvocationLinker.createRubyHandle(InvocationLinker.java:1689)
org.jruby.runtime.invokedynamic.InvocationLinker.access$900(InvocationLinker.java:75)
org.jruby.runtime.invokedynamic.InvocationLinker$RubyCallGenerator.generate(InvocationLinker.java:715)
org.jruby.runtime.invokedynamic.InvocationLinker.tryDispatchDirect(InvocationLinker.java:765)
org.jruby.runtime.invokedynamic.InvocationLinker.getTarget(InvocationLinker.java:775)
org.jruby.runtime.invokedynamic.InvocationLinker.invocationFallback(InvocationLinker.java:171)
rubyjit.ActiveRecord::AttributeMethods::Read::ClassMethods$$define_method_attribute_622a308e637c4f09f093d11fa1a4a2b3f76b457b1528902577.__file__(/Users/uwe/workspace/aifudis/operator/platform/jruby-1.7.13/lib/ruby/gems/shared/gems/activerecord-4.0.13/lib/active_record/attribute_methods/read.rb:55)
rubyjit.ActiveRecord::AttributeMethods::Read::ClassMethods$$define_method_attribute_622a308e637c4f09f093d11fa1a4a2b3f76b457b1528902577.__file__(/Users/uwe/workspace/aifudis/operator/platform/jruby-1.7.13/lib/ruby/gems/shared/gems/activerecord-4.0.13/lib/active_record/attribute_methods/read.rb)
rubyjit.ActiveRecord::AttributeMethods::Read::ClassMethods$$define_method_attribute_622a308e637c4f09f093d11fa1a4a2b3f76b457b1528902577.__file__(/Users/uwe/workspace/aifudis/operator/platform/jruby-1.7.13/lib/ruby/gems/shared/gems/activerecord-4.0.13/lib/active_record/attribute_methods/read.rb)
org.jruby.internal.runtime.methods.JittedMethod.call(JittedMethod.java:101)

...

Lots more stacktrace to add if desired.

@jillesvangurp did you solve your case?

@donv
Copy link
Member

donv commented Feb 12, 2015

Disabling invokedynamic avoids the problem:

jruby -Xcompile.invokedynamic=false -S ...

@jillesvangurp
Copy link
Author

@donv in the end we pretty much worked around it by deprecating our active record code; we no longer use it. That got rid of the problem but there seems to be something with active record that is triggering this.

@perlun
Copy link
Contributor

perlun commented Aug 17, 2015

I seem to have similar issues (also still running JRuby 1.7.13). Weird thing is, I thought invokedynamic was disabled by default?

@donv
Copy link
Member

donv commented Aug 17, 2015

@perlun invokedynamic (indy) was enabled by default until JRuby 1.7.13. It was disabled by default starting with JRuby 1.7.14:

jruby 1.7.13 (1.9.3p392) 2014-06-24 43f133c on Java HotSpot(TM) 64-Bit Server VM 1.8.0_40-b27 +indy [darwin-x86_64]
jruby 1.7.14 (1.9.3p392) 2014-08-27 d368971 on Java HotSpot(TM) 64-Bit Server VM 1.8.0_40-b27 +jit [darwin-x86_64]

@perlun
Copy link
Contributor

perlun commented Aug 31, 2015

OK, thanks. Upgraded now to a newer 1.7 version.

@headius
Copy link
Member

headius commented Jan 17, 2017

No further reports about this and indy use has evolved steadily over the years, especially in the completely new JIT for 9k. I am going to call this invalid unless we get further reports.

@headius headius closed this as completed Jan 17, 2017
@headius headius added this to the Invalid or Duplicate milestone Jan 17, 2017
@jshort
Copy link

jshort commented Feb 21, 2017

I get this generating YardDoc for a jROR application on Jruby 1.7 and the latest JDK even if I set JRUBY_OPTS to turn off invokedynamic

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

6 participants