c3p0错误 APPARENT DEADLOCK!!! Creating emergency thr

JackChu 发布于 2010/09/17 09:21
阅读 24K+
收藏 3

2010-09-17 06:16:19,180 com.mchange.v2.async.ThreadPoolAsynchronousRunner -138263516 [Timer-0] WARN  com.mchange.v2.async.ThreadPoolAsynchronousRunner  - com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@46599cfb -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
 2010-09-17 06:16:31,473 com.mchange.v2.async.ThreadPoolAsynchronousRunner -138275809 [Timer-0] WARN  com.mchange.v2.async.ThreadPoolAsynchronousRunner  - com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@46599cfb -- APPARENT DEADLOCK!!! Complete Status:
    Managed Threads: 10
    Active Threads: 4
    Active Tasks:
        com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@6a7d824a (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1)
        com.mchange.v2.resourcepool.BasicResourcePool$1RefurbishCheckinResourceTask@55f4fee4 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#6)
        com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@478a56d2 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#7)
        com.mchange.v2.c3p0.stmt.GooGooStatementCache$1StmtAcquireTask@4b4a19af (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#3)
    Pending Tasks:
        com.mchange.v2.resourcepool.BasicResourcePool$1RefurbishCheckinResourceTask@6ddc56c6
Pool thread stack traces:
    Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0,5,main]
        java.lang.Object.wait(Native Method)
        com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:534)
    Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1,5,main]
        com.mchange.v2.resourcepool.BasicResourcePool.setLastAcquisitionFailure(BasicResourcePool.java:194)
        com.mchange.v2.resourcepool.BasicResourcePool.access$1000(BasicResourcePool.java:32)
        com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1834)
        com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
    Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#9,5,main]
        java.lang.Object.wait(Native Method)
        com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:534)
    Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#8,5,main]
        java.lang.Object.wait(Native Method)
        com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:534)
    Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#6,5,main]
        com.mchange.v2.c3p0.stmt.GooGooStatementCache.checkinAll(GooGooStatementCache.java:281)
        com.mchange.v2.c3p0.impl.NewPooledConnection.checkinAllCachedStatements(NewPooledConnection.java:664)
        com.mchange.v2.c3p0.impl.NewPooledConnection.markClosedProxyConnection(NewPooledConnection.java:347)
        com.mchange.v2.c3p0.impl.NewProxyConnection.close(NewProxyConnection.java:1246)
        com.mchange.v1.db.sql.ConnectionUtils.attemptClose(ConnectionUtils.java:41)
        com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.refurbishResourceOnCheckin(C3P0PooledConnectionPool.java:290)
        com.mchange.v2.resourcepool.BasicResourcePool.attemptRefurbishResourceOnCheckin(BasicResourcePool.java:1606)
        com.mchange.v2.resourcepool.BasicResourcePool.access$200(BasicResourcePool.java:32)
        com.mchange.v2.resourcepool.BasicResourcePool$1RefurbishCheckinResourceTask.run(BasicResourcePool.java:1228)
        com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
    Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#4,5,main]
        java.lang.Object.wait(Native Method)

---------------

2010-09-17 06:16:39,359 com.mchange.v2.c3p0.impl.NewPooledConnection -138283695 [TP-Processor122] WARN  com.mchange.v2.c3p0.impl.NewPooledConnection  - [c3p0] A PooledConnection that has already signalled a Connection error is still in use!
 2010-09-17 06:16:39,359 com.mchange.v2.c3p0.impl.NewPooledConnection -138283695 [TP-Processor122] WARN  com.mchange.v2.c3p0.impl.NewPooledConnection  - [c3p0] Another error has occurred [ com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.Connection was implicitly closed by the driver. ] which will not be reported to listeners!
 com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.Connection was implicitly closed by the driver.
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
    at com.mysql.jdbc.Util.getInstance(Util.java:381)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:984)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
    at com.mysql.jdbc.ConnectionImpl.throwConnectionClosedException(ConnectionImpl.java:1155)
    at com.mysql.jdbc.ConnectionImpl.getMutex(ConnectionImpl.java:3112)
    at com.mysql.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:4982)
    at com.mchange.v2.c3p0.impl.NewProxyConnection.setAutoCommit(NewProxyConnection.java:881)
    at org.hibernate.transaction.JDBCTransaction.toggleAutoCommit(JDBCTransaction.java:228)
    at org.hibernate.transaction.JDBCTransaction.rollbackAndResetAutoCommit(JDBCTransaction.java:220)
    at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:196)
    at org.springframework.orm.hibernate3.HibernateTransactionManager.doRollback(HibernateTransactionManager.java:676)
    at org.springframework.transaction.support.AbstractPlatformTransactionManager.processRollback(AbstractPlatformTransactionManager.java:845)
    at org.springframework.transaction.support.AbstractPlatformTransactionManager.rollback(AbstractPlatformTransactionManager.java:822)
    at org.springframework.transaction.interceptor.TransactionAspectSupport.completeTransactionAfterThrowing(TransactionAspectSupport.java:430)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:112)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)

大伙有没有遇到过啊?这个是什么原因啊

加载中
0
programtic
programtic

刚刚我也遇到这个错误了。

0
programtic
programtic

不知楼主解决了没?如何解决的啊?

0
顿哥哥

这是c3p0的一个bug。

把max_statements设置为0即可以解决。
c3p0在同时关闭statement和connection的时候,或者关闭他们之间的时间很短的时候,有时候connection并没有被关闭,因为有些preparedstatement还在被cached住。这是c3p0的作者自己说的。
http://forum.hibernate.org/viewtopic.php?t=947246&highlight=apparent+deadlock+c3p0
mj4738
mj4738
回复 @微妙率直 : 不记得了,貌似没解决,然后放弃了。你试着我发的帖子所列出的办法逐个试试
勇哥0_0
勇哥0_0
回复 @爱国者 : 请问这位同学是如何解决这个问题呢?
mj4738
mj4738
max_statements设为0不行的
0
林毅文
林毅文
刚刚遇到这个问题。
0
leo_soul
leo_soul

我也遇到这问题了,baidu了一下没发现什么解决方法,大家都在问这是什么情况。

http://www.blogjava.net/liuyimx/articles/296849.html

 

这篇文章里的跟我遇到的情况相同。看他的解决方法,以及下边一个人的回复。不过我还是没懂究竟是怎么搞的。怎样才能解决。我们的服务器天天都报这个警告。求解决,以及原理。

0
编号5173
编号5173

我也遇到这个问题喽,可以共享一下解决办法不?@红薯

0
D
Darren中
c3p0 报错APPARENT DEADLOCK!!! 解决方案请看:
http://www.darrenzhong.com/?p=1427
返回顶部
顶部