java.lang.IllegalMonitorStateException: Current thread is not owner of the lock! -> <not-locked>

Atlassian JIRA | Thiago Bomfim | 2 years ago
  1. 0

    On stash 3.3.1, there appears to be a race condition deleting repositories in parallel. (I was bulk-deleting some repositories I'd tested our migration script on, in our lab environment) The attached script creates a test project and 100 repositories, then deletes the in parallel. This results in some of the requests returning an internal server error, so the repos aren't being deleted Workaround is to not delete the repos in parallel - removing the & from the script and deleting sequentially works. Errors in the server logs are: {noformat} 2014-10-01 09:48:09,148 ERROR [hz.hazelcast.partition-operation.thread-4] c.h.c.l.operations.UnlockOperation [192.168.122.1]:5701 [bamboo-agent] [3.3-RC3] Current thread is not owner of the lock! -> <not-locked> java.lang.IllegalMonitorStateException: Current thread is not owner of the lock! -> <not-locked> at com.hazelcast.concurrent.lock.operations.UnlockOperation.ensureUnlocked(UnlockOperation.java:71) ~[hazelcast-3.3-RC3.jar:3.3-RC3] at com.hazelcast.concurrent.lock.operations.UnlockOperation.unlock(UnlockOperation.java:65) ~[hazelcast-3.3-RC3.jar:3.3-RC3] at com.hazelcast.concurrent.lock.operations.UnlockOperation.run(UnlockOperation.java:57) ~[hazelcast-3.3-RC3.jar:3.3-RC3] at com.hazelcast.spi.impl.BasicOperationService$OperationHandler.handle(BasicOperationService.java:673) [hazelcast-3.3-RC3.jar:3.3-RC3] at com.hazelcast.spi.impl.BasicOperationService$OperationHandler.access$400(BasicOperationService.java:649) [hazelcast-3.3-RC3.jar:3.3-RC3] at com.hazelcast.spi.impl.BasicOperationService$BasicDispatcherImpl.dispatch(BasicOperationService.java:527) [hazelcast-3.3-RC3.jar:3.3-RC3] at com.hazelcast.spi.impl.BasicOperationScheduler$OperationThread.process(BasicOperationScheduler.java:439) [hazelcast-3.3-RC3.jar:3.3-RC3] at com.hazelcast.spi.impl.BasicOperationScheduler$OperationThread.doRun(BasicOperationScheduler.java:433) [hazelcast-3.3-RC3.jar:3.3-RC3] at com.hazelcast.spi.impl.BasicOperationScheduler$OperationThread.run(BasicOperationScheduler.java:408) [hazelcast-3.3-RC3.jar:3.3-RC3] 2014-10-01 09:48:09,445 ERROR [http-apr-7990-exec-56] admin @1OLZ7CHx588x2180x51 127.0.0.1 "DELETE /rest/api/1.0/projects/TEST/repos/repo53 HTTP/1.1" c.a.s.r.e.UnhandledExceptionMapper Unhandled exception while processing REST call java.lang.IllegalMonitorStateException: Current thread is not owner of the lock! -> <not-locked> at com.hazelcast.concurrent.lock.operations.UnlockOperation.ensureUnlocked(UnlockOperation.java:71) ~[hazelcast-3.3-RC3.jar:3.3-RC3] at com.hazelcast.concurrent.lock.operations.UnlockOperation.unlock(UnlockOperation.java:65) ~[hazelcast-3.3-RC3.jar:3.3-RC3] at com.hazelcast.concurrent.lock.operations.UnlockOperation.run(UnlockOperation.java:57) ~[hazelcast-3.3-RC3.jar:3.3-RC3] at com.hazelcast.spi.impl.BasicOperationService$OperationHandler.handle(BasicOperationService.java:673) ~[hazelcast-3.3-RC3.jar:3.3-RC3] at com.hazelcast.spi.impl.BasicOperationService$OperationHandler.access$400(BasicOperationService.java:649) ~[hazelcast-3.3-RC3.jar:3.3-RC3] at com.hazelcast.spi.impl.BasicOperationService$BasicDispatcherImpl.dispatch(BasicOperationService.java:527) ~[hazelcast-3.3-RC3.jar:3.3-RC3] at com.hazelcast.spi.impl.BasicOperationScheduler$OperationThread.process(BasicOperationScheduler.java:439) ~[hazelcast-3.3-RC3.jar:3.3-RC3] at com.hazelcast.spi.impl.BasicOperationScheduler$OperationThread.doRun(BasicOperationScheduler.java:433) ~[hazelcast-3.3-RC3.jar:3.3-RC3] at com.hazelcast.spi.impl.BasicOperationScheduler$OperationThread.run(BasicOperationScheduler.java:408) ~[hazelcast-3.3-RC3.jar:3.3-RC3] {noformat}

    Atlassian JIRA | 2 years ago | Thiago Bomfim [Atlassian]
    java.lang.IllegalMonitorStateException: Current thread is not owner of the lock! -> <not-locked>
  2. 0

    On stash 3.3.1, there appears to be a race condition deleting repositories in parallel. (I was bulk-deleting some repositories I'd tested our migration script on, in our lab environment) The attached script creates a test project and 100 repositories, then deletes the in parallel. This results in some of the requests returning an internal server error, so the repos aren't being deleted Workaround is to not delete the repos in parallel - removing the & from the script and deleting sequentially works. Errors in the server logs are: {noformat} 2014-10-01 09:48:09,148 ERROR [hz.hazelcast.partition-operation.thread-4] c.h.c.l.operations.UnlockOperation [192.168.122.1]:5701 [bamboo-agent] [3.3-RC3] Current thread is not owner of the lock! -> <not-locked> java.lang.IllegalMonitorStateException: Current thread is not owner of the lock! -> <not-locked> at com.hazelcast.concurrent.lock.operations.UnlockOperation.ensureUnlocked(UnlockOperation.java:71) ~[hazelcast-3.3-RC3.jar:3.3-RC3] at com.hazelcast.concurrent.lock.operations.UnlockOperation.unlock(UnlockOperation.java:65) ~[hazelcast-3.3-RC3.jar:3.3-RC3] at com.hazelcast.concurrent.lock.operations.UnlockOperation.run(UnlockOperation.java:57) ~[hazelcast-3.3-RC3.jar:3.3-RC3] at com.hazelcast.spi.impl.BasicOperationService$OperationHandler.handle(BasicOperationService.java:673) [hazelcast-3.3-RC3.jar:3.3-RC3] at com.hazelcast.spi.impl.BasicOperationService$OperationHandler.access$400(BasicOperationService.java:649) [hazelcast-3.3-RC3.jar:3.3-RC3] at com.hazelcast.spi.impl.BasicOperationService$BasicDispatcherImpl.dispatch(BasicOperationService.java:527) [hazelcast-3.3-RC3.jar:3.3-RC3] at com.hazelcast.spi.impl.BasicOperationScheduler$OperationThread.process(BasicOperationScheduler.java:439) [hazelcast-3.3-RC3.jar:3.3-RC3] at com.hazelcast.spi.impl.BasicOperationScheduler$OperationThread.doRun(BasicOperationScheduler.java:433) [hazelcast-3.3-RC3.jar:3.3-RC3] at com.hazelcast.spi.impl.BasicOperationScheduler$OperationThread.run(BasicOperationScheduler.java:408) [hazelcast-3.3-RC3.jar:3.3-RC3] 2014-10-01 09:48:09,445 ERROR [http-apr-7990-exec-56] admin @1OLZ7CHx588x2180x51 127.0.0.1 "DELETE /rest/api/1.0/projects/TEST/repos/repo53 HTTP/1.1" c.a.s.r.e.UnhandledExceptionMapper Unhandled exception while processing REST call java.lang.IllegalMonitorStateException: Current thread is not owner of the lock! -> <not-locked> at com.hazelcast.concurrent.lock.operations.UnlockOperation.ensureUnlocked(UnlockOperation.java:71) ~[hazelcast-3.3-RC3.jar:3.3-RC3] at com.hazelcast.concurrent.lock.operations.UnlockOperation.unlock(UnlockOperation.java:65) ~[hazelcast-3.3-RC3.jar:3.3-RC3] at com.hazelcast.concurrent.lock.operations.UnlockOperation.run(UnlockOperation.java:57) ~[hazelcast-3.3-RC3.jar:3.3-RC3] at com.hazelcast.spi.impl.BasicOperationService$OperationHandler.handle(BasicOperationService.java:673) ~[hazelcast-3.3-RC3.jar:3.3-RC3] at com.hazelcast.spi.impl.BasicOperationService$OperationHandler.access$400(BasicOperationService.java:649) ~[hazelcast-3.3-RC3.jar:3.3-RC3] at com.hazelcast.spi.impl.BasicOperationService$BasicDispatcherImpl.dispatch(BasicOperationService.java:527) ~[hazelcast-3.3-RC3.jar:3.3-RC3] at com.hazelcast.spi.impl.BasicOperationScheduler$OperationThread.process(BasicOperationScheduler.java:439) ~[hazelcast-3.3-RC3.jar:3.3-RC3] at com.hazelcast.spi.impl.BasicOperationScheduler$OperationThread.doRun(BasicOperationScheduler.java:433) ~[hazelcast-3.3-RC3.jar:3.3-RC3] at com.hazelcast.spi.impl.BasicOperationScheduler$OperationThread.run(BasicOperationScheduler.java:408) ~[hazelcast-3.3-RC3.jar:3.3-RC3] {noformat}

    Atlassian JIRA | 2 years ago | Thiago Bomfim
    java.lang.IllegalMonitorStateException: Current thread is not owner of the lock! -> <not-locked>
  3. 0

    MapLockTest: Current thread is not owner of the lock! MapCasTest: NullPointerException

    GitHub | 2 years ago | pveentjer
    java.lang.IllegalMonitorStateException: Current thread is not owner of the lock! -> <not-locked>
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    IllegalMonitorStateException: Current thread is not owner of the lock! in Hibernate support under heavy load

    GitHub | 2 years ago | cszmajda
    java.lang.IllegalMonitorStateException: Current thread is not owner of the lock! -> <not-locked>
  6. 0

    [BSERV-5155] LDAP Synchronization Time Refresh Broken due to JavaScript error - Atlassian JIRA

    atlassian.com | 1 year ago
    java.lang.IllegalMonitorStateException: Current thread is not owner of the lock! -> <not-locked>

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalMonitorStateException

      Current thread is not owner of the lock! -> <not-locked>

      at com.hazelcast.concurrent.lock.operations.UnlockOperation.ensureUnlocked()
    2. Hazelcast
      BasicOperationScheduler$OperationThread.run
      1. com.hazelcast.concurrent.lock.operations.UnlockOperation.ensureUnlocked(UnlockOperation.java:71)[hazelcast-3.3-RC3.jar:3.3-RC3]
      2. com.hazelcast.concurrent.lock.operations.UnlockOperation.unlock(UnlockOperation.java:65)[hazelcast-3.3-RC3.jar:3.3-RC3]
      3. com.hazelcast.concurrent.lock.operations.UnlockOperation.run(UnlockOperation.java:57)[hazelcast-3.3-RC3.jar:3.3-RC3]
      4. com.hazelcast.spi.impl.BasicOperationService$OperationHandler.handle(BasicOperationService.java:673)[hazelcast-3.3-RC3.jar:3.3-RC3]
      5. com.hazelcast.spi.impl.BasicOperationService$OperationHandler.access$400(BasicOperationService.java:649)[hazelcast-3.3-RC3.jar:3.3-RC3]
      6. com.hazelcast.spi.impl.BasicOperationService$BasicDispatcherImpl.dispatch(BasicOperationService.java:527)[hazelcast-3.3-RC3.jar:3.3-RC3]
      7. com.hazelcast.spi.impl.BasicOperationScheduler$OperationThread.process(BasicOperationScheduler.java:439)[hazelcast-3.3-RC3.jar:3.3-RC3]
      8. com.hazelcast.spi.impl.BasicOperationScheduler$OperationThread.doRun(BasicOperationScheduler.java:433)[hazelcast-3.3-RC3.jar:3.3-RC3]
      9. com.hazelcast.spi.impl.BasicOperationScheduler$OperationThread.run(BasicOperationScheduler.java:408)[hazelcast-3.3-RC3.jar:3.3-RC3]
      9 frames