Deadlock exception on permission addition/removal/unset #162


  • New
  • Defect
Open
Assigned to _ForgeUser1494830
  • _ForgeUser9883694 created this issue Aug 15, 2014

    Exception:

    [16:46:46] [pool-4-thread-1/ERROR]: Error executing transaction
    javax.persistence.PersistenceException: ERROR executing DML bindLog[] error[Deadlock found when trying to get lock; try restarting transaction]
            at com.avaje.ebeaninternal.server.persist.dml.DmlBeanPersister.execute(DmlBeanPersister.java:116) ~[spigot.jar:git-Spigot-1553]
            at com.avaje.ebeaninternal.server.persist.dml.DmlBeanPersister.delete(DmlBeanPersister.java:67) ~[spigot.jar:git-Spigot-1553]
            at com.avaje.ebeaninternal.server.persist.DefaultPersistExecute.executeDeleteBean(DefaultPersistExecute.java:128) ~[spigot.jar:git-Spigot-1553]
            at com.avaje.ebeaninternal.server.core.PersistRequestBean.executeNow(PersistRequestBean.java:508) ~[spigot.jar:git-Spigot-1553]
            at com.avaje.ebeaninternal.server.core.PersistRequestBean.executeOrQueue(PersistRequestBean.java:530) ~[spigot.jar:git-Spigot-1553]
            at com.avaje.ebeaninternal.server.persist.DefaultPersister.delete(DefaultPersister.java:661) ~[spigot.jar:git-Spigot-1553]
            at com.avaje.ebeaninternal.server.persist.DefaultPersister.delete(DefaultPersister.java:471) ~[spigot.jar:git-Spigot-1553]
            at com.avaje.ebeaninternal.server.core.DefaultServer.delete(DefaultServer.java:1886) ~[spigot.jar:git-Spigot-1553]
            at com.avaje.ebeaninternal.server.core.DefaultServer.delete(DefaultServer.java:1876) ~[spigot.jar:git-Spigot-1553]
            at org.tyrannyofheaven.bukkit.zPermissions.dao.AvajePermissionDao$6.run(AvajePermissionDao.java:258) ~[zPermissions-1.3-SNAPSHOT-b556.jar:1.3-SNAPSHOT]
            at org.tyrannyofheaven.bukkit.zPermissions.util.transaction.TransactionRunnable.doInTransaction(TransactionRunnable.java:79) ~[zPermissions-1.3-SNAPSHOT-b556.jar:1.3-SNAPSHOT]
            at org.tyrannyofheaven.bukkit.zPermissions.util.transaction.RetryingAvajeTransactionStrategy.execute(RetryingAvajeTransactionStrategy.java:107) ~[zPermissions-1.3-SNAPSHOT-b556.jar:1.3-SNAPSHOT]
            at org.tyrannyofheaven.bukkit.zPermissions.util.transaction.TransactionRunnable.run(TransactionRunnable.java:66) [zPermissions-1.3-SNAPSHOT-b556.jar:1.3-SNAPSHOT]
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_11]
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_11]
            at java.lang.Thread.run(Thread.java:745) [?:1.8.0_11]
    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) ~[?:1.8.0_11]
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_11]
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_11]
            at java.lang.reflect.Constructor.newInstance(Constructor.java:408) ~[?:1.8.0_11]
            at com.mysql.jdbc.Util.handleNewInstance(Util.java:407) ~[spigot.jar:git-Spigot-1553]
            at com.mysql.jdbc.Util.getInstance(Util.java:382) ~[spigot.jar:git-Spigot-1553]
            at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1064) ~[spigot.jar:git-Spigot-1553]
            at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3593) ~[spigot.jar:git-Spigot-1553]
            at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3525) ~[spigot.jar:git-Spigot-1553]
            at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1986) ~[spigot.jar:git-Spigot-1553]
            at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2140) ~[spigot.jar:git-Spigot-1553]
            at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2626) ~[spigot.jar:git-Spigot-1553]
            at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2111) ~[spigot.jar:git-Spigot-1553]
            at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2407) ~[spigot.jar:git-Spigot-1553]
            at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2325) ~[spigot.jar:git-Spigot-1553]
            at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2310) ~[spigot.jar:git-Spigot-1553]
            at com.avaje.ebeaninternal.server.lib.sql.ExtendedPreparedStatement.executeUpdate(ExtendedPreparedStatement.java:164) ~[spigot.jar:git-Spigot-1553]
            at com.avaje.ebeaninternal.server.type.DataBind.executeUpdate(DataBind.java:74) ~[spigot.jar:git-Spigot-1553]
            at com.avaje.ebeaninternal.server.persist.dml.DeleteHandler.execute(DeleteHandler.java:81) ~[spigot.jar:git-Spigot-1553]
            at com.avaje.ebeaninternal.server.persist.dml.DmlBeanPersister.execute(DmlBeanPersister.java:105) ~[spigot.jar:git-Spigot-1553]
            ... 15 more
    

    Command executed:

    permissions group default unset essentials.afk
    

    Version:

    #556

  • _ForgeUser9883694 added the tags New Defect Aug 15, 2014
  • _ForgeUser9883694 edited description Aug 15, 2014
  • _ForgeUser1494830 posted a comment Aug 15, 2014

    I'm curious what your database isolation level is set to (either in bukkit.yml or config.yml, wherever you normally configure your database).

    Also, how many server instances are writers?

    Probably somewhat related: http://dev.bukkit.org/bukkit-plugins/zpermissions/tickets/146-problem-with-zpermissions-deadlock/

    Although we never narrowed down what exactly solved it. But I think changing the isolation level should be the first thing tried, since SERIALIZABLE is way too strict, especially in a single-writer set up.


To post a comment, please login or register a new account.