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

serviceability/sa/TestJhsdbJstackLock.java fails to find '^\s+- waiting to lock <0x[0-9a-f]+> \(a java\.lang\.Class ...'

XMLWordPrintable

    • b27

        Test serviceability/sa/TestJhsdbJstackLock.java *highly* intermittently fail to find expected line in jhsdb output.

        The log is:

        'LingeredAppWithLock' '0b023fa7-6163-484a-8e84-c3293d499b1e.lck' ]

         stdout: [Attaching to process ID 46496, please wait...
        Debugger attached successfully.
        Server compiler detected.
        JVM version is 12-ea+10
        Deadlock Detection:

        No deadlocks found.

        "Thread-3" #16 prio=5 tid=0x000000b3703d2000 nid=0x3b68 waiting on condition [0x000000b37165f000]
           java.lang.Thread.State: TIMED_WAITING (sleeping)
           JavaThread state: _thread_blocked
         - java.lang.Thread.sleep(long) @bci=0 (Interpreted frame)
         - LingeredAppWithLock.lockMethod(java.lang.Object) @bci=7, line=32 (Interpreted frame)
        - locked <0x0000000754100010> (a java.lang.Class for int)
         - LingeredAppWithLock.lambda$main$3() @bci=3, line=43 (Interpreted frame)
         - LingeredAppWithLock$$Lambda$4.run() @bci=0 (Interpreted frame)
         - java.lang.Thread.run() @bci=11, line=834 (Interpreted frame)


        "Thread-2" #15 prio=5 tid=0x000000b3703d1800 nid=0x6c34 waiting on condition [0x000000b37155e000]
           java.lang.Thread.State: TIMED_WAITING (sleeping)
           JavaThread state: _thread_blocked
         - java.lang.Thread.sleep(long) @bci=0 (Interpreted frame)
         - LingeredAppWithLock.lockMethod(java.lang.Object) @bci=7, line=32 (Interpreted frame)
        - locked <0x00000007540303f8> (a java.lang.Thread)
         - LingeredAppWithLock.lambda$main$2(java.lang.Thread) @bci=1, line=42 (Interpreted frame)
         - LingeredAppWithLock$$Lambda$3.run() @bci=4 (Interpreted frame)
         - java.lang.Thread.run() @bci=11, line=834 (Interpreted frame)


        "Thread-1" #14 prio=5 tid=0x000000b370384800 nid=0x9b88 waiting on condition [0x000000b37145f000]
           java.lang.Thread.State: TIMED_WAITING (sleeping)
           JavaThread state: _thread_blocked
         - java.lang.Thread.sleep(long) @bci=0 (Interpreted frame)
         - LingeredAppWithLock.lockMethod(java.lang.Object) @bci=7, line=32 (Interpreted frame)
        - locked <0x000000075402e508> (a java.lang.Class for LingeredAppWithLock)
         - LingeredAppWithLock.lambda$main$0() @bci=2, line=40 (Interpreted frame)
         - LingeredAppWithLock$$Lambda$2.run() @bci=0 (Interpreted frame)
         - java.lang.Thread.run() @bci=11, line=834 (Interpreted frame)


        "Thread-0" #13 prio=5 tid=0x000000b370381800 nid=0x707c waiting for monitor entry [0x000000b37135f000]
           java.lang.Thread.State: BLOCKED (on object monitor)
           JavaThread state: _thread_blocked
         - LingeredAppWithLock.lambda$main$0() @bci=2, line=40 (Interpreted frame)
         - LingeredAppWithLock$$Lambda$1.run() @bci=0 (Interpreted frame)
         - java.lang.Thread.run() @bci=11, line=834 (Interpreted frame)


        "Common-Cleaner" #12 daemon prio=8 tid=0x000000b37034f000 nid=0x6580 in Object.wait() [0x000000b37125e000]
           java.lang.Thread.State: TIMED_WAITING (on object monitor)
           JavaThread state: _thread_blocked
         - java.lang.Object.wait(long) @bci=0 (Interpreted frame)
        - waiting on <0x00000007540216d0> (a java.lang.ref.ReferenceQueue$Lock)
         - java.lang.ref.ReferenceQueue.remove(long) @bci=59, line=155 (Interpreted frame)
        - waiting to re-lock in wait() <0x00000007540216d0> (a java.lang.ref.ReferenceQueue$Lock)
         - jdk.internal.ref.CleanerImpl.run() @bci=65, line=148 (Interpreted frame)
         - java.lang.Thread.run() @bci=11, line=834 (Interpreted frame)
         - jdk.internal.misc.InnocuousThread.run() @bci=20, line=134 (Interpreted frame)


        "Attach Listener" #5 daemon prio=5 tid=0x000000b37001c000 nid=0x6bc0 runnable [0x0000000000000000]
           java.lang.Thread.State: RUNNABLE
           JavaThread state: _thread_blocked


        "Signal Dispatcher" #4 daemon prio=9 tid=0x000000b370019800 nid=0x5f94 runnable [0x0000000000000000]
           java.lang.Thread.State: RUNNABLE
           JavaThread state: _thread_blocked


        "Finalizer" #3 daemon prio=8 tid=0x000000b36ffb3800 nid=0x28bc in Object.wait() [0x000000b37097f000]
           java.lang.Thread.State: WAITING (on object monitor)
           JavaThread state: _thread_blocked
         - java.lang.Object.wait(long) @bci=0 (Interpreted frame)
        - waiting on <0x0000000754108f10> (a java.lang.ref.ReferenceQueue$Lock)
         - java.lang.ref.ReferenceQueue.remove(long) @bci=59, line=155 (Interpreted frame)
        - waiting to re-lock in wait() <0x0000000754108f10> (a java.lang.ref.ReferenceQueue$Lock)
         - java.lang.ref.ReferenceQueue.remove() @bci=2, line=176 (Interpreted frame)
         - java.lang.ref.Finalizer$FinalizerThread.run() @bci=37, line=170 (Interpreted frame)


        "Reference Handler" #2 daemon prio=10 tid=0x000000b36ffa9800 nid=0x7028 waiting on condition [0x000000b37087e000]
           java.lang.Thread.State: RUNNABLE
           JavaThread state: _thread_blocked
         - java.lang.ref.Reference.waitForReferencePendingList() @bci=0 (Interpreted frame)
         - java.lang.ref.Reference.processPendingReferences() @bci=0, line=241 (Interpreted frame)
         - java.lang.ref.Reference$ReferenceHandler.run() @bci=0, line=213 (Interpreted frame)


        "main" #1 prio=5 tid=0x000000b34c1a5800 nid=0x1204 waiting on condition [0x000000b34b94f000]
           java.lang.Thread.State: TIMED_WAITING (sleeping)
           JavaThread state: _thread_blocked
         - java.lang.Thread.sleep(long) @bci=0 (Interpreted frame)
         - jdk.test.lib.apps.LingeredApp.main(java.lang.String[]) @bci=53, line=498 (Interpreted frame)
         - LingeredAppWithLock.main(java.lang.String[]) @bci=72, line=50 (Interpreted frame)


        ];
         stderr: []
         exitValue = 0

         LingeredApp stdout: [];
         LingeredApp stderr: []
         LingeredApp exitValue = 0
        java.lang.RuntimeException: '^\\s+- waiting to lock <0x[0-9a-f]+> \\(a java\\.lang\\.Class for LingeredAppWithLock\\)$' missing from stdout/stderr

        at jdk.test.lib.process.OutputAnalyzer.shouldMatch(OutputAnalyzer.java:258)
        at TestJhsdbJstackLock.main(TestJhsdbJstackLock.java:76)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
        at java.base/java.lang.Thread.run(Thread.java:834)

        JavaTest Message: Test threw exception: java.lang.RuntimeException: '^\\s+- waiting to lock <0x[0-9a-f]+> \\(a java\\.lang\\.Class for LingeredAppWithLock\\)$' missing from stdout/stderr

              cjplummer Chris Plummer
              lmesnik Leonid Mesnik
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: