GeeCON Prague 2014*
The moose likes JForum and the fly likes [ThreadPoolAsynchronousRunner] Creating emergency threads for unassigned pending tasks Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » JForum
Bookmark "[ThreadPoolAsynchronousRunner] Creating emergency threads for unassigned pending tasks Problem" Watch "[ThreadPoolAsynchronousRunner] Creating emergency threads for unassigned pending tasks Problem" New topic
Author

[ThreadPoolAsynchronousRunner] Creating emergency threads for unassigned pending tasks Problem

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi, I installed jforum webapp on my computer, at first, every thing is Ok, and I can run the forum well.
But then I changed the \WEB-INF\log4j.xml, it appeared a problem. After that, I changed the log4j.xml file back, but the problem is not solved. Here is my info:

009-5-15 17:35:24 org.apache.catalina.core.AprLifecycleListener init
??: Loaded Apache Tomcat Native library 1.1.12.
2009-5-15 17:35:24 org.apache.catalina.core.AprLifecycleListener init
??: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
2009-5-15 17:35:24 org.apache.coyote.http11.Http11AprProtocol init
??: Initializing Coyote HTTP/1.1 on http-8080
2009-5-15 17:35:24 org.apache.coyote.ajp.AjpAprProtocol init
??: Initializing Coyote AJP/1.3 on ajp-8009
2009-5-15 17:35:24 org.apache.catalina.startup.Catalina load
??: Initialization processed in 1725 ms
2009-5-15 17:35:24 org.apache.catalina.core.StandardService start
??: Starting service Catalina
2009-5-15 17:35:24 org.apache.catalina.core.StandardEngine start
??: Starting Servlet Engine: Apache Tomcat/6.0.14
2009-5-15 17:35:25 org.apache.coyote.http11.Http11AprProtocol start
??: Starting Coyote HTTP/1.1 on http-8080
2009-5-15 17:35:25 org.apache.coyote.ajp.AjpAprProtocol start
??: Starting Coyote AJP/1.3 on ajp-8009
2009-5-15 17:35:26 org.apache.catalina.startup.Catalina start
??: Server startup in 1242 ms
17:35:36,140 INFO [JForumBaseServlet ] Starting JForum. Debug mode is true
17:35:36,171 INFO [ConfigLoader ] Using cache engine: net.jforum.cache.DefaultCacheEngine
17:35:36,171 INFO [ConfigLoader ] Creating an instance of net.jforum.repository.BBCodeRepository
17:35:36,171 INFO [ConfigLoader ] Creating an instance of net.jforum.repository.RankingRepository
17:35:36,171 INFO [ConfigLoader ] Creating an instance of net.jforum.repository.SmiliesRepository
17:35:36,187 INFO [ConfigLoader ] Creating an instance of net.jforum.repository.ForumRepository
17:35:36,203 INFO [ConfigLoader ] Creating an instance of net.jforum.repository.TopicRepository
17:35:36,203 INFO [ConfigLoader ] Creating an instance of net.jforum.SessionFacade
17:35:36,218 INFO [ConfigLoader ] Creating an instance of net.jforum.repository.PostRepository
17:35:36,218 INFO [ConfigLoader ] Creating an instance of net.jforum.repository.Tpl
17:35:36,234 INFO [ConfigLoader ] Creating an instance of net.jforum.repository.RolesRepository
17:35:36,234 INFO [ConfigLoader ] Creating an instance of net.jforum.repository.SecurityRepository
17:35:36,234 INFO [ConfigLoader ] Creating an instance of net.jforum.repository.BanlistRepository
17:35:36,437 INFO [FileMonitor ] Watching E:\eclipse workspace\Space One\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\jforum/WEB-INF/config/languages/en_US.properties
17:35:36,531 INFO [ConfigLoader ] Loading JDBC driver net.jforum.dao.mysql.MysqlDataAccessDriver
17:35:36,671 INFO [FileMonitor ] Watching E:\eclipse workspace\Space One\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\jforum/WEB-INF/config/database/generic/generic_queries.sql
17:35:36,671 INFO [FileMonitor ] Watching E:\eclipse workspace\Space One\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\jforum/WEB-INF/config/database/mysql/mysql.sql
17:35:36,671 INFO [FileMonitor ] Watching E:\eclipse workspace\Space One\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\jforum/WEB-INF/config/SystemGlobals.properties
17:35:36,890 INFO [MLog ] MLog clients using log4j logging.
17:35:37,046 INFO [C3P0Registry ] Initializing c3p0-0.9.1-pre9 [built 23-September-2006 01:47:24; debug? true; trace: 10]
17:35:37,171 INFO [AbstractPoolBackedDataSource] Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 120000, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 1722456, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> com.mysql.jdbc.Driver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1722456, idleConnectionTestPeriod -> 3600, initialPoolSize -> 3, jdbcUrl -> jdbc:mysql://localhost:3306/jforum_teste?user=root&password=root&autoReconnect=true&useNewIO=false&zeroDateTimeBehavior=convertToNull&useServerPrepStmts=false&dumpQueriesOnException=true&jdbcCompliantTruncation=false, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 10, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 5, numHelperThreads -> 3, preferredTestQuery -> null, properties -> {}, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 180, usesTraditionalReflectiveProxies -> false ]
17:35:57,171 WARN [ThreadPoolAsynchronousRunner] com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@ecb67f -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
17:35:57,171 WARN [ThreadPoolAsynchronousRunner] com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@ecb67f -- APPARENT DEADLOCK!!! Complete Status:
Managed Threads: 3
Active Threads: 3
Active Tasks:
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@15b0333 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@2f2295 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@878c4c (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2)
Pending Tasks:
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@10c0f66
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@c6f734
Pool thread stack traces:
Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0,5,main]
java.lang.Thread.sleep(Native Method)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1522)
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1,5,main]
java.lang.Thread.sleep(Native Method)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1522)
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2,5,main]
java.lang.Thread.sleep(Native Method)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1522)
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)

I don't know how to solve the problem, can anybody help me ? Thanks a lot!
[originally posted on jforum.net by yuting_lv]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
This is some sort of issue related to the C3P0 database pooling package that jForum uses.

Perhaps the solution at the bottom of this thread might help:

http://www.nabble.com/very-frequent-APPARENT-DEADLOCK-messages-td14155082.html

There are a lot of other posts in various forum dealing with this. All seem to be related to times of high CPU usage or slow network response time in some fashion. For you specific situation, you may need to tweak the c3p0 settings (see that site for details).

On the other hand, when Tomcat starts up, it is doing a lot of stuff while all the web-apps are starting. If you're only getting this error during start up and things still work.. you probably can just ignore it.
[originally posted on jforum.net by monroe]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Thank you, Monroe !
:roll: I used a clumsy approach to solve the problem, reinstall the JForum Project.
I have seen the mail list http://www.nabble.com/very-frequent-APPARENT-DEADLOCK-messages-td14155082.html
However, I can not understand :
This problem is resolved now by adding the host name and ip address in /etc/hosts file.

Where is the hosts file, eh...?
I use MySQL5.0 as database, MySQL host name = root, host address = localhost,
appears like root@localhost ----
|
--- jforum
|
--- other DB ...
I found D:\Program Files\MySQL\MySQL Server 5.0\my.ini, is this file hosts file?

[originally posted on jforum.net by yuting_lv]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Sigh, that is Internet 101... When a name like www.somewhere.com is used it needs to be translated to an IP address. The "standard" is for the OS to look in a local "hosts" file first for a match and then query the DNS server.

The "hosts" file mentioned in that article is the local hosts file above. In *nix, this is in the etc directory. In windows, it's generally in C:/Windows/system32/drivers/etc (the windows part can vary based on your install).

That said, since you say you're using localhost as a system, this host name is probably already in this file (as a 127.0.0.1 IP address).

You'll probably have to play with tweaking the C3P0 setting to prevent this. See this for more details:

http://www.coderanch.com/t/578606 #20969

That's about the limit of what I know about the C3P0 package... there are other sites that are more specialized towards this. You might try there for more info.
[originally posted on jforum.net by monroe]
 
GeeCON Prague 2014
 
subject: [ThreadPoolAsynchronousRunner] Creating emergency threads for unassigned pending tasks Problem