Hi All,
I am experiencing weird crashes of JVM (both Oracle and OpenJDK) when I run certain set of Java unit tests. They are just a normal Java unit tests using TestNG and there is nothing specific. I run them using Maven or my IDE. If I run them one by one they work, but when I run the entire suite JVM crashes with scary error messages like:
Code:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f337efb6168, pid=2646, tid=139859160426240
#
# JRE version: 7.0_04-b20
# Java VM: Java HotSpot(TM) 64-Bit Server VM (23.0-b21 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [libzip.so+0x5168] ZIP_GetEntry+0x78
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
.... and a long thread dump here ....
Sometimes it also complains about memory corruption like this:
*** glibc detected *** /usr/java/jdk1.7.0_04/jre/bin/java: malloc(): memory corruption: 0x00007f9e04000087 ***
I have no idea where to find a problem. I'm using Fedora for work and I don't do anything special. I installed it a few months ago and just do a periodic updates from time to time.
I tried Oracle JDK and OpenJDK, the problem is the same. It makes me believe that the problem is not in a particular JDK, but rather in the OS.
The issue is 100% reproducible. I even know the exact method call in my Java code where it crashes. The problem is that it only crashes if I run the entire suite, not a single test. So I can't reproduce it on some "hello, world" application.
Thanks for any help!
My system is:
OS:Fedora release 16 (Verne)
uname:Linux 3.3.7-1.fc16.x86_64 #1 SMP Tue May 22 13:59:39 UTC 2012 x86_64
libc:glibc 2.14.90 NPTL 2.14.90
rlimit: STACK 8192k, CORE 0k, NPROC 1024, NOFILE 4096, AS infinity