JDK-8156179 : JVM crash in Java_java_util_zip_ZipFile_getEntry
  • Type: Bug
  • Component: core-libs
  • Affected Version: 8u92
  • Priority: P3
  • Status: Resolved
  • Resolution: Duplicate
  • Submitted: 2016-05-06
  • Updated: 2016-05-31
  • Resolved: 2016-05-31
Related Reports
Duplicate :  
Relates :  
Description
JVM crash in Java_java_util_zip_ZipFile_getEntry, 
Attached in the hs_error file.
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGBUS (0x7) at pc=0x00007fde40016a32, pid=7808, tid=0x00007fde4075b700
#
# JRE version: Java(TM) SE Runtime Environment (8.0_92-b14) (build 1.8.0_92-b14)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.92-b14 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libzip.so+0x11a32]  newEntry+0x62
#
# 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.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
==
This issue doesn't exist in 9 ea b-15, it only exist in 8uxx, and i didn't find it either 7 also.
Issue is more relevant to JDK-8013062, and it suggested that -Dsun.zip.disableMemoryMapping=true option may avaoid this issue. But why issue is not reproducible in 9 without using this option.

This issue is 100% reproducible
here are the steps to reproduce.
-sh-4.1$ /opt/java/jdk1.8.0_92/bin/javac ZipCrashTest.java
-sh-4.1$
-sh-4.1$ /opt/java/jdk1.8.0_92/bin/java ZipCrashTest
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGBUS (0x7) at pc=0x00007fde40016a32, pid=7808, tid=0x00007fde4075b700
#
# JRE version: Java(TM) SE Runtime Environment (8.0_92-b14) (build 1.8.0_92-b14)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.92-b14 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libzip.so+0x11a32]  newEntry+0x62
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/fmatte/JI/9036931/hs_err_pid7808.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Aborted (core dumped)

Comments
It appears -Dsun.zip.disableMemoryMapping=true helps. The test case obviously suggests the zip/JAR file is being overridden while in use. And the changes we made in jdk9 does solve the problem
31-05-2016