Project: bamboo
Issue BAM-11603: Database deadlock in MySQL
From http://tardigrade.sydney.atlassian.com:8085/bamboo/browse/BDT-MYSQL-578/artifact/JOB1/Bamboo-Log/output.log But it could be related to what BEAC and JBACV sees occasionaly as well {code} 2012-05-06 15:39:19,181 INFO [AtlassianEvent::0-BAM::EVENTS:pool-2-thread-13] [ChainExecutionManagerImpl] Plan RAN119295352-MAIN1192953520-3: Random Project119295352 - Plan119295352 - branch_no_1 has finished executing 2012-05-06 15:39:19,221 INFO [11-BAM::Test Agent 1::Agent:pool-18-thread-1] [CvsRepositoryManager] Getting list of commits for Tue Jan 31 15:39:07 UTC 2012 2012-05-06 15:39:19,296 INFO [http-9087-Processor18] [CvsRepositoryManager] Getting list of commits for Sun Nov 27 15:39:02 UTC 2011 2012-05-06 15:39:19,468 WARN [AtlassianEvent::0-BAM::EVENTS:pool-2-thread-13] [JDBCExceptionReporter] SQL Error: 1213, SQLState: 40001 2012-05-06 15:39:19,468 ERROR [AtlassianEvent::0-BAM::EVENTS:pool-2-thread-13] [JDBCExceptionReporter] Deadlock found when trying to get lock; try restarting transaction 2012-05-06 15:39:19,483 WARN [AtlassianEvent::0-BAM::EVENTS:pool-2-thread-13] [JDBCExceptionReporter] SQL Error: 1213, SQLState: 40001 2012-05-06 15:39:19,483 ERROR [AtlassianEvent::0-BAM::EVENTS:pool-2-thread-13] [JDBCExceptionReporter] Deadlock found when trying to get lock; try restarting transaction 2012-05-06 15:39:19,484 ERROR [AtlassianEvent::0-BAM::EVENTS:pool-2-thread-13] [SessionImpl] Could not synchronize database state with session 2012-05-06 15:39:19,588 INFO [AtlassianEvent::0-BAM::EVENTS:pool-2-thread-13] [BrokenBuildPostProcessor] RAN119295352-MAIN1192953520-3 was rerun and still failed. Tracking entry not updated. Rerun builds not currently supported 2012-05-06 15:39:19,605 INFO [http-9087-Processor14] [AccessLogFilter] admin GET http://localhost:9087/bamboo/start.action 239259kb 2012-05-06 15:39:19,619 INFO [http-9087-Processor14] [AccessLogFilter] admin GET http://localhost:9087/bamboo/legacyDashboard.action 238856kb 2012-05-06 15:39:19,752 INFO [11-BAM::Test Agent 1::Agent:pool-18-thread-1] [CvsRepositoryManager] Getting list of commits for Thu Jan 26 15:39:07 UTC 2012 2012-05-06 15:39:20,038 INFO [http-9087-Processor18] [CvsRepositoryManager] Getting list of commits for Tue Nov 22 15:39:02 UTC 2011 2012-05-06 15:39:20,113 INFO [AtlassianEvent::0-BAM::EVENTS:pool-2-thread-13] [DashboardCacheListener] event: com.atlassian.bamboo.event.ChainCompletedEvent[source=com.atlassian.bamboo.chains.ChainExecutionManagerImpl@1d5ba63] plan=RAN119295352-MAIN1192953520 2012-05-06 15:39:20,198 INFO [AtlassianEvent::0-BAM::EVENTS:pool-2-thread-13] [DashboardCachingManagerImpl] Plan cache updated for 1 plans in 0:00:00.018 2012-05-06 15:39:20,204 INFO [AtlassianEvent::0-BAM::EVENTS:pool-2-thread-14] [DependencyChainListener] Dependant builds not checked since plan is not a master plan 2012-05-06 15:39:20,206 ERROR [AtlassianEvent::0-BAM::EVENTS:pool-2-thread-13] [NamedThreadFactory] Uncaught exception in thread AtlassianEvent::0-BAM::EVENTS:pool-2-thread-13 org.springframework.dao.ConcurrencyFailureException: Hibernate operation: Could not execute JDBC batch update; SQL []; Deadlock found when trying to get lock; try restarting transaction; nested exception is java.sql.BatchUpdateException: Deadlock found when trying to get lock; try restarting transaction Caused by: java.sql.BatchUpdateException: Deadlock found when trying to get lock; try restarting transaction com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1998) com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1443) com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:1723) net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:54) net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:128) net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2436) net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2391) net.sf.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:1819) net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:3650) net.sf.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:238) net.sf.hibernate.impl.CriteriaImpl.uniqueResult(CriteriaImpl.java:385) com.atlassian.bamboo.resultsummary.BuildResultsSummaryHibernateDao$29.doInHibernate(BuildResultsSummaryHibernateDao.java:1082) org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:370) org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:337) com.atlassian.bamboo.resultsummary.BuildResultsSummaryHibernateDao.findFirstResultAfter(BuildResultsSummaryHibernateDao.java:1078) sun.reflect.GeneratedMethodAccessor983.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) $Proxy41.findFirstResultAfter(Unknown Source) com.atlassian.bamboo.resultsummary.BuildResultsSummaryManagerImpl.findFirstResultAfter(BuildResultsSummaryManagerImpl.java:1120) sun.reflect.GeneratedMethodAccessor982.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) com.atlassian.bamboo.security.acegi.intercept.aopalliance.AuthorityOverrideMethodSecurityInterceptor.invoke(AuthorityOverrideMethodSecurityInterceptor.java:29) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) $Proxy43.findFirstResultAfter(Unknown Source) com.atlassian.bamboo.plan.PlanStatePersisterImpl.checkAndUpdateDeltaStatesOfFollowingBuild(PlanStatePersisterImpl.java:232) com.atlassian.bamboo.plan.PlanStatePersisterImpl.persistChainState(PlanStatePersisterImpl.java:172) sun.reflect.GeneratedMethodAccessor981.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) com.atlassian.bamboo.author.AuthorCreatorServiceInterceptor.invoke(AuthorCreatorServiceInterceptor.java:45) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) $Proxy55.persistChainState(Unknown Source) com.atlassian.bamboo.plan.PlanStatePersisterServiceImpl$3.run(PlanStatePersisterServiceImpl.java:62) com.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:333) com.atlassian.bamboo.plan.PlanStatePersisterServiceImpl.persistChainState(PlanStatePersisterServiceImpl.java:58) com.atlassian.bamboo.chains.ChainExecutionManagerImpl.finaliseChainStateIfChainExecutionHasCompleted(ChainExecutionManagerImpl.java:894) com.atlassian.bamboo.chains.ChainExecutionManagerImpl.access$400(ChainExecutionManagerImpl.java:88) com.atlassian.bamboo.chains.ChainExecutionManagerImpl$1.run(ChainExecutionManagerImpl.java:443) com.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:333) com.atlassian.bamboo.chains.ChainExecutionManagerImpl.execute(ChainExecutionManagerImpl.java:361) com.atlassian.bamboo.chains.ChainExecutionManagerImpl.access$1300(ChainExecutionManagerImpl.java:88) com.atlassian.bamboo.chains.ChainExecutionManagerImpl$2.run(ChainExecutionManagerImpl.java:491) com.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:333) com.atlassian.bamboo.chains.ChainExecutionManagerImpl.handleEvent(ChainExecutionManagerImpl.java:471) sun.reflect.GeneratedMethodAccessor688.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) org.springframework.orm.hibernate.HibernateInterceptor.invoke(HibernateInterceptor.java:117) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) $Proxy82.handleEvent(Unknown Source) sun.reflect.GeneratedMethodAccessor688.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) org.springframework.orm.hibernate.HibernateInterceptor.invoke(HibernateInterceptor.java:117) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) $Proxy83.handleEvent(Unknown Source) com.atlassian.event.legacy.LegacyListenerHandler$LegacyListenerInvoker.invoke(LegacyListenerHandler.java:55) com.atlassian.bamboo.event.spi.EventInvokerRunnable.run(EventInvokerRunnable.java:23) java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$2.run(NamedThreadFactory.java:50) java.lang.Thread.run(Thread.java:662) {code}
Story points: 5