Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-1660

LockService hangs during concurrent access (tryLock/tryLock(timeout)/lock/unlock)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Major
    • 3.5
    • 3.2.4, 3.3.3
    • None
    • Workaround Exists
    • Hide

      tryLock with timeout

      Show
      tryLock with timeout
    • Hide

      Start some amount of threads which in turn simultaneously obtain lock through LockService#getLock then perform lock/tryLock and unlock.
      Each thread works during some time.

      Show
      Start some amount of threads which in turn simultaneously obtain lock through LockService#getLock then perform lock/tryLock and unlock. Each thread works during some time.

    Description

      We have rather simple test that starts some amount of threads which in turn simultaneously obtain lock through LockService#getLock then perform lock and unlock.
      Each thread works during some time.
      After couple of seconds of work some threads just hang up in Locking$ClientLock(Object).wait() called indirectly from LockService$LockImpl.tryLock().
      Here is stack trace:
      Thread [Thread-ClientImitation-1] (Suspended)
      Object.wait(long) line: not available [native method]
      Locking$ClientLock(Object).wait() line: 485
      Locking$ClientLock.acquireTryLock(long, boolean) line: 1010
      Locking$ClientLock.tryLock() line: 896
      CENTRAL_LOCK(Locking).down(Event) line: 152
      ProtocolStack.down(Event) line: 1025
      JChannel.down(Event) line: 718
      LockService$LockImpl.tryLock() line: 102
      LockServiceStabilityTestCase$ClientImitation.run() line: 167
      Thread.run() line: 662

      Attachments

        1. bla2.java
          2 kB
        2. lock.xml
          3 kB
        3. lock.xml
          3 kB
        4. lockservice_stability_testcase.jar
          34 kB
        5. LockServiceStabilityTestCase.java
          11 kB
        6. LockServiceStabilityTestCase.java
          11 kB
        7. LockServiceStabilityTestCase.java
          10 kB

        Issue Links

          Activity

            People

              rhn-engineering-bban Bela Ban
              architect.softweb.isd Architect SoftWeb.ISD (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: