Uploaded image for project: 'ShrinkWrap'
  1. ShrinkWrap
  2. SHRINKWRAP-137

Race Condition leads to Deadlock in Zip Export

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • 1.0.0-alpha-6
    • None
    • impl-base
    • None

      Running the ZipExporterTestCase a few times usually lets me reproduce this. Thread dump:

      Full thread dump Java HotSpot(TM) 64-Bit Server VM (14.0-b16 mixed mode):

      "pool-1-thread-2" prio=10 tid=0x00007fbb68004800 nid=0x7e6a waiting on condition [0x00007fbba210c000]
      java.lang.Thread.State: TIMED_WAITING (parking)
      at sun.misc.Unsafe.park(Native Method)

      • parking to wait for <0x00007fbbd1082528> (a java.util.concurrent.SynchronousQueue$TransferStack)
        at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)
        at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:424)
        at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:323)
        at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:874)
        at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:945)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
        at java.lang.Thread.run(Thread.java:619)

      "pool-1-thread-1" prio=10 tid=0x00007fbbe81f0000 nid=0x7e69 waiting on condition [0x00007fbba220d000]
      java.lang.Thread.State: TIMED_WAITING (parking)
      at sun.misc.Unsafe.park(Native Method)

      • parking to wait for <0x00007fbbd1082528> (a java.util.concurrent.SynchronousQueue$TransferStack)
        at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)
        at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:424)
        at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:323)
        at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:874)
        at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:945)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
        at java.lang.Thread.run(Thread.java:619)

      "Low Memory Detector" daemon prio=10 tid=0x00007fbbe8112800 nid=0x7e67 runnable [0x0000000000000000]
      java.lang.Thread.State: RUNNABLE

      "CompilerThread1" daemon prio=10 tid=0x00007fbbe8110000 nid=0x7e66 waiting on condition [0x0000000000000000]
      java.lang.Thread.State: RUNNABLE

      "CompilerThread0" daemon prio=10 tid=0x00007fbbe810d800 nid=0x7e65 waiting on condition [0x0000000000000000]
      java.lang.Thread.State: RUNNABLE

      "Signal Dispatcher" daemon prio=10 tid=0x00007fbbe810b800 nid=0x7e64 waiting on condition [0x0000000000000000]
      java.lang.Thread.State: RUNNABLE

      "Finalizer" daemon prio=10 tid=0x00007fbbe80ee800 nid=0x7e63 in Object.wait() [0x00007fbba2833000]
      java.lang.Thread.State: WAITING (on object monitor)
      at java.lang.Object.wait(Native Method)

      • waiting on <0x00007fbbd0ab11e0> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
      • locked <0x00007fbbd0ab11e0> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
        at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)

      "Reference Handler" daemon prio=10 tid=0x00007fbbe80ec800 nid=0x7e62 in Object.wait() [0x00007fbba2934000]
      java.lang.Thread.State: WAITING (on object monitor)
      at java.lang.Object.wait(Native Method)

      • waiting on <0x00007fbbd0ab1048> (a java.lang.ref.Reference$Lock)
        at java.lang.Object.wait(Object.java:485)
        at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
      • locked <0x00007fbbd0ab1048> (a java.lang.ref.Reference$Lock)

      "main" prio=10 tid=0x00007fbbe8007000 nid=0x7e5d in Object.wait() [0x00007fbbecdcf000]
      java.lang.Thread.State: TIMED_WAITING (on object monitor)
      at java.lang.Object.wait(Native Method)

      • waiting on <0x00007fbbd1352280> (a org.jboss.shrinkwrap.impl.base.exporter.FutureCompletionInputStream)
        at java.io.PipedInputStream.read(PipedInputStream.java:310)
      • locked <0x00007fbbd1352280> (a org.jboss.shrinkwrap.impl.base.exporter.FutureCompletionInputStream)
        at org.jboss.shrinkwrap.impl.base.exporter.FutureCompletionInputStream.read(FutureCompletionInputStream.java:82)
      • locked <0x00007fbbd1352280> (a org.jboss.shrinkwrap.impl.base.exporter.FutureCompletionInputStream)
        at java.io.PipedInputStream.read(PipedInputStream.java:361)
      • locked <0x00007fbbd1352280> (a org.jboss.shrinkwrap.impl.base.exporter.FutureCompletionInputStream)
        at org.jboss.shrinkwrap.impl.base.exporter.FutureCompletionInputStream.read(FutureCompletionInputStream.java:94)
      • locked <0x00007fbbd1352280> (a org.jboss.shrinkwrap.impl.base.exporter.FutureCompletionInputStream)
        at java.io.InputStream.read(InputStream.java:85)
        at org.jboss.shrinkwrap.impl.base.io.IOUtil.copy(IOUtil.java:141)
        at org.jboss.shrinkwrap.impl.base.io.IOUtil.copyWithClose(IOUtil.java:161)
        at org.jboss.shrinkwrap.impl.base.exporter.ZipExporterTestCase.testExportThrowsArchiveExceptionOnAssetWriteFailure(ZipExporterTestCase.java:294)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImp

              arubinge@redhat.com Andrew Rubinger (Inactive)
              arubinge@redhat.com Andrew Rubinger (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: