APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks

Description

In my local, i run idempiere zk7 from eclipse with default config.
i use my database (1 year). run report "Accounting Fact Daily" without any filter because it has big data.
report is un-success with error message:
[WARNING] com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@3c3e4d50 – APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
by google i get:http://www.mchange.com/projects/c3p0/#other_ds_configuration

two issue with idempiere:
+ by code at DB_PostgreSQL.getDataSource() i see only some cpds.setXXX is call
NumHelperThreads and cpds.setMaxAdministrativeTaskTime not in call list.
i think all properties should configuration by server.default.properties
(by hardcord to increase value of this properties, my report is success)

+ because reason of issue is by big data,
increase NumHelperThreads and cpds.setMaxAdministrativeTaskTime not a pretty solution
it's nice to do folow suggest use interrupt at http://www.mchange.com/projects/c3p0/#maxAdministrativeTaskTime

i believe it's also at 2.1

Environment

None

Activity

Carlos Ruiz 
July 27, 2018 at 5:10 PM

is this still reproducible? please reopen if there are steps to reproduce

Hiep Lq 
January 29, 2015 at 2:19 AM

a bit hard than zk7 but i can produce this issue in 2.1.
i encounter out of memory soon than zk7 i must run it again with more memory. below is error log,

INFO: Next run: 2015-01-29 09:15:01.071 sleep 900000
Jan 29, 2015 9:00:17 AM org.compiere.util.Trx commit
INFO: **** POSaveR_RequestProcesso_628090a7-8235-4ca4-8bc1-e0381469ea38
[WARNING] com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@2a576eba – APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
[WARNING] com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@2a576eba – APPARENT DEADLOCK!!! Complete Status:
Managed Threads: 3
Active Threads: 3
Active Tasks:
com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@3fdb58ca
on thread: C3P0PooledConnectionPoolManager[identityToken->z8kfsx97e8wa1913fr5o2|31c640f, dataSourceName->iDempiereDS]HelperThread#1
com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@59a25686
on thread: C3P0PooledConnectionPoolManager[identityToken->z8kfsx97e8wa1913fr5o2|31c640f, dataSourceName->iDempiereDS]HelperThread#0
com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@30dea563
on thread: C3P0PooledConnectionPoolManager[identityToken->z8kfsx97e8wa1913fr5o2|31c640f, dataSourceName->iDempiereDS]HelperThread#2
Pending Tasks:
com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@6a41bf9c
com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@28ad144
com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@746046e
com.mchange.v2.resourcepool.BasicResourcePool$AsyncTestIdleResourceTask@4ad40484
Pool thread stack traces:
Thread[C3P0PooledConnectionPoolManager[identityToken->z8kfsx97e8wa1913fr5o2|31c640f, dataSourceName->iDempiereDS]HelperThread#0,5,main]
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:662)
Thread[C3P0PooledConnectionPoolManager[identityToken->z8kfsx97e8wa1913fr5o2|31c640f, dataSourceName->iDempiereDS]HelperThread#1,5,main]
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:662)
Thread[C3P0PooledConnectionPoolManager[identityToken->z8kfsx97e8wa1913fr5o2|31c640f, dataSourceName->iDempiereDS]HelperThread#2,5,main]
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:662)

Carlos Ruiz 
January 28, 2015 at 3:55 PM

sometimes I use to create a view for testing purposes, for example this query returns 39.627.025 rows:
select e1.* from ad_element e1, ad_element e2

Hiep Lq 
January 28, 2015 at 3:50 PM

now, i will test it in 2.1 and report late. i can provide my data to test it (at private channel).

Carlos Ruiz 
January 28, 2015 at 3:44 PM

Hi , I think this issue is just for r3?

If yes, I think is a blocker as indeed there are big reports in any installation, and we need to try to create a reproducible test case and fix it asap for r3 stabilization.

Cannot Reproduce

Details

Assignee

Reporter

Components

Affects versions

Priority

Created January 24, 2015 at 5:48 PM
Updated September 1, 2018 at 11:01 AM
Resolved July 27, 2018 at 5:10 PM