DEADLOCK情况 - SQL / Hibernate / Java如何解决?

时间:2015-06-12 15:40:22

标签: java multithreading hibernate psql

[12-Jun-2015 12:40:36][Timer-0] WARN  com.mchange.v2.async.ThreadPoolAsynchronousRunner - com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@6a93dd24 -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
[12-Jun-2015 12:40:39][Timer-0] WARN  com.mchange.v2.async.ThreadPoolAsynchronousRunner - com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@6a93dd24 -- APPARENT DEADLOCK!!! Complete Status:
        Managed Threads: 3
        Active Threads: 3
        Active Tasks:
                com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@4da39158 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0)
                com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@2d9b503a (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2)
                com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@2fb0273a (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1)
        Pending Tasks:
                com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@55df694b
                com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@3e79e6f8
                com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@352ac3d3
                com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@a9e6cea
                com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@27007c18
                com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@10d31fa9
                com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@14c398e0
                com.mchange.v2.resourcepool.BasicResourcePool$1RefurbishCheckinResourceTask@3569a4c6
                com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@2ac0de8f
                com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@5c539436
                com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@73279494
                com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@2b8bbb9c
                com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@62ca1519
                com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@412f4efa
                com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@8ea2085
Pool thread stack traces:
        Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0,5,main]
                com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask.run(BasicResourcePool.java:2023)
                com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
        Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2,5,main]
                com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:560)
        Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1,5,main]
                com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:560)


[12-Jun-2015 12:40:45][scheduler-3] INFO  com.ssl.htms.tasks.TaskCheckDatabaseConnection - Database connection pool error, count=1 : This connection has been closed.

1 个答案:

答案 0 :(得分:0)

这是一条警告消息,而不是实际的死锁。请查看以下主题以获取更多详细信息:

C3P0 apparent deadlock when the threads are all empty?

以及

C3p0 APPARENT DEADLOCK exception