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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major 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.

      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

        1. bla2.java
          2 kB
          Bela Ban
        2. lock.xml
          3 kB
          Bela Ban
        3. lock.xml
          3 kB
          Bela Ban
        4. LockServiceStabilityTestCase.java
          11 kB
          Bela Ban
        5. LockServiceStabilityTestCase.java
          11 kB
          Architect SoftWeb.ISD
        6. LockServiceStabilityTestCase.java
          10 kB
          Bela Ban

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

                Created:
                Updated:
                Resolved: