Full thread dump Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode): "Thread-5" prio=10 tid=0x0829d920 nid=0xe runnable [0xee22b000..0xee22ba38] at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:113) at com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:160) at com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:188) - locked <0xefc16018> (a com.mysql.jdbc.util.ReadAheadInputStream) at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1862) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2256) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2756) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1536) at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1159) - locked <0xefc14618> (a java.lang.Object) at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:684) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1184) - locked <0xefc14618> (a java.lang.Object) - locked <0xef60ee70> (a com.mysql.jdbc.ServerPreparedStatement) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1101) - locked <0xef60ee70> (a com.mysql.jdbc.ServerPreparedStatement) at com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedStatement.java:606) - locked <0xefc14618> (a java.lang.Object) - locked <0xef60ee70> (a com.mysql.jdbc.ServerPreparedStatement) at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:1723) at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:58) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:195) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:230) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:296) at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:41) at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:978) at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:135) at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:113) at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1602) at com.fotolog.regression.MysqlDriverDeadlockTest$TestRunner.fillStatementCache(MysqlDriverDeadlockTest.java:147) at com.fotolog.regression.MysqlDriverDeadlockTest$TestRunner.batchUpdateRecords(MysqlDriverDeadlockTest.java:170) at com.fotolog.regression.MysqlDriverDeadlockTest$TestRunner.runOneTest(MysqlDriverDeadlockTest.java:126) at com.fotolog.regression.MysqlDriverDeadlockTest$TestRunner.run(MysqlDriverDeadlockTest.java:111) at java.lang.Thread.run(Thread.java:595) "Thread-4" prio=10 tid=0x082a0340 nid=0xd in Object.wait() [0xee26d000..0xee26ddb8] at java.lang.Object.wait(Native Method) - waiting on <0xefb93b78> (a com.mchange.v2.c3p0.stmt.GlobalMaxOnlyStatementCache) at java.lang.Object.wait(Object.java:474) at com.mchange.v2.c3p0.stmt.GooGooStatementCache.acquireStatement(GooGooStatementCache.java:470) at com.mchange.v2.c3p0.stmt.GooGooStatementCache.checkoutStatement(GooGooStatementCache.java:89) - locked <0xefb93b78> (a com.mchange.v2.c3p0.stmt.GlobalMaxOnlyStatementCache) at com.mchange.v2.c3p0.impl.NewPooledConnection.checkoutStatement(NewPooledConnection.java:168) - locked <0xefc315b8> (a com.mchange.v2.c3p0.impl.NewPooledConnection) at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:185) - locked <0xf0401248> (a com.mchange.v2.c3p0.impl.NewProxyConnection) at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:442) at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:368) at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:105) at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1561) at org.hibernate.loader.Loader.doQuery(Loader.java:661) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224) at org.hibernate.loader.Loader.doList(Loader.java:2145) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029) at org.hibernate.loader.Loader.list(Loader.java:2024) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375) at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:308) at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:153) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1129) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) at com.fotolog.regression.MysqlDriverDeadlockTest$TestRunner.fillStatementCache(MysqlDriverDeadlockTest.java:147) at com.fotolog.regression.MysqlDriverDeadlockTest$TestRunner.batchUpdateRecords(MysqlDriverDeadlockTest.java:170) at com.fotolog.regression.MysqlDriverDeadlockTest$TestRunner.runOneTest(MysqlDriverDeadlockTest.java:126) at com.fotolog.regression.MysqlDriverDeadlockTest$TestRunner.run(MysqlDriverDeadlockTest.java:111) at java.lang.Thread.run(Thread.java:595) "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2" daemon prio=10 tid=0x087731e0 nid=0xc in Object.wait() [0xee3f5000..0xee3f5c38] at java.lang.Object.wait(Native Method) - waiting on <0xefb93290> (a com.mchange.v2.async.ThreadPoolAsynchronousRunner) at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:355) - locked <0xefb93290> (a com.mchange.v2.async.ThreadPoolAsynchronousRunner) "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1" daemon prio=10 tid=0x08774b00 nid=0xb waiting for monitor entry [0xee437000..0xee437bb8] at com.mysql.jdbc.ServerPreparedStatement.serverPrepare(ServerPreparedStatement.java:1312) - waiting to lock <0xefc120a8> (a java.lang.Object) at com.mysql.jdbc.ServerPreparedStatement.(ServerPreparedStatement.java:316) at com.mysql.jdbc.Connection.prepareStatement(Connection.java:4377) - locked <0xefc0f838> (a com.mysql.jdbc.Connection) at com.mysql.jdbc.Connection.prepareStatement(Connection.java:4315) - locked <0xefc0f838> (a com.mysql.jdbc.Connection) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.mchange.v2.c3p0.stmt.GooGooStatementCache$3.run(GooGooStatementCache.java:445) at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:368) "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0" daemon prio=10 tid=0x08774020 nid=0xa waiting for monitor entry [0xee479000..0xee479b38] at com.mysql.jdbc.Connection.unregisterStatement(Connection.java:5380) - waiting to lock <0xefc0f838> (a com.mysql.jdbc.Connection) at com.mysql.jdbc.Statement.realClose(Statement.java:1863) at com.mysql.jdbc.PreparedStatement.realClose(PreparedStatement.java:1722) at com.mysql.jdbc.ServerPreparedStatement.realClose(ServerPreparedStatement.java:906) - locked <0xefc120a8> (a java.lang.Object) - locked <0xefc52d68> (a com.mysql.jdbc.ServerPreparedStatement) at com.mysql.jdbc.ServerPreparedStatement.close(ServerPreparedStatement.java:467) at com.mchange.v1.db.sql.StatementUtils.attemptClose(StatementUtils.java:41) at com.mchange.v2.c3p0.stmt.GooGooStatementCache$1.run(GooGooStatementCache.java:312) at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:368) "Timer-0" daemon prio=10 tid=0x08772a48 nid=0x9 in Object.wait() [0xee4bb000..0xee4bbab8] at java.lang.Object.wait(Native Method) - waiting on <0xefb93410> (a java.util.TaskQueue) at java.util.TimerThread.mainLoop(Timer.java:509) - locked <0xefb93410> (a java.util.TaskQueue) at java.util.TimerThread.run(Timer.java:462) "Low Memory Detector" daemon prio=10 tid=0x08147388 nid=0x7 runnable [0x00000000..0x00000000] "CompilerThread0" daemon prio=10 tid=0x081449e8 nid=0x6 waiting on condition [0x00000000..0xfb5fd618] "Signal Dispatcher" daemon prio=10 tid=0x08143c98 nid=0x5 waiting on condition [0x00000000..0x00000000] "Finalizer" daemon prio=10 tid=0x08138838 nid=0x4 in Object.wait() [0xfbecd000..0xfbecda38] at java.lang.Object.wait(Native Method) - waiting on <0xefb064e8> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116) - locked <0xefb064e8> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132) at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159) "Reference Handler" daemon prio=10 tid=0x08137c88 nid=0x3 in Object.wait() [0xfbf27000..0xfbf27db8] at java.lang.Object.wait(Native Method) - waiting on <0xefb06568> (a java.lang.ref.Reference$Lock) at java.lang.Object.wait(Object.java:474) at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116) - locked <0xefb06568> (a java.lang.ref.Reference$Lock) "main" prio=10 tid=0x08074cb0 nid=0x1 in Object.wait() [0x08046000..0x08046a2c] at java.lang.Object.wait(Native Method) - waiting on <0xf04011e8> (a java.lang.Thread) at java.lang.Thread.join(Thread.java:1095) - locked <0xf04011e8> (a java.lang.Thread) at java.lang.Thread.join(Thread.java:1148) at com.fotolog.regression.MysqlDriverDeadlockTest.startTestThreads(MysqlDriverDeadlockTest.java:91) at com.fotolog.regression.MysqlDriverDeadlockTest.main(MysqlDriverDeadlockTest.java:22) "VM Thread" prio=10 tid=0x08135410 nid=0x2 runnable "VM Periodic Task Thread" prio=10 tid=0x081484f8 nid=0x8 waiting on condition Found one Java-level deadlock: ============================= "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1": waiting to lock monitor 0x08145a44 (object 0xefc120a8, a java.lang.Object), which is held by "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0" "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0": waiting to lock monitor 0x08145a04 (object 0xefc0f838, a com.mysql.jdbc.Connection), which is held by "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1" Java stack information for the threads listed above: =================================================== "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1": at com.mysql.jdbc.ServerPreparedStatement.serverPrepare(ServerPreparedStatement.java:1312) - waiting to lock <0xefc120a8> (a java.lang.Object) at com.mysql.jdbc.ServerPreparedStatement.(ServerPreparedStatement.java:316) at com.mysql.jdbc.Connection.prepareStatement(Connection.java:4377) - locked <0xefc0f838> (a com.mysql.jdbc.Connection) at com.mysql.jdbc.Connection.prepareStatement(Connection.java:4315) - locked <0xefc0f838> (a com.mysql.jdbc.Connection) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.mchange.v2.c3p0.stmt.GooGooStatementCache$3.run(GooGooStatementCache.java:445) at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:368) "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0": at com.mysql.jdbc.Connection.unregisterStatement(Connection.java:5380) - waiting to lock <0xefc0f838> (a com.mysql.jdbc.Connection) at com.mysql.jdbc.Statement.realClose(Statement.java:1863) at com.mysql.jdbc.PreparedStatement.realClose(PreparedStatement.java:1722) at com.mysql.jdbc.ServerPreparedStatement.realClose(ServerPreparedStatement.java:906) - locked <0xefc120a8> (a java.lang.Object) - locked <0xefc52d68> (a com.mysql.jdbc.ServerPreparedStatement) at com.mysql.jdbc.ServerPreparedStatement.close(ServerPreparedStatement.java:467) at com.mchange.v1.db.sql.StatementUtils.attemptClose(StatementUtils.java:41) at com.mchange.v2.c3p0.stmt.GooGooStatementCache$1.run(GooGooStatementCache.java:312) at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:368) Found 1 deadlock.