Tuesday, November 29, 2016

JVM crash due to Loop Unswitching

During performance testing execution on my application stack I came across following fault multiple times. My application stack uses Apache Tomcat 7 and JDK 1.7.0_55.

After investigation found that this is a bug in JDK JIT compiler which is fixed in later version started from update 60.

I had to get the release out and could not afford to upgrade the JDK version so used "-XX:-LoopUnswitching" switch to disable the loop unswitching.

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00002aaab0363f9e, pid=28321, tid=1102854464
#
# JRE version: 7.0_25-b15
# Java VM: Java HotSpot(TM) 64-Bit Server VM (23.25-b01 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# J  org.apache.http.impl.cookie.BestMatchSpec.formatCookies(Ljava/util/List;)Ljava/util/List;
#
# An error report file with more information is saved as:
# /tmp/hs_err_pid28321.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
#