Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-14518

DeletionServiceImpl fails to delete stage due to NPE

    XMLWordPrintable

Details

    Description

      2014-04-22 23:37:48,783 INFO [QuartzScheduler_Worker-10] [DeletionServiceImpl] Deleting 4006 stage(s) marked for deletion
      2014-04-22 23:37:48,785 INFO [QuartzScheduler_Worker-10] [PlanManagerImpl] Removing 1 stage(s) for plan AMKT-TRUNK31
      2014-04-22 23:37:48,814 ERROR [QuartzScheduler_Worker-10] [DeletionServiceImpl] Unable to complete delayed deletion: 
      java.lang.NullPointerException
              at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:187)
              at com.atlassian.bamboo.utils.BambooPredicates$HasBambooObjectEqualIdPredicate.apply(BambooPredicates.java:306)
              at com.atlassian.bamboo.utils.BambooPredicates$HasBambooObjectEqualIdPredicate.apply(BambooPredicates.java:295)
              at com.google.common.collect.Iterators.removeIf(Iterators.java:213)
              at com.google.common.collect.Iterables.removeIf(Iterables.java:184)
              at com.atlassian.bamboo.plan.AbstractChain.removeStage(AbstractChain.java:76)
              at com.atlassian.bamboo.plan.PlanManagerImpl.removeStages(PlanManagerImpl.java:448)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:606)
              at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
              at com.atlassian.bamboo.security.acegi.intercept.aopalliance.AuthorityOverrideMethodSecurityInterceptor.invoke(AuthorityOverrideMethodSecurityInterceptor.java:29)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
              at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
              at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
              at com.sun.proxy.$Proxy47.removeStages(Unknown Source)
              at com.atlassian.bamboo.deletion.DeletionServiceImpl.executeDelayedDeletion(DeletionServiceImpl.java:502)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:606)
              at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
              at com.atlassian.bamboo.security.acegi.intercept.aopalliance.AuthorityOverrideMethodSecurityInterceptor.invoke(AuthorityOverrideMethodSecurityInterceptor.java:29)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
              at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
              at com.sun.proxy.$Proxy106.executeDelayedDeletion(Unknown Source)
              at com.atlassian.bamboo.deletion.DeletionServiceJob.execute(DeletionServiceJob.java:26)
              at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
              at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49)
              at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31)
              at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20)
              at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52)
              at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525)
      

      Looking at the code it seems to me that a chain contains a null stage - strange.

      Impact: according to the code, only jobs (and potentially some stages) marked for deletion will be cleaned up, but not top level plans or projects.

      Looking at the database now ...

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mmeinhold Martin Meinhold
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: