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

[TESTBUG] runtime/jni/LockTest intermittently hangs on linux

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b05
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Not verified

      Backports

        Description

        runtime/jni/LockTest intermittently hangs on linux-i586/linux-amd64.

        Baseline results:
        http://sqeweb.sfbay.sun.com/nfs/results/vm/gtee/JDK6/BASELINE/VM/r29/vm/linux-i586/server/mixed/linux-i586_vm_server_mixed_vm.runtime.testlist/analysis.html

        The test hangs in the following place:
        "main" prio=10 tid=0x08489000 nid=0x210c runnable [0xf733d000]
           java.lang.Thread.State: RUNNABLE
                at java.lang.Thread.yield(Native Method)
                at runtime.jni.LockTest.Bilingual.runTest(Bilingual.java:142)
                at runtime.jni.LockTest.LockTest.runLockTest(LockTest.java:40)
                at runtime.jni.LockTest.LockTest.main(LockTest.java:29)

        The problem is in the following code:
        Bilingual.java
           130 // Test jni -> bilingual lockqueue migration
           131 lockCount = 0;
           132 Monitor.monitorEnter(obj);
           133 new Thread(new UnlockVerify2()).start();
           134 new Thread(new UnlockVerify2()).start();
           135 new Thread(new UnlockVerify2()).start();
           136 synchronized(obj) {
           137 while(lockCount != 3)
           138 Thread.yield();
           139 Monitor.monitorExit(obj);
           140 }
           141 while(lockCount > 0)
           142 Thread.yield();
           143 lockqueueJNIToBilingual = "pass";

        Fastdebug VM build fails with the following assertion:
        # Internal Error (/BUILD_AREA/jdk7/hotspot/src/share/vm/runtime/synchronizer.cpp:3696), pid=27983, tid=4142402448
        # assert(false) failed: Non-balanced monitor enter/exit!
        [2010-10-21T18:00:39.18] ------------------------------------------------
        [2010-10-21T18:00:39.18] Java only simple contention pass
        [2010-10-21T18:00:39.18] Java vs JNI simple contention pass
        [2010-10-21T18:00:39.18] Java wait/notify pass
        [2010-10-21T18:00:39.18] Java wait/notifyAll pass
        [2010-10-21T18:00:39.18] JNI only simple contention pass
        [2010-10-21T18:00:39.18] JNI vs Java simple contention pass
        [2010-10-21T18:00:39.18] JNI unlock of unowned monitor pass
        [2010-10-21T18:00:39.18] JNI unlock of another thread's monitor pass
        [2010-10-21T18:00:39.18] JNI unlock of java only lock fail
        [2010-10-21T18:00:39.18] JNI unlock of reentrant java only lock fail
        [2010-10-21T18:00:39.18] JNI wait/notify pass
        [2010-10-21T18:00:39.18] JNI wait/notifyAll pass
        [2010-10-21T18:00:39.18] # Test level exit status: 151

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                gthornbr Gerald Thornbrugh (Inactive)
                Reporter:
                ctornqvi Christian Tornqvist
                Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: