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

Database deadlock on Oracle when delete deployment project

      Happens on Oracle DB when heavily create/remove deployment projects/environments by several users

      2017-05-22 04:12:14,606 ERROR [http-nio-127.0.0.1-8085-exec-210] [SqlExceptionHelper] ORA-00060: deadlock detected while waiting for resource
      
      2017-05-22 04:12:14,606 WARN [http-nio-127.0.0.1-8085-exec-210] [SqlExceptionHelper] SQL Error: 60, SQLState: 61000
      2017-05-22 04:12:14,606 ERROR [http-nio-127.0.0.1-8085-exec-210] [SqlExceptionHelper] ORA-00060: deadlock detected while waiting for resource
      
      2017-05-22 04:12:14,606 ERROR [http-nio-127.0.0.1-8085-exec-210] [BatchingBatch] HHH000315: Exception executing batch [could not execute batch]
      2017-05-22 04:12:14,606 INFO [http-nio-127.0.0.1-8085-exec-202] [AccessLogFilter] user GET https://bamboo.com/chain/result/viewChainCommits.action?planKey=QAT-H29&buildNumber=1 6153905kb
      2017-05-22 04:12:14,607 INFO [http-nio-127.0.0.1-8085-exec-189] [AccessLogFilter] user GET https://bamboo.com/rest/menu/latest/appswitcher?_=1495440734241 6157024kb
      2017-05-22 04:12:14,614 DEBUG [http-nio-127.0.0.1-8085-exec-210] [UtilTimerStack] [3271ms] - com.atlassian.bamboo.ww2.interceptors.PaginationAwareInterceptor.intercept
        [3271ms] - com.atlassian.bamboo.ww2.interceptors.BambooXsrfTokenInterceptor.intercept
          [3270ms] - com.atlassian.bamboo.ww2.interceptors.JSONValidationInterceptor.intercept
            [9ms] - delete from DEPLOYMENT_VERSION_COMMIT where DEP_VERSION_CHANGESET_ID in (select DEP_VERSION_CHANGESET_ID from DEPLOYMENT_VERSION_CHANGESET where DEPLOYMENT_VERSION_ID in (select DEPLOYMENT_VERSION_ID from DEPLOYMENT_VERSION where PROJECT_ID = 123830375))
            [3ms] - delete from DEPLOYMENT_VERSION_CHANGESET where DEPLOYMENT_VERSION_ID in (select DEPLOYMENT_VERSION_ID from DEPLOYMENT_VERSION where PROJECT_ID = 123830375)
            [7ms] - delete from DEPLOYMENT_VERSION_STATUS where DEPLOYMENT_VERSION_ID in (select DEPLOYMENT_VERSION_ID from DEPLOYMENT_VERSION where PROJECT_ID = 123830375)
            [3ms] - delete from DEPLOYMENT_VERSION_JIRA_ISSUE where DEPLOYMENT_VERSION_ID in (select DEPLOYMENT_VERSION_ID from DEPLOYMENT_VERSION where PROJECT_ID = 123830375)
            [3ms] - update DEPLOYMENT_RESULT set VERSION_ID = ? where VERSION_ID in (select DEPLOYMENT_VERSION_ID from DEPLOYMENT_VERSION where PROJECT_ID = 123830375)
            [2ms] - delete from VARIABLE_DEFINITION where DEPLOYMENT_VERSION_ID in (select DEPLOYMENT_VERSION_ID from DEPLOYMENT_VERSION where PROJECT_ID = 123830375)
            [3ms] - delete from USER_COMMENT where ENTITY_ID in (select DEPLOYMENT_VERSION_ID from DEPLOYMENT_VERSION where PROJECT_ID = 123830375)
            [2ms] - delete from DEP_VERSION_PLANRESULTKEYS where DEPLOYMENT_VERSION_ID in (select DEPLOYMENT_VERSION_ID from DEPLOYMENT_VERSION where PROJECT_ID = 123830375)
            [10ms] - delete from DEPLOYMENT_VERSION_ITEM_BA  where VERSION_BAM_ARTIFACT_ITEM_ID in (       select DEPLOYMENT_VERSION_ITEM_ID          from DEPLOYMENT_VERSION_ITEM         where DEPLOYMENT_VERSION_ID in (select DEPLOYMENT_VERSION_ID from DEPLOYMENT_VERSION where PROJECT_ID = 123830375))
            [3ms] - delete from DEPLOYMENT_VERSION_ITEM where DEPLOYMENT_VERSION_ID in (select DEPLOYMENT_VERSION_ID from DEPLOYMENT_VERSION where PROJECT_ID = 123830375)
            [2ms] - delete from DEPLOYMENT_VERSION where PROJECT_ID = 123830375
      
      2017-05-22 04:12:14,614 ERROR [http-nio-127.0.0.1-8085-exec-210] [ExceptionMappingInterceptor] could not execute batch; SQL [delete from ACL_OBJECT_IDENTITY where ID=?]; nested exception is org.hibernate.exception.LockAcquisitionException: could not execute batch
      org.springframework.dao.CannotAcquireLockException: could not execute batch; SQL [delete from ACL_OBJECT_IDENTITY where ID=?]; nested exception is org.hibernate.exception.LockAcquisitionException: could not execute batch
              at org.springframework.orm.hibernate4.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:154)
              at org.springframework.orm.hibernate4.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:730)
              at org.springframework.orm.hibernate4.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:592)
              at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:761)
              at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:730)
              at sun.reflect.GeneratedMethodAccessor160.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
              at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
              at com.sun.proxy.$Proxy31.commit(Unknown Source)
              at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:150)
              at com.atlassian.bamboo.persistence.BambooTransactionHibernateTemplate.execute(BambooTransactionHibernateTemplate.java:41)
              at com.atlassian.bamboo.persistence.BambooTransactionHibernateTemplate.execute(BambooTransactionHibernateTemplate.java:47)
              at com.atlassian.bamboo.deployments.projects.service.DeploymentProjectDeletionServiceImpl.deleteDeploymentProject(DeploymentProjectDeletionServiceImpl.java:84)
              at sun.reflect.GeneratedMethodAccessor2197.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
              at com.atlassian.bamboo.security.acegi.intercept.aopalliance.AuthorityOverrideMethodSecurityInterceptor.invoke(AuthorityOverrideMethodSecurityInterceptor.java:30)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
              at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)
              at com.sun.proxy.$Proxy205.deleteDeploymentProject(Unknown Source)
              at com.atlassian.bamboo.deployments.projects.actions.DeleteDeploymentProject.delete(DeleteDeploymentProject.java:42)
              at sun.reflect.GeneratedMethodAccessor2196.invoke(Unknown Source)
      

              Unassigned Unassigned
              achystoprudov Alexey Chystoprudov
              Affected customers:
              0 This affects my team
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: