org.hibernate.exception.LockAcquisitionException: could not execute statement

Atlassian JIRA | Alexey Efimov | 3 years ago
  1. 0

    {code} 2013-11-21 21:57:20,657 DEBUG [rescope-details:thread-1] com.atlassian.stash.scm.BaseCommand Executed /usr/bin/git rev-list --format=%H%x02%h%x02%P%x02%p%x02%aN%x02%aE%x02%at%n%B%n%x03 --ignore-missing --stdin -- 2013-11-21 21:57:21,240 WARN [rescope-details:thread-1] o.h.e.jdbc.spi.SqlExceptionHelper SQL Error: 1213, SQLState: 40001 2013-11-21 21:57:21,241 ERROR [rescope-details:thread-1] o.h.e.jdbc.spi.SqlExceptionHelper Deadlock found when trying to get lock; try restarting transaction 2013-11-21 21:57:21,256 WARN [rescope-details:thread-1] c.a.s.i.p.r.DefaultRescopeProcessor 15173: Could not delete empty rescope with ID 296604 org.hibernate.exception.LockAcquisitionException: could not execute statement at org.hibernate.dialect.MySQLDialect$1.convert(MySQLDialect.java:411) ~[hibernate-core-4.2.5.Final.jar:4.2.5.Final] at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49) ~[hibernate-core-4.2.5.Final.jar:4.2.5.Final] at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125) ~[hibernate-core-4.2.5.Final.jar:4.2.5.Final] at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110) ~[hibernate-core-4.2.5.Final.jar:4.2.5.Final] at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:136) ~[hibernate-core-4.2.5.Final.jar:4.2.5.Final] at org.hibernate.hql.spi.TableBasedDeleteHandlerImpl.execute(TableBasedDeleteHandlerImpl.java:163) ~[hibernate-core-4.2.5.Final.jar:4.2.5.Final] at org.hibernate.hql.internal.ast.exec.MultiTableDeleteExecutor.execute(MultiTableDeleteExecutor.java:63) ~[hibernate-core-4.2.5.Final.jar:4.2.5.Final] at org.hibernate.hql.internal.ast.QueryTranslatorImpl.executeUpdate(QueryTranslatorImpl.java:414) ~[hibernate-core-4.2.5.Final.jar:4.2.5.Final] at org.hibernate.engine.query.spi.HQLQueryPlan.performExecuteUpdate(HQLQueryPlan.java:282) ~[hibernate-core-4.2.5.Final.jar:4.2.5.Final] at org.hibernate.internal.SessionImpl.executeUpdate(SessionImpl.java:1290) ~[hibernate-core-4.2.5.Final.jar:4.2.5.Final] at org.hibernate.internal.QueryImpl.executeUpdate(QueryImpl.java:116) ~[hibernate-core-4.2.5.Final.jar:4.2.5.Final] at com.atlassian.stash.internal.AbstractHibernateDao.deleteById(AbstractHibernateDao.java:53) ~[stash-dao-impl-2.9.1.jar:na] at com.atlassian.stash.internal.AbstractHibernateDao.deleteById(AbstractHibernateDao.java:22) ~[stash-dao-impl-2.9.1.jar:na] at com.sun.proxy.$Proxy155.deleteById(Unknown Source) ~[na:na] at com.atlassian.stash.internal.pull.rescope.DefaultRescopeProcessor$3.doInTransactionWithoutResult(DefaultRescopeProcessor.java:139) ~[stash-service-impl-2.9.1.jar:na] at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33) ~[spring-tx-3.2.4.RELEASE.jar:3.2.4.RELEASE] at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:131) ~[spring-tx-3.2.4.RELEASE.jar:3.2.4.RELEASE] at com.atlassian.stash.internal.pull.rescope.DefaultRescopeProcessor.deleteActivity(DefaultRescopeProcessor.java:130) [stash-service-impl-2.9.1.jar:na] at com.atlassian.stash.internal.pull.rescope.DefaultRescopeProcessor.processAll(DefaultRescopeProcessor.java:100) [stash-service-impl-2.9.1.jar:na] at com.atlassian.stash.internal.pull.rescope.DefaultRescopeProcessor.process(DefaultRescopeProcessor.java:77) [stash-service-impl-2.9.1.jar:na] at com.atlassian.stash.internal.pull.rescope.DefaultRescopeProcessor$RescopeCalculator.run(DefaultRescopeProcessor.java:219) [stash-service-impl-2.9.1.jar:na] at com.atlassian.stash.internal.concurrent.StateTransferringExecutor$StateTransferringRunnable.run(StateTransferringExecutor.java:69) [stash-platform-2.9.1.jar:na] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439) [na:1.6.0_45] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [na:1.6.0_45] at java.util.concurrent.FutureTask.run(FutureTask.java:138) [na:1.6.0_45] at java.lang.Thread.run(Thread.java:662) [na:1.6.0_45] ... 11 frames trimmed Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.6.0_45] at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) ~[mysql-connector-java-5.1.24-bin.jar:na] at com.mysql.jdbc.Util.getInstance(Util.java:386) ~[mysql-connector-java-5.1.24-bin.jar:na] at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1066) ~[mysql-connector-java-5.1.24-bin.jar:na] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4120) ~[mysql-connector-java-5.1.24-bin.jar:na] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4052) ~[mysql-connector-java-5.1.24-bin.jar:na] at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2503) ~[mysql-connector-java-5.1.24-bin.jar:na] at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2664) ~[mysql-connector-java-5.1.24-bin.jar:na] {code}

    Atlassian JIRA | 3 years ago | Alexey Efimov
    org.hibernate.exception.LockAcquisitionException: could not execute statement
  2. 0

    {code} 2013-11-21 21:57:20,657 DEBUG [rescope-details:thread-1] com.atlassian.stash.scm.BaseCommand Executed /usr/bin/git rev-list --format=%H%x02%h%x02%P%x02%p%x02%aN%x02%aE%x02%at%n%B%n%x03 --ignore-missing --stdin -- 2013-11-21 21:57:21,240 WARN [rescope-details:thread-1] o.h.e.jdbc.spi.SqlExceptionHelper SQL Error: 1213, SQLState: 40001 2013-11-21 21:57:21,241 ERROR [rescope-details:thread-1] o.h.e.jdbc.spi.SqlExceptionHelper Deadlock found when trying to get lock; try restarting transaction 2013-11-21 21:57:21,256 WARN [rescope-details:thread-1] c.a.s.i.p.r.DefaultRescopeProcessor 15173: Could not delete empty rescope with ID 296604 org.hibernate.exception.LockAcquisitionException: could not execute statement at org.hibernate.dialect.MySQLDialect$1.convert(MySQLDialect.java:411) ~[hibernate-core-4.2.5.Final.jar:4.2.5.Final] at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49) ~[hibernate-core-4.2.5.Final.jar:4.2.5.Final] at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125) ~[hibernate-core-4.2.5.Final.jar:4.2.5.Final] at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110) ~[hibernate-core-4.2.5.Final.jar:4.2.5.Final] at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:136) ~[hibernate-core-4.2.5.Final.jar:4.2.5.Final] at org.hibernate.hql.spi.TableBasedDeleteHandlerImpl.execute(TableBasedDeleteHandlerImpl.java:163) ~[hibernate-core-4.2.5.Final.jar:4.2.5.Final] at org.hibernate.hql.internal.ast.exec.MultiTableDeleteExecutor.execute(MultiTableDeleteExecutor.java:63) ~[hibernate-core-4.2.5.Final.jar:4.2.5.Final] at org.hibernate.hql.internal.ast.QueryTranslatorImpl.executeUpdate(QueryTranslatorImpl.java:414) ~[hibernate-core-4.2.5.Final.jar:4.2.5.Final] at org.hibernate.engine.query.spi.HQLQueryPlan.performExecuteUpdate(HQLQueryPlan.java:282) ~[hibernate-core-4.2.5.Final.jar:4.2.5.Final] at org.hibernate.internal.SessionImpl.executeUpdate(SessionImpl.java:1290) ~[hibernate-core-4.2.5.Final.jar:4.2.5.Final] at org.hibernate.internal.QueryImpl.executeUpdate(QueryImpl.java:116) ~[hibernate-core-4.2.5.Final.jar:4.2.5.Final] at com.atlassian.stash.internal.AbstractHibernateDao.deleteById(AbstractHibernateDao.java:53) ~[stash-dao-impl-2.9.1.jar:na] at com.atlassian.stash.internal.AbstractHibernateDao.deleteById(AbstractHibernateDao.java:22) ~[stash-dao-impl-2.9.1.jar:na] at com.sun.proxy.$Proxy155.deleteById(Unknown Source) ~[na:na] at com.atlassian.stash.internal.pull.rescope.DefaultRescopeProcessor$3.doInTransactionWithoutResult(DefaultRescopeProcessor.java:139) ~[stash-service-impl-2.9.1.jar:na] at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33) ~[spring-tx-3.2.4.RELEASE.jar:3.2.4.RELEASE] at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:131) ~[spring-tx-3.2.4.RELEASE.jar:3.2.4.RELEASE] at com.atlassian.stash.internal.pull.rescope.DefaultRescopeProcessor.deleteActivity(DefaultRescopeProcessor.java:130) [stash-service-impl-2.9.1.jar:na] at com.atlassian.stash.internal.pull.rescope.DefaultRescopeProcessor.processAll(DefaultRescopeProcessor.java:100) [stash-service-impl-2.9.1.jar:na] at com.atlassian.stash.internal.pull.rescope.DefaultRescopeProcessor.process(DefaultRescopeProcessor.java:77) [stash-service-impl-2.9.1.jar:na] at com.atlassian.stash.internal.pull.rescope.DefaultRescopeProcessor$RescopeCalculator.run(DefaultRescopeProcessor.java:219) [stash-service-impl-2.9.1.jar:na] at com.atlassian.stash.internal.concurrent.StateTransferringExecutor$StateTransferringRunnable.run(StateTransferringExecutor.java:69) [stash-platform-2.9.1.jar:na] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439) [na:1.6.0_45] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [na:1.6.0_45] at java.util.concurrent.FutureTask.run(FutureTask.java:138) [na:1.6.0_45] at java.lang.Thread.run(Thread.java:662) [na:1.6.0_45] ... 11 frames trimmed Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.6.0_45] at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) ~[mysql-connector-java-5.1.24-bin.jar:na] at com.mysql.jdbc.Util.getInstance(Util.java:386) ~[mysql-connector-java-5.1.24-bin.jar:na] at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1066) ~[mysql-connector-java-5.1.24-bin.jar:na] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4120) ~[mysql-connector-java-5.1.24-bin.jar:na] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4052) ~[mysql-connector-java-5.1.24-bin.jar:na] at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2503) ~[mysql-connector-java-5.1.24-bin.jar:na] at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2664) ~[mysql-connector-java-5.1.24-bin.jar:na] {code}

    Atlassian JIRA | 3 years ago | Alexey Efimov
    org.hibernate.exception.LockAcquisitionException: could not execute statement
  3. 0

    [BSERV-4125] Deadlock found when trying to get lock; try restarting transaction - Atlassian JIRA

    atlassian.com | 11 months ago
    org.hibernate.exception.LockAcquisitionException: could not execute statement
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [STASH-4517] Empty activity deletion deadlocks on MySQL - Atlassian JIRA

    atlassian.com | 1 year ago
    org.hibernate.exception.LockAcquisitionException: could not execute statement
  6. 0

    [STASH-4517] Empty activity deletion deadlocks on MySQL - Atlassian JIRA

    atlassian.com | 1 year ago
    org.hibernate.exception.LockAcquisitionException: could not execute statement
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. org.hibernate.exception.LockAcquisitionException

    could not execute statement

    at org.hibernate.dialect.MySQLDialect$1.convert()
  2. Hibernate
    QueryImpl.executeUpdate
    1. org.hibernate.dialect.MySQLDialect$1.convert(MySQLDialect.java:411)[hibernate-core-4.2.5.Final.jar:4.2.5.Final]
    2. org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)[hibernate-core-4.2.5.Final.jar:4.2.5.Final]
    3. org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)[hibernate-core-4.2.5.Final.jar:4.2.5.Final]
    4. org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110)[hibernate-core-4.2.5.Final.jar:4.2.5.Final]
    5. org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:136)[hibernate-core-4.2.5.Final.jar:4.2.5.Final]
    6. org.hibernate.hql.spi.TableBasedDeleteHandlerImpl.execute(TableBasedDeleteHandlerImpl.java:163)[hibernate-core-4.2.5.Final.jar:4.2.5.Final]
    7. org.hibernate.hql.internal.ast.exec.MultiTableDeleteExecutor.execute(MultiTableDeleteExecutor.java:63)[hibernate-core-4.2.5.Final.jar:4.2.5.Final]
    8. org.hibernate.hql.internal.ast.QueryTranslatorImpl.executeUpdate(QueryTranslatorImpl.java:414)[hibernate-core-4.2.5.Final.jar:4.2.5.Final]
    9. org.hibernate.engine.query.spi.HQLQueryPlan.performExecuteUpdate(HQLQueryPlan.java:282)[hibernate-core-4.2.5.Final.jar:4.2.5.Final]
    10. org.hibernate.internal.SessionImpl.executeUpdate(SessionImpl.java:1290)[hibernate-core-4.2.5.Final.jar:4.2.5.Final]
    11. org.hibernate.internal.QueryImpl.executeUpdate(QueryImpl.java:116)[hibernate-core-4.2.5.Final.jar:4.2.5.Final]
    11 frames
  3. com.atlassian.stash
    AbstractHibernateDao.deleteById
    1. com.atlassian.stash.internal.AbstractHibernateDao.deleteById(AbstractHibernateDao.java:53)[stash-dao-impl-2.9.1.jar:na]
    2. com.atlassian.stash.internal.AbstractHibernateDao.deleteById(AbstractHibernateDao.java:22)[stash-dao-impl-2.9.1.jar:na]
    2 frames
  4. com.sun.proxy
    $Proxy155.deleteById
    1. com.sun.proxy.$Proxy155.deleteById(Unknown Source)[na:na]
    1 frame
  5. com.atlassian.stash
    DefaultRescopeProcessor$3.doInTransactionWithoutResult
    1. com.atlassian.stash.internal.pull.rescope.DefaultRescopeProcessor$3.doInTransactionWithoutResult(DefaultRescopeProcessor.java:139)[stash-service-impl-2.9.1.jar:na]
    1 frame
  6. Spring Tx
    TransactionTemplate.execute
    1. org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33)[spring-tx-3.2.4.RELEASE.jar:3.2.4.RELEASE]
    2. org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:131)[spring-tx-3.2.4.RELEASE.jar:3.2.4.RELEASE]
    2 frames
  7. com.atlassian.stash
    StateTransferringExecutor$StateTransferringRunnable.run
    1. com.atlassian.stash.internal.pull.rescope.DefaultRescopeProcessor.deleteActivity(DefaultRescopeProcessor.java:130)[stash-service-impl-2.9.1.jar:na]
    2. com.atlassian.stash.internal.pull.rescope.DefaultRescopeProcessor.processAll(DefaultRescopeProcessor.java:100)[stash-service-impl-2.9.1.jar:na]
    3. com.atlassian.stash.internal.pull.rescope.DefaultRescopeProcessor.process(DefaultRescopeProcessor.java:77)[stash-service-impl-2.9.1.jar:na]
    4. com.atlassian.stash.internal.pull.rescope.DefaultRescopeProcessor$RescopeCalculator.run(DefaultRescopeProcessor.java:219)[stash-service-impl-2.9.1.jar:na]
    5. com.atlassian.stash.internal.concurrent.StateTransferringExecutor$StateTransferringRunnable.run(StateTransferringExecutor.java:69)[stash-platform-2.9.1.jar:na]
    5 frames
  8. Java RT
    Thread.run
    1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)[na:1.6.0_45]
    2. java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[na:1.6.0_45]
    3. java.util.concurrent.FutureTask.run(FutureTask.java:138)[na:1.6.0_45]
    4. java.lang.Thread.run(Thread.java:662)[na:1.6.0_45]
    4 frames