APPARENT DEADLOCK!!! Creating emergency threads

  • 7017381
  • 17-Mar-2016
  • 06-Apr-2016

Environment

Novell Service Desk 7.1

Situation

Network fails or server reboots unexpectedly resulting in errors in Livetime.log similar to this;

[2016-03-15 08:15:19,931] WARN226956[Timer-0] (ThreadPoolAsynchronousRunner.java:698) - com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@490c7448 -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!

[2016-03-15 08:15:19,950] WARN226975[Timer-0] (ThreadPoolAsynchronousRunner.java:714) - com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@490c7448 -- APPARENT DEADLOCK!!! Complete Status:             Managed Threads: 3
                Active Threads: 3
                Active Tasks:
                                com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@1dd8154e (C3P0PooledConnectionPoolManager-Helper Thread-#1)
com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@555ec330
(C3P0PooledConnectionPoolManager-Helper Thread-#2)
com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@4060b019 (C3P0PooledConnectionPoolManager-Helper Thread-#0)
    Pending Tasks:
       com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquiretask@bc95a54
       com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquiretask@504946d7
       com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquiretask@7ac9f66e
       com.mchange.v2.resourcepool.BasicResourcePool$RefurbishCheckinResourceTask@6151eebc
       com.mchange.v2.resourcepool.BasicResourcePool$RefurbishCheckinResourceTask@4a10aa8e
       com.mchange.v2.resourcepool.BasicResourcePool$RefurbishCheckinResourceTask@c2d769f


Resolution

Working as designed
The threads were blocked on socket read and simply hung forever, neither succeeding nor failing with an Exception.

That's what happens in a c3p0 APPARENT DEADLOCK! -- the pool recovers by abandoning the stuck Threads.
The application still recovers, although potentially after a longer latency is observed as if the socket reads had thrown a prompt Exception.

Cause

External interruption occurred - Network interruption or server unexpectedly restarted.

C3P0 determines "apparent deadlocks" when a connection is acquired but not returned to the pool within the deadlock detection timeout.

Feedback service temporarily unavailable. For content questions or problems, please contact Support.