Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-6707

It is possible to get two threads running which are dropping the same staging repositories

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Incomplete
    • Affects Version/s: 2.7.2
    • Fix Version/s: None
    • Component/s: Staging
    • Labels:
      None

      Description

      There is a window of time where two threads can be started that are dropping the same staging repositories:

      2014-07-16 22:15:01 INFO [pxpool-1-thread-10] - com.sonatype.nexus.staging.internal.task.StagingBackgroundTask - STARTED Dropping staging repositories: [abc-defg-1092, abc-defg-1089, abc-defg-1090, abc-defg-1091]

      ...

      2014-07-16 22:15:28 INFO [pxpool-1-thread-14] - com.sonatype.nexus.staging.internal.task.StagingBackgroundTask - STARTED Dropping staging repositories: [abc-defg-1092, abc-defg-1089, abc-defg-1090, abc-defg-1091]

      After this, one of these threads will fail, and will leave staging repositories in an invalid state:

      2014-07-16 22:16:43 ERROR [pxpool-1-thread-14] - com.sonatype.nexus.staging.internal.task.RepositoryDropTask - Failure
      java.lang.IllegalStateException: No current activity for repository: abc-defg-1092
      at com.google.common.base.Preconditions.checkState(Preconditions.java:176) ~[guava-14.0.1.jar:na]
      at com.sonatype.nexus.staging.internal.activity.ActivityManagerImpl.current(ActivityManagerImpl.java:129) ~[nexus-staging-plugin-2.7.2-03.jar:2.7.2-03]
      at com.sonatype.nexus.staging.internal.task.OperationTaskSupport$OperationSupport.activityFailed(OperationTaskSupport.java:270) ~[nexus-staging-plugin-2.7.2-03.jar:2.7.2-03]
      at com.sonatype.nexus.staging.internal.task.OperationTaskSupport$OperationSupport.perform(OperationTaskSupport.java:319) ~[nexus-staging-plugin-2.7.2-03.jar:2.7.2-03]
      at com.sonatype.nexus.staging.internal.task.OperationTaskSupport.executeOperations(OperationTaskSupport.java:435) ~[nexus-staging-plugin-2.7.2-03.jar:2.7.2-03]
      at com.sonatype.nexus.staging.internal.task.OperationTaskSupport.doCall(OperationTaskSupport.java:416) ~[nexus-staging-plugin-2.7.2-03.jar:2.7.2-03]
      at com.sonatype.nexus.staging.internal.task.TaskSupport.call(TaskSupport.java:38) ~[nexus-staging-plugin-2.7.2-03.jar:2.7.2-03]
      at com.sonatype.nexus.staging.internal.task.StagingTaskSupport.call(StagingTaskSupport.java:134) [nexus-staging-plugin-2.7.2-03.jar:2.7.2-03]
      at com.sonatype.nexus.staging.internal.task.StagingBackgroundTask.execute(StagingBackgroundTask.java:68) [nexus-staging-plugin-2.7.2-03.jar:2.7.2-03]
      at com.sonatype.nexus.staging.internal.task.NexusTaskSupport.doRun(NexusTaskSupport.java:53) [nexus-staging-plugin-2.7.2-03.jar:2.7.2-03]
      at com.sonatype.nexus.staging.internal.task.NexusTaskSupport.doRun(NexusTaskSupport.java:1) [nexus-staging-plugin-2.7.2-03.jar:2.7.2-03]
      at org.sonatype.nexus.scheduling.AbstractNexusTask.call(AbstractNexusTask.java:157) [nexus-core-2.7.2-03.jar:2.7.2-03]
      at org.sonatype.scheduling.DefaultScheduledTask.call(DefaultScheduledTask.java:419) [nexus-scheduler-2.7.2-03.jar:2.7.2-03]
      at org.sonatype.nexus.threads.MDCAwareCallable.call(MDCAwareCallable.java:45) [nexus-core-2.7.2-03.jar:2.7.2-03]
      at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) [shiro-core-1.2.2.jar:1.2.2]
      at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) [shiro-core-1.2.2.jar:1.2.2]
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [na:1.7.0_21]
      at java.util.concurrent.FutureTask.run(FutureTask.java:166) [na:1.7.0_21]
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) [na:1.7.0_21]
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) [na:1.7.0_21]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_21]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_21]
      at java.lang.Thread.run(Thread.java:722) [na:1.7.0_21]

      A restart of the server is needed to get the staging repositories out of this state.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            rseddon Rich Seddon
            Last Updated By:
            Peter Lynch
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title