JVM crash in java.util.zip.ZipFile.getEntry

Solution Verified - Updated -

Issue

  • JVM crash in java.util.zip.ZipFile.getEntry with SIGBUS or SIGSEGV SEGV_MAPERR.

  • For example, a fatal error log hs_err_pid<PID>.log shows:

    #
    # A fatal error has been detected by the Java Runtime Environment:
    #
    #  SIGBUS (0x7) at pc=0x00002aaaab034021, pid=6244, tid=1227151680
    #
    # JRE version: 6.0_17-b04
    # Java VM: Java HotSpot(TM) 64-Bit Server VM (14.3-b01 mixed mode linux-amd64 )
    # Problematic frame:
    # C  [libzip.so+0xb021]
    #
    
    ...(snip)...
    
    
    siginfo:si_signo=SIGBUS: si_errno=0, si_code=2 (BUS_ADRERR), si_addr=0x00002aab3a5d73bb
    
    ...(snip)...
    
    Stack: [0x000000004914d000,0x000000004924e000],  sp=0x0000000049249270,  free space=1008k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    C  [libzip.so+0xb021]
    
    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    J  java.util.zip.ZipFile.getEntry(JLjava/lang/String;Z)J
    J  sun.misc.URLClassPath$JarLoader.getResource(Ljava/lang/String;Z)Lsun/misc/Resource;
    J  java.net.URLClassLoader$2.run()Ljava/lang/Object;
    v  ~StubRoutines::call_stub
    ...(snip)...
    
  • JBoss sometimes crashes, during hot deploy of a large application.

  • SIGSEGV in fatal error log:

# Problematic frame:
# C  [libc.so.6+0x14d667]  __memcpy_ssse3+0xb57
...

Stack: [0x00007fa1bf03b000,0x00007fa1bf13c000],  sp=0x00007fa1bf138608,  free space=1013k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [libc.so.6+0x14d667]  __memcpy_ssse3+0xb57
C  [libzip.so+0x6034]  ZIP_GetEntry2+0xf4
C  [libzip.so+0x3c1d]  Java_java_util_zip_ZipFile_getEntry+0xfd
J 302  java.util.zip.ZipFile.getEntry(J[BZ)J (0 bytes) @ 0x00007fa287303dce [0x00007fa287303d00+0xce]
J 473 C2 java.util.jar.JarFile.getEntry(Ljava/lang/String;)Ljava/util/zip/ZipEntry; (22 bytes) @ 0x00007fa2873a5e94 [0x00007fa2873a5b40+0x354]
...

Environment

  • Red Hat build of OpenJDK 6/7/8
  • Oracle JDK 6/7/8

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content