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

Deadlock in new JMX FetchingEventRelay

    Details

      Description

      The SQE test memleak_21 does
      MemoryLeakTest::run: Check for memory leak by running EventClientSubscribeUnsubscribe in a loop

      The SQE test memleak_22 does
      MemoryLeakTest::run: Check for memory leak by running EventClientAddListenerRemoveListener in a loop

      Both failed because they timed out. But both printed a passed status and for some reason the code didn't exit right after that.
      It looks like a thread was refusing to die.
      Important: exactly the same test went well with JDK 5 and 6, only the JDK 7 run is hit.

      The thread dump is :

      MemoryMonitor::run: PASSED. No memory leak.
      2008-09-25 15:22:32
      Full thread dump Java HotSpot(TM) Server VM (14.0-b04 mixed mode):

      "JMX EventClient lease renewer 23104" daemon prio=3 tid=0x08786400 nid=0x5a50 waiting on condition [0xc6519000..0xc6519be0]
         java.lang.Thread.State: TIMED_WAITING (parking)
      at sun.misc.Unsafe.park(Native Method)
      - parking to wait for <0xcae0c060> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
      at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:226)
      at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2012)
      at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.poll(ScheduledThreadPoolExecutor.java:1113)
      at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.poll(ScheduledThreadPoolExecutor.java:795)
      at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1043)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1103)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:674)

      "JMX FetchingEventRelay executor 1" daemon prio=3 tid=0x083d2400 nid=0x12 waiting for monitor entry [0xc6475000..0xc6475ae0]
         java.lang.Thread.State: BLOCKED (on object monitor)
      at javax.management.event.FetchingEventRelay$MyJob.isSuspended(FetchingEventRelay.java:267)
      - waiting to lock <0xcae0c7c8> (a javax.management.event.FetchingEventRelay)
      at com.sun.jmx.event.RepeatedSingletonJob.run(RepeatedSingletonJob.java:81)
      - locked <0xcae0c4e8> (a javax.management.event.FetchingEventRelay$MyJob)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:170)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:284)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:674)

      "JMX LeaseManager 1" daemon prio=3 tid=0x08332c00 nid=0xe waiting on condition [0xc65bd000..0xc65bd8e0]
         java.lang.Thread.State: TIMED_WAITING (parking)
      at sun.misc.Unsafe.park(Native Method)
      - parking to wait for <0xcae12c98> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
      at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:226)
      at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2012)
      at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1078)
      at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:795)
      at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1043)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1103)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:674)

      "Timer-0" daemon prio=3 tid=0x08225400 nid=0xd in Object.wait() [0xc672a000..0xc672a960]
         java.lang.Thread.State: WAITING (on object monitor)
      at java.lang.Object.wait(Native Method)
      - waiting on <0xcae13158> (a java.util.TaskQueue)
      at java.lang.Object.wait(Object.java:502)
      at java.util.TimerThread.mainLoop(Timer.java:526)
      - locked <0xcae13158> (a java.util.TaskQueue)
      at java.util.TimerThread.run(Timer.java:505)

      "Low Memory Detector" daemon prio=3 tid=0x08139800 nid=0xb runnable [0x00000000..0x00000000]
         java.lang.Thread.State: RUNNABLE

      "CompilerThread1" daemon prio=3 tid=0x08135800 nid=0xa waiting on condition [0x00000000..0xc6891008]
         java.lang.Thread.State: RUNNABLE

      "CompilerThread0" daemon prio=3 tid=0x08134000 nid=0x9 waiting on condition [0x00000000..0xfb045088]
         java.lang.Thread.State: RUNNABLE

      "Signal Dispatcher" daemon prio=3 tid=0x08132c00 nid=0x8 waiting on condition [0x00000000..0x00000000]
         java.lang.Thread.State: RUNNABLE

      "Finalizer" daemon prio=3 tid=0x0811f000 nid=0x7 in Object.wait() [0xfb0e9000..0xfb0e9c60]
         java.lang.Thread.State: WAITING (on object monitor)
      at java.lang.Object.wait(Native Method)
      - waiting on <0xcae1b080> (a java.lang.ref.ReferenceQueue$Lock)
      at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:133)
      - locked <0xcae1b080> (a java.lang.ref.ReferenceQueue$Lock)
      at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:149)
      at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:177)

      "Reference Handler" daemon prio=3 tid=0x0811d800 nid=0x6 in Object.wait() [0xfb13b000..0xfb13b8e0]
         java.lang.Thread.State: WAITING (on object monitor)
      at java.lang.Object.wait(Native Method)
      - waiting on <0xcae1b1e0> (a java.lang.ref.Reference$Lock)
      at java.lang.Object.wait(Object.java:502)
      at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:133)
      - locked <0xcae1b1e0> (a java.lang.ref.Reference$Lock)

      "main" prio=3 tid=0x08066800 nid=0x2 waiting for monitor entry [0xfe3f9000..0xfe3f9d78]
         java.lang.Thread.State: BLOCKED (on object monitor)
      at com.sun.jmx.event.RepeatedSingletonJob.resume(RepeatedSingletonJob.java:54)
      - waiting to lock <0xcae0c4e8> (a javax.management.event.FetchingEventRelay$MyJob)
      at javax.management.event.FetchingEventRelay.setEventReceiver(FetchingEventRelay.java:238)
      - locked <0xcae0c7c8> (a javax.management.event.FetchingEventRelay)
      at javax.management.event.EventClient.startListening(EventClient.java:845)
      - locked <0xcae1d1e8> (a java.util.HashMap)
      at javax.management.event.EventClient.subscribe(EventClient.java:505)
      at javasoft.sqe.jmx.test.perf_footprint.MemoryLeakTest.doAction(MemoryLeakTest.java:273)
      at javasoft.sqe.jmx.test.perf_footprint.MemoryLeakTest.run(MemoryLeakTest.java:149)
      at javasoft.sqe.jmx.share.TestStarter.<init>(TestStarter.java:28)
      at javasoft.sqe.jmx.share.TestStarter.main(TestStarter.java:79)

      "VM Thread" prio=3 tid=0x0811a000 nid=0x5 runnable

      "GC task thread#0 (ParallelGC)" prio=3 tid=0x0806d000 nid=0x3 runnable

      "GC task thread#1 (ParallelGC)" prio=3 tid=0x0806e400 nid=0x4 runnable

      "VM Periodic Task Thread" prio=3 tid=0x0813b400 nid=0xc waiting on condition

      JNI global references: 774


      Found one Java-level deadlock:
      =============================
      "JMX FetchingEventRelay executor 1":
        waiting to lock monitor 0x083d49d4 (object 0xcae0c7c8, a javax.management.event.FetchingEventRelay),
        which is held by "main"
      "main":
        waiting to lock monitor 0x081215f8 (object 0xcae0c4e8, a javax.management.event.FetchingEventRelay$MyJob),
        which is held by "JMX FetchingEventRelay executor 1"

      Java stack information for the threads listed above:
      ===================================================
      "JMX FetchingEventRelay executor 1":
      at javax.management.event.FetchingEventRelay$MyJob.isSuspended(FetchingEventRelay.java:267)
      - waiting to lock <0xcae0c7c8> (a javax.management.event.FetchingEventRelay)
      at com.sun.jmx.event.RepeatedSingletonJob.run(RepeatedSingletonJob.java:81)
      - locked <0xcae0c4e8> (a javax.management.event.FetchingEventRelay$MyJob)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:170)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:284)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:674)
      "main":
      at com.sun.jmx.event.RepeatedSingletonJob.resume(RepeatedSingletonJob.java:54)
      - waiting to lock <0xcae0c4e8> (a javax.management.event.FetchingEventRelay$MyJob)
      at javax.management.event.FetchingEventRelay.setEventReceiver(FetchingEventRelay.java:238)
      - locked <0xcae0c7c8> (a javax.management.event.FetchingEventRelay)
      at javax.management.event.EventClient.startListening(EventClient.java:845)
      - locked <0xcae1d1e8> (a java.util.HashMap)
      at javax.management.event.EventClient.subscribe(EventClient.java:505)
      at javasoft.sqe.jmx.test.perf_footprint.MemoryLeakTest.doAction(MemoryLeakTest.java:273)
      at javasoft.sqe.jmx.test.perf_footprint.MemoryLeakTest.run(MemoryLeakTest.java:149)
      at javasoft.sqe.jmx.share.TestStarter.<init>(TestStarter.java:28)
      at javasoft.sqe.jmx.share.TestStarter.main(TestStarter.java:79)

      Found 1 deadlock.

        Attachments

          Activity

            People

            • Assignee:
              sjiang Shanliang Jiang (Inactive)
              Reporter:
              slions Sandra Lions-piron
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: