Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8160529

VM crashes while doing something with zip files

    Details

      Description

      FULL PRODUCT VERSION :
      java version "1.8.0_92"
      Java(TM) SE Runtime Environment (build 1.8.0_92-b14)
      Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode)


      FULL OS VERSION :
      15.5.0 Darwin Kernel Version 15.5.0: Tue Apr 19 18:36:36 PDT 2016; root:xnu-3248.50.21~8/RELEASE_X86_64 x86_64

      A DESCRIPTION OF THE PROBLEM :
      when I try to write back a zip file with a new entry the vm crashes.

      THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: Did not try

      THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: Did not try

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      run the test case given

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      expected behavior: anything that doesn't crash the vm.
      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # SIGBUS (0xa) at pc=0x00000001003b2e92, pid=42275, tid=0x0000000000001703
      #
      # 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 bsd-amd64 compressed oops)
      # Problematic frame:
      # C [libzip.dylib+0x2e92] newEntry+0x154
      #
      # 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.
      #

      --------------- T H R E A D ---------------

      Current thread (0x00007fb652803800): JavaThread "main" [_thread_in_native, id=5891, stack(0x000070000011a000,0x000070000021a000)]

      siginfo: si_signo: 10 (SIGBUS), si_code: 2 (BUS_ADRERR), si_addr: 0x000000011eda1051

      Registers:
      RAX=0x00007fb65151f4d0, RBX=0x000000011eda1045, RCX=0x0000000000000100, RDX=0x0000000000000000
      RSP=0x0000700000219570, RBP=0x00007000002195d0, RSI=0x00007fb651500000, RDI=0x0000000100104200
      R8 =0x0000000000000004, R9 =0x0000000080000000, R10=0x00000000d383b646, R11=0x00007fb651500000
      R12=0x0000000000000000, R13=0x000000011aef79e8, R14=0x00007fb65151f4d0, R15=0x00007fb652803800
      RIP=0x00000001003b2e92, EFLAGS=0x0000000000010202, ERR=0x0000000000000004
        TRAPNO=0x000000000000000e

      Top of Stack: (sp=0x0000700000219570)
      0x0000700000219570: 000000011aef79e8 000000011aef79e8
      0x0000700000219580: 00007000002195f0 00000001016e5b33
      0x0000700000219590: 00007000002195b0 00007fb65151f4d0
      0x00007000002195a0: 00007fb65151f7a0 0000000000000000
      0x00007000002195b0: 0000000000000000 000000011aef79e8
      0x00007000002195c0: 00007fb65151f4d0 00007fb652803800
      0x00007000002195d0: 00007000002195f0 00000001003b3441
      0x00007000002195e0: 000000011aef79e8 00007000002196a0
      0x00007000002195f0: 0000700000219600 00000001003b2157
      0x0000700000219600: 0000700000219670 00000001023ae9d4
      0x0000700000219610: 0000700000219670 00000001023ae759
      0x0000700000219620: 00000001023ba983 00000001023ae722
      0x0000700000219630: 0000700000219630 000000011aef79e8
      0x0000700000219640: 00007000002196a0 000000011aef9270
      0x0000700000219650: 0000000000000000 000000011aef79e8
      0x0000700000219660: 0000000000000000 0000700000219690
      0x0000700000219670: 00007000002196e8 000000010239edd0
      0x0000700000219680: 000000076ab787f0 00000001023a8537
      0x0000700000219690: 0000000000000000 00007fb65151f4d0
      0x00007000002196a0: 00000001023a9e02 00007000002196a8
      0x00007000002196b0: 000000011aef8aba 0000700000219708
      0x00007000002196c0: 000000011aef9270 0000000000000000
      0x00007000002196d0: 000000011aef8ac8 0000700000219690
      0x00007000002196e0: 00007000002196f8 0000700000219760
      0x00007000002196f0: 000000010239edd0 0000000000000000
      0x0000700000219700: 00007fb65151f4d0 000000076ac0f6c8
      0x0000700000219710: 0000000000000001 000000076ac0f6c8
      0x0000700000219720: 0000700000219710 000000011af810ce
      0x0000700000219730: 0000700000219798 000000011af81350
      0x0000700000219740: 0000000000000000 000000011af81198
      0x0000700000219750: 00007000002196f8 0000700000219798
      0x0000700000219760: 00007000002197e0 000000010239f040

      Instructions: (pc=0x00000001003b2e92)
      0x00000001003b2e72: 49 8b 7f 38 e8 5b 1b 00 00 4d 89 77 38 49 89 5f
      0x00000001003b2e82: 40 4c 89 f0 48 85 c0 0f 84 11 05 00 00 48 89 c3
      0x00000001003b2e92: 0f b6 43 0c 0f b6 4b 0d 48 c1 e1 08 48 01 c1 0f
      0x00000001003b2ea2: b6 43 0e 0f b6 53 0f 48 c1 e2 08 48 01 c2 48 c1

      Register to memory mapping:

      RAX=0x00007fb65151f4d0 is an unknown value
      RBX=0x000000011eda1045 is an unknown value
      RCX=0x0000000000000100 is an unknown value
      RDX=0x0000000000000000 is an unknown value
      RSP=0x0000700000219570 is pointing into the stack for thread: 0x00007fb652803800
      RBP=0x00007000002195d0 is pointing into the stack for thread: 0x00007fb652803800
      RSI=0x00007fb651500000 is an unknown value
      RDI=0x0000000100104200 is an unknown value
      R8 =0x0000000000000004 is an unknown value
      R9 =0x0000000080000000 is an unknown value
      R10=0x00000000d383b646 is an unknown value
      R11=0x00007fb651500000 is an unknown value
      R12=0x0000000000000000 is an unknown value
      R13={method} {0x000000011aef79e8} 'getNextEntry' '(JI)J' in 'java/util/zip/ZipFile'
      R14=0x00007fb65151f4d0 is an unknown value
      R15=0x00007fb652803800 is a thread


      Stack: [0x000070000011a000,0x000070000021a000], sp=0x0000700000219570, free space=1021k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      C [libzip.dylib+0x2e92] newEntry+0x154
      C [libzip.dylib+0x3441] ZIP_GetNextEntry+0x37
      C [libzip.dylib+0x2157] Java_java_util_zip_ZipFile_getNextEntry+0xe
      j java.util.zip.ZipFile.getNextEntry(JI)J+0
      j java.util.zip.ZipFile.access$500(JI)J+2
      j java.util.zip.ZipFile$ZipEntryIterator.next()Ljava/util/zip/ZipEntry;+54
      j java.util.zip.ZipFile$ZipEntryIterator.nextElement()Ljava/util/zip/ZipEntry;+1
      j java.util.zip.ZipFile$ZipEntryIterator.nextElement()Ljava/lang/Object;+1
      j MinimalError.writeNewContent()V+66
      j MinimalError.main([Ljava/lang/String;)V+131
      v ~StubRoutines::call_stub
      V [libjvm.dylib+0x2ecc9a]
      V [libjvm.dylib+0x323b0e]
      V [libjvm.dylib+0x31c885]
      C [java+0x3931] JavaMain+0x9c4
      C [libsystem_pthread.dylib+0x399d] _pthread_body+0x83
      C [libsystem_pthread.dylib+0x391a] _pthread_body+0x0
      C [libsystem_pthread.dylib+0x1351] thread_start+0xd
      C 0x0000000000000000

      Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
      j java.util.zip.ZipFile.getNextEntry(JI)J+0
      j java.util.zip.ZipFile.access$500(JI)J+2
      j java.util.zip.ZipFile$ZipEntryIterator.next()Ljava/util/zip/ZipEntry;+54
      j java.util.zip.ZipFile$ZipEntryIterator.nextElement()Ljava/util/zip/ZipEntry;+1
      j java.util.zip.ZipFile$ZipEntryIterator.nextElement()Ljava/lang/Object;+1
      j MinimalError.writeNewContent()V+66
      j MinimalError.main([Ljava/lang/String;)V+131
      v ~StubRoutines::call_stub

      --------------- P R O C E S S ---------------

      Java Threads: ( => current thread )
        0x00007fb654835000 JavaThread "Service Thread" daemon [_thread_blocked, id=21251, stack(0x0000700001353000,0x0000700001453000)]
        0x00007fb652009800 JavaThread "C1 CompilerThread3" daemon [_thread_blocked, id=20739, stack(0x0000700001250000,0x0000700001350000)]
        0x00007fb654834000 JavaThread "C2 CompilerThread2" daemon [_thread_blocked, id=20227, stack(0x000070000114d000,0x000070000124d000)]
        0x00007fb652009000 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=19715, stack(0x000070000104a000,0x000070000114a000)]
        0x00007fb652801000 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=19203, stack(0x0000700000f47000,0x0000700001047000)]
        0x00007fb655004000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=14863, stack(0x0000700000e44000,0x0000700000f44000)]
        0x00007fb654818000 JavaThread "Finalizer" daemon [_thread_blocked, id=14339, stack(0x0000700000c3b000,0x0000700000d3b000)]
        0x00007fb65581a800 JavaThread "Reference Handler" daemon [_thread_blocked, id=13827, stack(0x0000700000b38000,0x0000700000c38000)]
      =>0x00007fb652803800 JavaThread "main" [_thread_in_native, id=5891, stack(0x000070000011a000,0x000070000021a000)]

      Other Threads:
        0x00007fb655816000 VMThread [stack: 0x0000700000a35000,0x0000700000b35000] [id=13315]
        0x00007fb654828000 WatcherThread [stack: 0x0000700001456000,0x0000700001556000] [id=21763]

      VM state:not at safepoint (normal execution)

      VM Mutex/Monitor currently owned by a thread: None

      Heap:
       PSYoungGen total 76288K, used 2621K [0x000000076ab00000, 0x0000000770000000, 0x00000007c0000000)
        eden space 65536K, 4% used [0x000000076ab00000,0x000000076ad8f5e8,0x000000076eb00000)
        from space 10752K, 0% used [0x000000076f580000,0x000000076f580000,0x0000000770000000)
        to space 10752K, 0% used [0x000000076eb00000,0x000000076eb00000,0x000000076f580000)
       ParOldGen total 175104K, used 0K [0x00000006c0000000, 0x00000006cab00000, 0x000000076ab00000)
        object space 175104K, 0% used [0x00000006c0000000,0x00000006c0000000,0x00000006cab00000)
       Metaspace used 2892K, capacity 4490K, committed 4864K, reserved 1056768K
        class space used 312K, capacity 386K, committed 512K, reserved 1048576K

      Card table byte_map: [0x0000000111757000,0x0000000111f58000] byte_map_base: 0x000000010e157000

      Marking Bits: (ParMarkBitMap*) 0x0000000101ce8bd0
       Begin Bits: [0x00000001124ae000, 0x00000001164ae000)
       End Bits: [0x00000001164ae000, 0x000000011a4ae000)

      Polling page: 0x00000001003a6000

      CodeCache: size=245760Kb used=1188Kb max_used=1196Kb free=244571Kb
       bounds [0x0000000102397000, 0x0000000102607000, 0x0000000111397000]
       total_blobs=302 nmethods=61 adapters=155
       compilation: enabled

      Compilation events (10 events):
      Event: 0.095 Thread 0x00007fb652009800 nmethod 58 0x00000001024be950 code [0x00000001024beac0, 0x00000001024bee10]
      Event: 0.095 Thread 0x00007fb652009800 59 3 java.io.DataInputStream::readByte (23 bytes)
      Event: 0.095 Thread 0x00007fb652009800 nmethod 59 0x00000001024c0410 code [0x00000001024c05a0, 0x00000001024c0878]
      Event: 0.095 Thread 0x00007fb652009800 60 3 java.util.zip.CRC32::update (16 bytes)
      Event: 0.095 Thread 0x00007fb654834000 nmethod 52 0x00000001024c2210 code [0x00000001024c2360, 0x00000001024c24d8]
      Event: 0.095 Thread 0x00007fb652009800 nmethod 60 0x00000001024c0050 code [0x00000001024c01c0, 0x00000001024c0350]
      Event: 0.095 Thread 0x00007fb652009800 57 3 java.util.HashMap$Node::<init> (26 bytes)
      Event: 0.096 Thread 0x00007fb652009800 nmethod 57 0x00000001024bfc10 code [0x00000001024bfd80, 0x00000001024bff70]
      Event: 0.096 Thread 0x00007fb652009800 61 s 1 java.util.Vector::size (5 bytes)
      Event: 0.096 Thread 0x00007fb652009800 nmethod 61 0x00000001024bf7d0 code [0x00000001024bf920, 0x00000001024bfb90]

      GC Heap History (0 events):
      No events

      Deoptimization events (0 events):
      No events

      Internal exceptions (10 events):
      Event: 0.081 Thread 0x00007fb652803800 Exception <a 'java/security/PrivilegedActionException'> (0x000000076abbc498) thrown at [/Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u92/6642/hotspot/src/share/vm/prims/jvm.cpp, line 1386]
      Event: 0.081 Thread 0x00007fb652803800 Exception <a 'java/util/zip/ZipException'> (0x000000076abbd218) thrown at [/Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u92/6642/hotspot/src/share/vm/prims/jni.cpp, line 709]
      Event: 0.081 Thread 0x00007fb652803800 Exception <a 'java/security/PrivilegedActionException'> (0x000000076abbd420) thrown at [/Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u92/6642/hotspot/src/share/vm/prims/jvm.cpp, line 1386]
      Event: 0.081 Thread 0x00007fb652803800 Exception <a 'java/security/PrivilegedActionException'> (0x000000076abbd630) thrown at [/Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u92/6642/hotspot/src/share/vm/prims/jvm.cpp, line 1386]
      Event: 0.082 Thread 0x00007fb652803800 Exception <a 'java/util/zip/ZipException'> (0x000000076abbe3b0) thrown at [/Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u92/6642/hotspot/src/share/vm/prims/jni.cpp, line 709]
      Event: 0.082 Thread 0x00007fb652803800 Exception <a 'java/security/PrivilegedActionException'> (0x000000076abbe5b8) thrown at [/Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u92/6642/hotspot/src/share/vm/prims/jvm.cpp, line 1386]
      Event: 0.082 Thread 0x00007fb652803800 Exception <a 'java/security/PrivilegedActionException'> (0x000000076abbe7c8) thrown at [/Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u92/6642/hotspot/src/share/vm/prims/jvm.cpp, line 1386]
      Event: 0.083 Thread 0x00007fb652803800 Exception <a 'java/util/zip/ZipException'> (0x000000076abd02b8) thrown at [/Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u92/6642/hotspot/src/share/vm/prims/jni.cpp, line 709]
      Event: 0.083 Thread 0x00007fb652803800 Exception <a 'java/security/PrivilegedActionException'> (0x000000076abd04c0) thrown at [/Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u92/6642/hotspot/src/share/vm/prims/jvm.cpp, line 1386]
      Event: 0.083 Thread 0x00007fb652803800 Exception <a 'java/security/PrivilegedActionException'> (0x000000076abd06d0) thrown at [/Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u92/6642/hotspot/src/share/vm/prims/jvm.cpp, line 1386]

      Events (10 events):
      Event: 0.095 loading class sun/util/calendar/BaseCalendar$Date done
      Event: 0.095 loading class sun/util/calendar/Gregorian$Date done
      Event: 0.095 loading class sun/util/calendar/CalendarUtils
      Event: 0.095 loading class sun/util/calendar/CalendarUtils done
      Event: 0.095 loading class java/util/zip/ZipOutputStream$XEntry
      Event: 0.095 loading class java/util/zip/ZipOutputStream$XEntry done
      Event: 0.096 loading class java/util/Vector$Itr
      Event: 0.096 loading class java/util/Vector$Itr done
      Event: 0.097 loading class java/util/zip/ZipFile$ZipEntryIterator
      Event: 0.097 loading class java/util/zip/ZipFile$ZipEntryIterator done


      Dynamic libraries:
      0x000000000117c000 /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa
      0x000000000117c000 /System/Library/Frameworks/Security.framework/Versions/A/Security
      0x000000000117c000 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
      0x000000000117c000 /usr/lib/libz.1.dylib
      0x000000000117c000 /usr/lib/libSystem.B.dylib
      0x000000000117c000 /usr/lib/libobjc.A.dylib
      0x000000000117c000 /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
      0x000000000117c000 /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
      0x000000000117c000 /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
      0x000000000117c000 /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData
      0x000000000117c000 /System/Library/PrivateFrameworks/RemoteViewServices.framework/Versions/A/RemoteViewServices
      0x000000000117c000 /System/Library/PrivateFrameworks/UIFoundation.framework/Versions/A/UIFoundation
      0x000000000117c000 /usr/lib/libScreenReader.dylib
      0x000000000117c000 /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
      0x000000000117c000 /System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface
      0x000000000117c000 /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox
      0x000000000117c000 /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit
      0x000000000117c000 /System/Library/PrivateFrameworks/DataDetectorsCore.framework/Versions/A/DataDetectorsCore
      0x000000000117c000 /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv
      0x000000000117c000 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
      0x000000000117c000 /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore
      0x000000000117c000 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition
      0x000000000117c000 /usr/lib/libauto.dylib
      0x000000000117c000 /usr/lib/libicucore.A.dylib
      0x000000000117c000 /usr/lib/libxml2.2.dylib
      0x000000000117c000 /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI
      0x000000000117c000 /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio
      0x000000000117c000 /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration
      0x000000000117c000 /usr/lib/liblangid.dylib
      0x000000000117c000 /System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/MultitouchSupport
      0x000000000117c000 /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
      0x000000000117c000 /usr/lib/libDiagnosticMessagesClient.dylib
      0x000000000117c000 /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
      0x000000000117c000 /System/Library/PrivateFrameworks/PerformanceAnalysis.framework/Versions/A/PerformanceAnalysis
      0x000000000117c000 /System/Library/PrivateFrameworks/GenerationalStorage.framework/Versions/A/GenerationalStorage
      0x000000000117c000 /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
      0x000000000117c000 /System/Library/PrivateFrameworks/Sharing.framework/Versions/A/Sharing
      0x000000000117c000 /System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
      0x000000000117c000 /System/Library/Frameworks/CoreImage.framework/Versions/A/CoreImage
      0x000000000117c000 /System/Library/Frameworks/CoreText.framework/Versions/A/CoreText
      0x000000000117c000 /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
      0x000000000117c000 /System/Library/PrivateFrameworks/Backup.framework/Versions/A/Backup
      0x000000000117c000 /usr/lib/libextension.dylib
      0x000000000117c000 /usr/lib/libarchive.2.dylib
      0x000000000117c000 /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
      0x000000000117c000 /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
      0x000000000117c000 /usr/lib/libCRFSuite.dylib
      0x000000000117c000 /usr/lib/libc++.1.dylib
      0x000000000117c000 /usr/lib/libc++abi.dylib
      0x000000000117c000 /usr/lib/system/libcache.dylib
      0x000000000117c000 /usr/lib/system/libcommonCrypto.dylib
      0x000000000117c000 /usr/lib/system/libcompiler_rt.dylib
      0x000000000117c000 /usr/lib/system/libcopyfile.dylib
      0x000000000117c000 /usr/lib/system/libcorecrypto.dylib
      0x000000000117c000 /usr/lib/system/libdispatch.dylib
      0x000000000117c000 /usr/lib/system/libdyld.dylib
      0x000000000117c000 /usr/lib/system/libkeymgr.dylib
      0x000000000117c000 /usr/lib/system/liblaunch.dylib
      0x000000000117c000 /usr/lib/system/libmacho.dylib
      0x000000000117c000 /usr/lib/system/libquarantine.dylib
      0x000000000117c000 /usr/lib/system/libremovefile.dylib
      0x000000000117c000 /usr/lib/system/libsystem_asl.dylib
      0x000000000117c000 /usr/lib/system/libsystem_blocks.dylib
      0x000000000117c000 /usr/lib/system/libsystem_c.dylib
      0x000000000117c000 /usr/lib/system/libsystem_configuration.dylib
      0x000000000117c000 /usr/lib/system/libsystem_coreservices.dylib
      0x000000000117c000 /usr/lib/system/libsystem_coretls.dylib
      0x000000000117c000 /usr/lib/system/libsystem_dnssd.dylib
      0x000000000117c000 /usr/lib/system/libsystem_info.dylib
      0x000000000117c000 /usr/lib/system/libsystem_kernel.dylib
      0x000000000117c000 /usr/lib/system/libsystem_m.dylib
      0x000000000117c000 /usr/lib/system/libsystem_malloc.dylib
      0x000000000117c000 /usr/lib/system/libsystem_network.dylib
      0x000000000117c000 /usr/lib/system/libsystem_networkextension.dylib
      0x000000000117c000 /usr/lib/system/libsystem_notify.dylib
      0x000000000117c000 /usr/lib/system/libsystem_platform.dylib
      0x000000000117c000 /usr/lib/system/libsystem_pthread.dylib
      0x000000000117c000 /usr/lib/system/libsystem_sandbox.dylib
      0x000000000117c000 /usr/lib/system/libsystem_secinit.dylib
      0x000000000117c000 /usr/lib/system/libsystem_trace.dylib
      0x000000000117c000 /usr/lib/system/libunc.dylib
      0x000000000117c000 /usr/lib/system/libunwind.dylib
      0x000000000117c000 /usr/lib/system/libxpc.dylib
      0x000000000117c000 /usr/lib/libenergytrace.dylib
      0x000000000117c000 /usr/lib/libbsm.0.dylib
      0x000000000117c000 /usr/lib/system/libkxld.dylib
      0x000000000117c000 /usr/lib/libxar.1.dylib
      0x000000000117c000 /usr/lib/libsqlite3.dylib
      0x000000000117c000 /usr/lib/libpam.2.dylib
      0x000000000117c000 /usr/lib/libOpenScriptingUtil.dylib
      0x000000000117c000 /usr/lib/libbz2.1.0.dylib
      0x000000000117c000 /usr/lib/liblzma.5.dylib
      0x000000000117c000 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/FSEvents.framework/Versions/A/FSEvents
      0x000000000117c000 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore
      0x000000000117c000 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata
      0x000000000117c000 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices
      0x000000000117c000 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit
      0x000000000117c000 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE
      0x000000000117c000 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
      0x000000000117c000 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices
      0x000000000117c000 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SharedFileList.framework/Versions/A/SharedFileList
      0x000000000117c000 /System/Library/Frameworks/NetFS.framework/Versions/A/NetFS
      0x000000000117c000 /System/Library/PrivateFrameworks/NetAuth.framework/Versions/A/NetAuth
      0x000000000117c000 /System/Library/PrivateFrameworks/login.framework/Versions/A/Frameworks/loginsupport.framework/Versions/A/loginsupport
      0x000000000117c000 /System/Library/PrivateFrameworks/TCC.framework/Versions/A/TCC
      0x000000000117c000 /usr/lib/libmecabra.dylib
      0x000000000117c000 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS
      0x000000000117c000 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync
      0x000000000117c000 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices
      0x000000000117c000 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis
      0x000000000117c000 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore
      0x000000000117c000 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD
      0x000000000117c000 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis
      0x000000000117c000 /System/Library/Frameworks/Metal.framework/Versions/A/Metal
      0x000000000117c000 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage
      0x000000000117c000 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib
      0x000000000117c000 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib
      0x000000000117c000 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib
      0x000000000117c000 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
      0x000000000117c000 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
      0x000000000117c000 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLinearAlgebra.dylib
      0x000000000117c000 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libSparseBLAS.dylib
      0x000000000117c000 /System/Library/PrivateFrameworks/GPUCompiler.framework/libmetal_timestamp.dylib
      0x000000000117c000 /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreFSCache.dylib
      0x000000000117c000 /System/Library/PrivateFrameworks/IOAccelerator.framework/Versions/A/IOAccelerator
      0x000000000117c000 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontParser.dylib
      0x000000000117c000 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontRegistry.dylib
      0x000000000117c000 /System/Library/PrivateFrameworks/AppleVPA.framework/Versions/A/AppleVPA
      0x000000000117c000 /System/Library/PrivateFrameworks/AppleJPEG.framework/Versions/A/AppleJPEG
      0x000000000117c000 /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib
      0x000000000117c000 /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib
      0x000000000117c000 /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib
      0x000000000117c000 /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib
      0x000000000117c000 /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib
      0x000000000117c000 /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib
      0x000000000117c000 /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo
      0x000000000117c000 /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib
      0x000000000117c000 /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGFXShared.dylib
      0x000000000117c000 /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
      0x000000000117c000 /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib
      0x000000000117c000 /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCVMSPluginSupport.dylib
      0x000000000117c000 /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreVMClient.dylib
      0x000000000117c000 /usr/lib/libcompression.dylib
      0x000000000117c000 /usr/lib/libcups.2.dylib
      0x000000000117c000 /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos
      0x000000000117c000 /System/Library/Frameworks/GSS.framework/Versions/A/GSS
      0x000000000117c000 /usr/lib/libresolv.9.dylib
      0x000000000117c000 /usr/lib/libiconv.2.dylib
      0x000000000117c000 /System/Library/PrivateFrameworks/Heimdal.framework/Versions/A/Heimdal
      0x000000000117c000 /usr/lib/libheimdal-asn1.dylib
      0x000000000117c000 /System/Library/Frameworks/OpenDirectory.framework/Versions/A/OpenDirectory
      0x000000000117c000 /System/Library/PrivateFrameworks/CommonAuth.framework/Versions/A/CommonAuth
      0x000000000117c000 /System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory
      0x000000000117c000 /System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation
      0x000000000117c000 /System/Library/PrivateFrameworks/LanguageModeling.framework/Versions/A/LanguageModeling
      0x000000000117c000 /usr/lib/libmarisa.dylib
      0x000000000117c000 /usr/lib/libChineseTokenizer.dylib
      0x000000000117c000 /usr/lib/libcmph.dylib
      0x000000000117c000 /System/Library/Frameworks/ServiceManagement.framework/Versions/A/ServiceManagement
      0x000000000117c000 /usr/lib/libxslt.1.dylib
      0x000000000117c000 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink
      0x000000000117c000 /usr/lib/libFosl_dynamic.dylib
      0x000000000117c000 /System/Library/PrivateFrameworks/FaceCore.framework/Versions/A/FaceCore
      0x000000000117c000 /System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL
      0x000000000117c000 /System/Library/PrivateFrameworks/CrashReporterSupport.framework/Versions/A/CrashReporterSupport
      0x000000000117c000 /System/Library/PrivateFrameworks/IconServices.framework/Versions/A/IconServices
      0x000000000117c000 /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Apple80211
      0x000000000117c000 /System/Library/Frameworks/CoreWLAN.framework/Versions/A/CoreWLAN
      0x000000000117c000 /System/Library/Frameworks/IOBluetooth.framework/Versions/A/IOBluetooth
      0x000000000117c000 /System/Library/PrivateFrameworks/CoreWiFi.framework/Versions/A/CoreWiFi
      0x000000000117c000 /System/Library/Frameworks/CoreBluetooth.framework/Versions/A/CoreBluetooth
      0x000000000117c000 /System/Library/PrivateFrameworks/ChunkingLibrary.framework/Versions/A/ChunkingLibrary
      0x000000000117c000 /System/Library/PrivateFrameworks/DebugSymbols.framework/Versions/A/DebugSymbols
      0x000000000117c000 /System/Library/PrivateFrameworks/CoreSymbolication.framework/Versions/A/CoreSymbolication
      0x000000000117c000 /System/Library/PrivateFrameworks/Symbolication.framework/Versions/A/Symbolication
      0x000000000117c000 /System/Library/PrivateFrameworks/SpeechRecognitionCore.framework/Versions/A/SpeechRecognitionCore
      0x0000000101400000 /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/server/libjvm.dylib
      0x000000000117c000 /usr/lib/libstdc++.6.dylib
      0x0000000100363000 /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/libverify.dylib
      0x0000000100371000 /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/libjava.dylib
      0x00000001003b0000 /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/libzip.dylib
      0x00000001003e2000 /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/JavaRuntimeSupport
      0x000000011d424000 /System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/JavaNativeFoundation.framework/Versions/A/JavaNativeFoundation
      0x000000011d439000 /System/Library/Frameworks/JavaVM.framework/Versions/A/JavaVM
      0x000000000117c000 /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
      0x000000011d446000 /System/Library/PrivateFrameworks/JavaLaunching.framework/Versions/A/JavaLaunching
      0x000000000117c000 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels.framework/Versions/A/CommonPanels
      0x000000000117c000 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framework/Versions/A/Help
      0x000000000117c000 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture.framework/Versions/A/ImageCapture
      0x000000000117c000 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting.framework/Versions/A/OpenScripting
      0x000000000117c000 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framework/Versions/A/Print
      0x000000000117c000 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.framework/Versions/A/SecurityHI

      VM Arguments:
      jvm_args: -Dfile.encoding=UTF-8
      java_command: MinimalError
      Launcher Type: SUN_STANDARD

      Environment Variables:
      PATH=/usr/bin:/bin:/usr/sbin:/sbin
      SHELL=/bin/bash

      Signal Handlers:
      SIGSEGV: [libjvm.dylib+0x5aa779], sa_mask[0]=11111111011111110111111111111111, sa_flags=SA_ONSTACK|SA_RESTART|SA_SIGINFO
      SIGBUS: [libjvm.dylib+0x5aa779], sa_mask[0]=11111111011111110111111111111111, sa_flags=SA_RESTART|SA_SIGINFO
      SIGFPE: [libjvm.dylib+0x4831d0], sa_mask[0]=11111111011111110111111111111111, sa_flags=SA_RESTART|SA_SIGINFO
      SIGPIPE: [libjvm.dylib+0x4831d0], sa_mask[0]=11111111011111110111111111111111, sa_flags=SA_RESTART|SA_SIGINFO
      SIGXFSZ: [libjvm.dylib+0x4831d0], sa_mask[0]=11111111011111110111111111111111, sa_flags=SA_RESTART|SA_SIGINFO
      SIGILL: [libjvm.dylib+0x4831d0], sa_mask[0]=11111111011111110111111111111111, sa_flags=SA_RESTART|SA_SIGINFO
      SIGUSR1: SIG_DFL, sa_mask[0]=00000000000000000000000000000000, sa_flags=none
      SIGUSR2: [libjvm.dylib+0x482cee], sa_mask[0]=00100000000000000000000000000000, sa_flags=SA_RESTART|SA_SIGINFO
      SIGHUP: [libjvm.dylib+0x4812c5], sa_mask[0]=11111111011111110111111111111111, sa_flags=SA_RESTART|SA_SIGINFO
      SIGINT: [libjvm.dylib+0x4812c5], sa_mask[0]=11111111011111110111111111111111, sa_flags=SA_RESTART|SA_SIGINFO
      SIGTERM: [libjvm.dylib+0x4812c5], sa_mask[0]=11111111011111110111111111111111, sa_flags=SA_RESTART|SA_SIGINFO
      SIGQUIT: [libjvm.dylib+0x4812c5], sa_mask[0]=11111111011111110111111111111111, sa_flags=SA_RESTART|SA_SIGINFO


      --------------- S Y S T E M ---------------

      OS:Bsduname:Darwin 15.5.0 Darwin Kernel Version 15.5.0: Tue Apr 19 18:36:36 PDT 2016; root:xnu-3248.50.21~8/RELEASE_X86_64 x86_64
      rlimit: STACK 8192k, CORE 0k, NPROC 709, NOFILE 10240, AS infinity
      load average:2.24 2.13 2.05

      CPU:total 8 (4 cores per cpu, 2 threads per core) family 6 model 70 stepping 1, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, lzcnt, ht, tsc, tscinvbit, bmi1, bmi2

      Memory: 4k page, physical 16777216k(1669508k free)

      /proc/meminfo:


      vm_info: Java HotSpot(TM) 64-Bit Server VM (25.92-b14) for bsd-amd64 JRE (1.8.0_92-b14), built on Mar 31 2016 21:23:14 by "java_re" with gcc 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)

      time: Mon Jun 27 15:02:21 2016
      elapsed time: 0 seconds (0d 0h 0m 0s)



      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import java.io.BufferedOutputStream;
      import java.io.File;
      import java.io.FileOutputStream;
      import java.io.IOException;
      import java.io.InputStream;
      import java.util.Enumeration;
      import java.util.HashMap;
      import java.util.Map;
      import java.util.Map.Entry;
      import java.util.zip.ZipEntry;
      import java.util.zip.ZipFile;
      import java.util.zip.ZipOutputStream;



      public class MinimalError {
      ZipFile zip=null;
      Map<String, String> toWrite=new HashMap<>();
      String zipLoc;
      public MinimalError(String location) throws IOException{
      zipLoc=location;
      File f=new File(location);
      if(f.exists()){
      zip=new ZipFile(f);
      }
      }
      public String getValue(String entryName) throws IOException{
      if(toWrite.containsKey(entryName)){
      return toWrite.get(entryName);
      }
      if(zip==null){
      return null;
      }
      ZipEntry entry=zip.getEntry(entryName);
      if(entry==null){
      return null;
      }
      StringBuilder val=new StringBuilder();
      InputStream is=zip.getInputStream(entry);
      int next=is.read();
      while(next != -1){
      val.append((char)next);
      next=is.read();
      }
      is.close();
      return val.toString();
      }

      public void setValue(String entryName, String value){
      toWrite.put(entryName, value);
      }

      public void writeNewContent() throws IOException{
      if(!toWrite.isEmpty()){
      File zipf=new File(zipLoc);
      ZipOutputStream out=new ZipOutputStream(new BufferedOutputStream(new FileOutputStream(zipf)));
      if(zip!=null){
      Enumeration<? extends ZipEntry> entries=zip.entries();
      while(entries.hasMoreElements()){
      ZipEntry next=entries.nextElement();
      if(!toWrite.containsKey(next.getName())){
      out.putNextEntry(next);
      InputStream bis=zip.getInputStream(next);
      int nextByte=bis.read();
      while(nextByte != -1){
      out.write(nextByte);
      nextByte=bis.read();
      }
      bis.close();
      out.closeEntry();
      }else{
      out.putNextEntry(next);
      out.write(toWrite.get(next.getName()).getBytes());
      out.closeEntry();
      toWrite.remove(next.getName());
      }
      }
      }
      for(Entry<String,String> e:toWrite.entrySet()){
      out.putNextEntry(new ZipEntry(e.getKey()));
      out.write(e.getValue().getBytes());
      out.closeEntry();
      }
      out.flush();
      out.close();
      }
      }

      public static void main(String[] args) throws IOException{
      File f=new File("10000.zip");
      if(f.exists()){
      f.delete();
      }

      MinimalError foo=new MinimalError("10000.zip");
      String key="hi";
      String val=foo.getValue(key);
      if(val==null){
      foo.setValue(key, "I am a stored value");
      }
      key="there";
      val=foo.getValue(key);
      System.out.println(val);
      foo.writeNewContent();

      foo=new MinimalError("10000.zip");
      key="hi";
      val=foo.getValue(key);
      if(val==null){
      foo.setValue(key, "I am a stored value");
      }
      key="there";
      val=foo.getValue(key);
      if(val==null){
      foo.setValue(key, "I am a stored value also please respect that");
      }
      foo.writeNewContent();

      }
      }


      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      not making zip files?

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                coffeys Sean Coffey
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: