I’m seeing this error sporadically, and haven’t yet found a good
reproduction
case. For some background I’m using JRuby 1.7.4, Datamapper 1.2.0 and
Puma
2.4.0 inside of a warbled up jar file.
Most of the time the application runs just fine. This is the second time
I’ve
seen this specific error though, which has a habit of only showing up
when
important people are using the app
Any hints/tips for hunting down or even trying to reproduce this bug?
So you are hitting this bug because jruby 1.7.4 will turn invokedynamic
on when running against jdk7u40 and invokedynamic needs more memory:
jruby 1.7.5 will fix this by disabling invokedynamic until jdk8 and
until then you can just disable invokedynamic on jruby .7.4 by adding
-Xcompile.invokedynamic=false to your JRUBY_OPTS.
I’m also seeing these on a few clients with JRuby 1.7.4 and an older
version of Puma. So far I’ve only seen the error output on Sun java:
java version “1.7.0_40”
Java™ SE Runtime Environment (build 1.7.0_40-b43)
Java HotSpot™ 64-Bit Server VM (build 24.0-b56, mixed mode)
We’re also using that same version of the JRE.
Around the same time that the java.lang.InternalError popped up, I
noticed the
process was brushing up against the PermGen limits of the JVM. For
example:
identity=Lambda(a0:L,a1:L)=>{
t2:L=Species_L.argL0(a0:L);
t3:L=ValueConversions.identity(t2:L);t3:L}
2013-09-30 16:25:50 +0000: Read error: java.lang.OutOfMemoryError:
PermGen space
jar:file:/tmp/jruby9134330810244587977extract/jruby-stdlib-1.7.4.jar!/META-INF/jruby.home/lib/ruby/1.9/rake/task.rb:1
68 warning: singleton on non-persistent Java type
Java::JavaLang::OutOfMemoryError (http://wiki.jruby.org/Persistence
)
rake aborted!
PermGen space
Looking through our monitoring, I can see the PermGen seems to spike up
a
little bit every now and again, and the latest spike was around the same
time
that the first linked traceback occurred.
On our clients we opted to turn off invokeddynamic for now, since that
seemed to be a sure way to resolve the problem and they were complaining
about being down (server freeze when problem appears).
We’re trying to find a way to reliably reproduce in-house. If we can,
we’ll test the increased MaxPermSize.
On Mon, Sep 30, 2013 at 9:55 PM, Charles Oliver N.
Thanks Ben. Nobody is more frustrated about the interminable issues
with invokedynamic in Java 7, but Java 8 seems to be fixing all of
them (again). For most folks I’ve talked to, permgen increase has made
the issue go away. That doesn’t mean it’s not an issue (indy logic
shouldn’t fall apart when it hits memory limits) but it’s a problem
that will fix itself (or be very rare) when permgen goes away in 8
Thanks Ben. Nobody is more frustrated about the interminable issues
with invokedynamic in Java 7, but Java 8 seems to be fixing all of
them (again). For most folks I’ve talked to, permgen increase has made
the issue go away. That doesn’t mean it’s not an issue (indy logic
shouldn’t fall apart when it hits memory limits) but it’s a problem
that will fix itself (or be very rare) when permgen goes away in 8