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

RuntimeException from JIT #2247

Closed
aportnov opened this issue Nov 26, 2014 · 3 comments
Closed

RuntimeException from JIT #2247

aportnov opened this issue Nov 26, 2014 · 3 comments

Comments

@aportnov
Copy link

@aportnov aportnov commented Nov 26, 2014

It is not very consistent, but once in a while I am getting a RuntimeException like this:

ERROR -- : com.headius.invokebinder.InvalidTransformException: java.lang.IllegalAccessException: no such method: rubyjit.Commons::AMQP::Client$$publish_8DD73C1C3FD7041299B0B695F8A2E116C7622CD1662913876.__file__(Commons::AMQP::Client$$publish_8DD73C1C3FD7041299B0B695F8A2E116C7622CD1662913876,ThreadContext,IRubyObject,IRubyObject,IRubyObject,IRubyObject,Block)IRubyObject/invokeStatic (Java::JavaLang::RuntimeException)
org.jruby.runtime.invokedynamic.InvocationLinker.createRubyHandle(InvocationLinker.java:1441)
org.jruby.runtime.invokedynamic.InvocationLinker.handleForMethod(InvocationLinker.java:607)
org.jruby.runtime.invokedynamic.InvocationLinker.tryDispatchDirect(InvocationLinker.java:551)
org.jruby.runtime.invokedynamic.InvocationLinker.getTarget(InvocationLinker.java:557)
org.jruby.runtime.invokedynamic.InvocationLinker.invocationFallback(InvocationLinker.java:182)
rubyjit.Commons::AMQP::ExchangePool$$publish_B74846FFC831E7614FEC42FDB8A84A756C71F4CE662913876.block_1$RUBY$__file__(/Users/aportnov/.rvm/gems/jruby-1.7.2@basketball-statistics/bundler/gems/common-util-6a5c776581dd/lib/common-mq.rb:166)
rubyjit$Commons::AMQP::ExchangePool$$publish_B74846FFC831E7614FEC42FDB8A84A756C71F4CE662913876$block_1$RUBY$__file__.call(rubyjit$Commons::AMQP::ExchangePool$$publish_B74846FFC831E7614FEC42FDB8A84A756C71F4CE662913876$block_1$RUBY$__file__)
org.jruby.runtime.CompiledBlock19.yield(CompiledBlock19.java:139)
org.jruby.runtime.CompiledBlock19.yieldSpecific(CompiledBlock19.java:101)
org.jruby.runtime.Block.yieldSpecific(Block.java:108)
org.jruby.runtime.invokedynamic.InvocationLinker.yieldSpecificFallback(InvocationLinker.java:406)
rubyjit.Commons::ObjectPool$$with_238294DCBA8474E3B8E45AE5932C31F9240DDEB5662913876.chained_1_rescue_1$RUBY$SYNTHETIC__file__(/Users/aportnov/.rvm/gems/jruby-1.7.2@basketball-statistics/bundler/gems/common-util-6a5c776581dd/lib/common-pool.rb:55)
rubyjit.Commons::ObjectPool$$with_238294DCBA8474E3B8E45AE5932C31F9240DDEB5662913876.chained_0_ensure_1$RUBY$__ensure__(/Users/aportnov/.rvm/gems/jruby-1.7.2@basketball-statistics/bundler/gems/common-util-6a5c776581dd/lib/common-pool.rb)
rubyjit.Commons::ObjectPool$$with_238294DCBA8474E3B8E45AE5932C31F9240DDEB5662913876.__file__(/Users/aportnov/.rvm/gems/jruby-1.7.2@basketball-statistics/bundler/gems/common-util-6a5c776581dd/lib/common-pool.rb:54)
rubyjit.Commons::AMQP::ExchangePool$$publish_B74846FFC831E7614FEC42FDB8A84A756C71F4CE662913876.chained_0_rescue_1$RUBY$SYNTHETIC__file__(/Users/aportnov/.rvm/gems/jruby-1.7.2@basketball-statistics/bundler/gems/common-util-6a5c776581dd/lib/common-mq.rb:165)
rubyjit.Commons::AMQP::ExchangePool$$publish_B74846FFC831E7614FEC42FDB8A84A756C71F4CE662913876.block_0$RUBY$__file__(/Users/aportnov/.rvm/gems/jruby-1.7.2@basketball-statistics/bundler/gems/common-util-6a5c776581dd/lib/common-mq.rb:164)
rubyjit$Commons::AMQP::ExchangePool$$publish_B74846FFC831E7614FEC42FDB8A84A756C71F4CE662913876$block_0$RUBY$__file__.call(rubyjit$Commons::AMQP::ExchangePool$$publish_B74846FFC831E7614FEC42FDB8A84A756C71F4CE662913876$block_0$RUBY$__file__)
org.jruby.runtime.CompiledBlock19.yield(CompiledBlock19.java:163)
org.jruby.runtime.CompiledBlock19.call(CompiledBlock19.java:91)
org.jruby.runtime.Block.call(Block.java:89)
org.jruby.RubyProc.call(RubyProc.java:261)
org.jruby.RubyProc.call19(RubyProc.java:249)
org.jruby.RubyProc$INVOKER$i$0$0$call19.call(RubyProc$INVOKER$i$0$0$call19.gen)
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:200)
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:196)
rubyjit.Commons::AMQP::Task$$call_EC41E4A9C074F5B385CEC7442ECC1C71340CA968662913876.__file__(/Users/aportnov/.rvm/gems/jruby-1.7.2@basketball-statistics/bundler/gems/common-util-6a5c776581dd/lib/common-mq.rb:133)
rubyjit.Commons::AMQP::Task$$call_EC41E4A9C074F5B385CEC7442ECC1C71340CA968662913876.__file__(/Users/aportnov/.rvm/gems/jruby-1.7.2@basketball-statistics/bundler/gems/common-util-6a5c776581dd/lib/common-mq.rb)
rubyjit.Commons::AMQP::Task$$call_EC41E4A9C074F5B385CEC7442ECC1C71340CA968662913876.__file__(/Users/aportnov/.rvm/gems/jruby-1.7.2@basketball-statistics/bundler/gems/common-util-6a5c776581dd/lib/common-mq.rb)
org.jruby.internal.runtime.methods.JittedMethod.call(JittedMethod.java:101)
Commons$$AMQP$$Task_807396309.call(Commons$$AMQP$$Task_807396309.gen:13)
java.util.concurrent.FutureTask.run(FutureTask.java:266)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
java.lang.Thread.run(Thread.java:745)

If I restart server, it is usually working fine.

This is my command line running on jruby-1.7.2 :

jruby -J-server -J-Dcom.sun.management.jmxremote -J-Dcom.sun.management.jmxremote.port=8484 -J-Dcom.sun.management.jmxremote.authenticate=false -J-Dcom.sun.management.jmxremote.ssl=false -J-Xmx2048m -J-Xms1024m -J-Xmn512m -J-XX:+CMSClassUnloadingEnabled -J-XX:+UseConcMarkSweepGC -S trinidad
@nirvdrum
Copy link
Contributor

@nirvdrum nirvdrum commented Nov 27, 2014

Is there a reason you still need to be on 1.7.2? It's quite old and a ton of bug fixes have landed in the 1.7.x releases since then, including an updated version of invokebinder. And there's a pretty good chance that if you do want invokedynamic support, you want the newer release. You're sort of in a "no man's land" right now.

@aportnov
Copy link
Author

@aportnov aportnov commented Nov 27, 2014

Thanks Kevin,

I figured it was probably fixed in a new version, but just wanted to make
sure you guys have seen it. . We are migrating to never jruby versions on a
project by project bases. This one is in production on 1.7.2, so that's why
I run it in development on the same version for now. The difference is that
in production it is running on java 6..so I am guessing no invoke dynamic
there.. locally I ran it on Java 8..
Thanks for taking time to look into it.
Happy Thanksgiving!

Alex
On Nov 26, 2014 8:01 PM, "Kevin Menard" notifications@github.com wrote:

Is there a reason you still need to be on 1.7.2? It's quite old and a ton
of bug fixes have landed in the 1.7.x releases since then, including an
updated version of invokebinder. And there's a pretty good chance that if
you do want invokedynamic support, you want the newer release. You're sort
of in a "no man's land" right now.


Reply to this email directly or view it on GitHub
#2247 (comment).

@nirvdrum
Copy link
Contributor

@nirvdrum nirvdrum commented Nov 27, 2014

The early JRuby 1.7.x releases default to using invokedynamic if run on JDK 8. JDK 6 doesn't support invokedynamic, so it would never be enabled there. If you're not using it in production, you may as well disable it in development, too. This should "fix" the problem for you until you're able to upgrade.

You can disable it by adding -Xcompile.invokedynamic=false to your JRUBY_OPTS environment variable.

I'm going to close this for now. If you still see an invokedynamic issue in newer 1.7.x releases, please re-open or open a new issue. Thanks!

@nirvdrum nirvdrum closed this Nov 27, 2014
@enebo enebo added this to the Invalid or Duplicate milestone Dec 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants