Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-5330

Errors deleting repos in parallel

    XMLWordPrintable

Details

    Description

      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:

      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]
      
      

      Attachments

        Activity

          People

            cszmajda Cristan Szmajda (Inactive)
            tbomfim ThiagoBomfim (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: