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

sun/jvmstat/monitor/MonitoredVm/MonitorVmStartTerminate.sh timeout, leaves looping process behind

    Details

    • Subcomponent:
    • Resolved In Build:
      b04

      Backports

        Description

        The bug affects the following test:
            sun/jvmstat/monitor/MonitoredVm/MonitorVmStartTerminate.sh

        When running the :jdk_svc tests with a fastdebug build then this test periodically times out (even with -timeoutFactor:5).

        What's worse is that it leaves a looping process behind that is consume 100% of one core.

        I've attached a sample .jtr for the timeout. The process left behind looks like this in ps:

        albatem 19649 1 85 11:40 pts/0 00:48:59 /u/alanb/ws/tl/build/linux-x86_64-normal-server-fastdebug/images/j2sdk-image/bin/java -ea -esa -Xmx256m -DCompatibilityTest.disableNetwork=true -classpath /u/alanb/ws/tl/build/linux-x86_64-normal-server-fastdebug/images/j2sdk-image/lib/tools.jar:/u/alanb/testing/jtreg/JTwork/classes/3/sun/jvmstat/monitor/MonitoredVm:/u/alanb/testing/jtreg/JTwork/classes/3/sun/jvmstat/monitor/MonitoredVm/../../testlibrary MonitorVmStartTerminate

        Using jstack to look at the thread dump then the main thread and a timer thread appear to be the only interesting threads:

        "Timer-0" #10 daemon prio=5 os_prio=0 tid=0x00007f4d201c4000 nid=0x4cdc runnable [0x00007f4d08e8d000]
           java.lang.Thread.State: RUNNABLE
           JavaThread state: _thread_blocked
        Thread: 0x00007f4d201c4000 [0x4cdc] State: _call_back _has_called_back 1 _at_poll_safepoint 0
           JavaThread state: _thread_blocked
        at java.io.UnixFileSystem.list(Native Method)
        at java.io.File.list(File.java:1122)
        at java.io.File.listFiles(File.java:1248)
        at sun.jvmstat.perfdata.monitor.protocol.local.LocalVmManager.activeVms(LocalVmManager.java:146)
        - locked <0x00000000f0011210> (a sun.jvmstat.perfdata.monitor.protocol.local.LocalVmManager)
        at sun.jvmstat.perfdata.monitor.protocol.local.MonitoredHostProvider$NotifierTask.run(MonitoredHostProvider.java:192)
        at java.util.TimerThread.mainLoop(Timer.java:555)
        at java.util.TimerThread.run(Timer.java:505)


        "main" #1 prio=5 os_prio=0 tid=0x00007f4d2000b800 nid=0x4cc2 waiting on condition [0x00007f4d2772f000]
           java.lang.Thread.State: WAITING (parking)
           JavaThread state: _thread_blocked
        Thread: 0x00007f4d2000b800 [0x4cc2] State: _at_safepoint _has_called_back 0 _at_poll_safepoint 0
           JavaThread state: _thread_blocked
        at sun.misc.Unsafe.park(Native Method)
        - parking to wait for <0x00000000f0010cc8> (a java.util.concurrent.CountDownLatch$Sync)
        at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:997)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1304)
        at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:231)
        at MonitorVmStartTerminate$SleeperListener.waitForSleepersToStart(MonitorVmStartTerminate.java:87)
        at MonitorVmStartTerminate.main(MonitorVmStartTerminate.java:63)

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  egahlin Erik Gahlin
                  Reporter:
                  alanb Alan Bateman
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: