You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ jruby -v
jruby 9.1.8.0 (2.3.1) 2017-03-06 90fc7ab Java HotSpot(TM) 64-Bit Server VM 25.121-b13 on 1.8.0_121-b13 +jit [darwin-x86_64]
$ uname -a
Darwin abhillman-macbook-pro.local 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64
It's not clear to me whether these traces are indicative of programmer error or a JRuby bug; if the traces are due to programmer error, it would be ideal to have a useful stack trace that mentions Ruby code.
Actual Behavior
Long stacktraces that only mention JRuby internals. An example trace (redacted because it's so long; full captured trace: https://gist.github.com/aryeh-looker/0288adbbafb8c40b24ce18a55748d6b4) — I get a lot of these in my application, but have been unable to consistently reproduce the problem:
Java::JavaLang::StackOverflowError: null
from CompiledIRMethod.java:90:in `call'
from MixedModeIRMethod.java:128:in `call'
from CachingCallSite.java:139:in `callBlock'
from CachingCallSite.java:145:in `call'
from CompiledIRBlockBody.java:156:in `yieldDirect'
from IRBlockBody.java:76:in `yieldSpecific'
from Block.java:136:in `yieldSpecific'
from IRRuntimeHelpers.java:450:in `yieldSpecific'
from YieldSite.java:114:in `yieldSpecific'
from CompiledIRMethod.java:90:in `call'
from MixedModeIRMethod.java:128:in `call'
from CachingCallSite.java:139:in `callBlock'
from CachingCallSite.java:145:in `call'
from CompiledIRBlockBody.java:156:in `yieldDirect'
from IRBlockBody.java:76:in `yieldSpecific'
from Block.java:136:in `yieldSpecific'
from IRRuntimeHelpers.java:450:in `yieldSpecific'
from YieldSite.java:114:in `yieldSpecific'
from CompiledIRMethod.java:90:in `call'
from MixedModeIRMethod.java:128:in `call'
from CachingCallSite.java:139:in `callBlock'
from CachingCallSite.java:145:in `call'
from CompiledIRBlockBody.java:156:in `yieldDirect'
from IRBlockBody.java:76:in `yieldSpecific'
The text was updated successfully, but these errors were encountered:
aryeh-looker
changed the title
Ambiguous StackOverflow Exceptions: Programmer or JRuby Bug?
Ambiguous StackOverflow Exceptions: JRuby or Programmer Bug?
Sep 7, 2017
They could be a problem in the Ruby code you're running or they could be a problem in JRuby. A quick glance at your trace makes me think it's probably a JRuby bug.
CompilerIRBlockBody's next target should be the jitted version of that block, which would show up with a Ruby line number. Instead, it goes straight to another call site that calls the same method with the same block and it starts over again.
I see also you are running JRuby 9.1.8, which is several months old. There's a very good chance this has been fixed in more recent JRuby versions. Could you try updating and see if the problem goes away before we dig deeper?
If a stack overflow happens, we may rewrite it as a Ruby exception...but in both cases we consider it a fatal, unrecoverable error. We also are not generally in the habit of rewriting every Java exception that passes through Ruby, so you may see Java internals in this case.
Environment
Expected Behavior
It's not clear to me whether these traces are indicative of programmer error or a JRuby bug; if the traces are due to programmer error, it would be ideal to have a useful stack trace that mentions Ruby code.
Actual Behavior
Long stacktraces that only mention JRuby internals. An example trace (redacted because it's so long; full captured trace: https://gist.github.com/aryeh-looker/0288adbbafb8c40b24ce18a55748d6b4) — I get a lot of these in my application, but have been unable to consistently reproduce the problem:
The text was updated successfully, but these errors were encountered: