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

java/util/concurrent/locks/ReentrantLock/CancelledLockLoops.java test failed with 'Completed != 2'

    XMLWordPrintable

    Details

      Backports

        Description

        TESTFAIL:java/util/concurrent/locks/ReentrantLock/CancelledLockLoops.java

        The following test:

        java/util/concurrent/locks/ReentrantLock/CancelledLockLoops.java

        failed with message:

        java.lang.Error: Completed != 2
        at CancelledLockLoops$ReentrantLockLoop.test(CancelledLockLoops.java:119)
        at CancelledLockLoops.main(CancelledLockLoops.java:65)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:623)
        at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
        at java.lang.Thread.run(Thread.java:713)

        Unfortunately, the test does not print the 'completed' variable value.

        It's not clear if it is a test bug or bug in the java.util.concurrent library. The bug seems to occur rarely. I was not able to reproduce it.

        Possible product bugs:
         - Thread.interrupt() was not delivered to a thread
         - Variable named 'completed' was not shared with other threads after update and lock.unlock() operation
         - other reasons??

        Possible test bugs:
         - one of the test threads managed to complete before the test interrupted it (at line 98)

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                srikchan Srikalyan Chandrashekar (Inactive)
                Reporter:
                kshiroko Kirill Shirokov (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: