Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JVM Crash with G1 GC and trove library

We have the following problem: On some of our Linux machine, Java applications which make use of the trove library and G1 GC will crash rather fast with messages of the following type:

A fatal error has been detected by the Java Runtime Environment:

 SIGSEGV (0xb) at pc=0x00002aaaaaef81d1, pid=31063, tid=1141000512

JRE version: 6.0_29-b11
Java VM: Java HotSpot(TM) 64-Bit Server VM (20.4-b02 mixed mode linux-amd64 )
Problematic frame:
J  gnu.trove.impl.hash.TObjectHash.insertKey(Ljava/lang/Object;)I

What strikes me here is the problematic frame, which is always the same. I'm used to some library appearing here, but never acual Java code. Oddly enough, some machines which ought to have an identical setup are not affected. On Windows, I've also never seen this. The problem persists with recent Java 7 versions. Switching from G1 GC to any other GC resolves the problem immediately. We use trove library as resolved by Maven, tried several versions there, including 3.0.3 - always the same problem.

Does anybody know what could be the reason for this? Any known G1 GC bug? Is trove compiled in a special way which might create this problem?

Update: different application, different server, most recent Java (7u5), similar problem:

A fatal error has been detected by the Java Runtime Environment:

SIGSEGV (0xb) at pc=0x00002aadb7a38093, pid=14100, tid=46925573367184

JRE version: 7.0_05-b05
Java VM: Java HotSpot(TM) 64-Bit Server VM (23.1-b03 mixed mode linux-amd64 compressed oops)
Problematic frame:
J  gnu.trove.map.hash.THashMap.put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

Again, switching to a GC other than G1 will help. Keep G1 but get rid of Trove library, and the problem will also disappear. Unfortunately, I was not able to create a minimal test suite, so it's difficult to file a reasonable bug report. Any ideas on the cause, or any idea which could help me building the test suite?

like image 911
malamut Avatar asked Jul 02 '12 12:07

malamut


2 Answers

It appears that this is indeed a JDK bug, https://bugs.openjdk.java.net/browse/JDK-8023472, fixed by Java 7 update 65+.

like image 90
Kimoon Avatar answered Sep 19 '22 19:09

Kimoon


G1GC isn't "ready for use" in Java 6; It's only in Java 7u4 that it finally became production ready. See http://phosphor-escence.blogspot.com/2012/05/java7u4-enables-g1gc-without.html for a note on it, and there's more on Google, of course.

like image 22
Joseph Ottinger Avatar answered Sep 19 '22 19:09

Joseph Ottinger