Bamboo plan is hanging
Asked by Cheryl Melanson:

Hello, my plan that's been running fine for months now, is suddenly getting hung up. The only job this plan does it run a selenium test suite using maven. It's satrt up some chrome driver instances then gets stuck.


Answers:
author: Jeyanthan I
body: Hi Cheryl,

Can you access the build log? What does it say?

Also, did you try running the same selenium build operation outside Bamboo from the remote agent? If it hangs there as well, the issue is not on Bamboo side and you'll have to investigate what's happening on the selenium side.

If it hangs on the Bamboo side and you cannot access the build log, you may have to restart the service and start using this [HungBuildKiller add-on](https://marketplace.atlassian.com/plugins/com.atlassian.buildeng.hung-build-killer/server/overview) as this plugin will kill the process if Bamboo detects a hung build, allowing the agent to pick a new job ([this comes inbuilt](https://confluence.atlassian.com/bamboo/configuring-the-hanging-build-event-289277188.html) in the latest versions)

comments: author: Cheryl Melanson
body: Hi Jeyanthan,

Thanks for responding. The selenium tests are running fine from the eclipse ID. The problem occurs when running the from Bamboo. I've stopped and restarted both the server the application is on as well as the Bamboo application several times but I'm till getting the same "hung" issue. I've also increased the max mb in the bamboo config file as well as deleted and rebuild the entire Bamboo plan, but it didn't help. Here is a snippet of the logs. Any suggestions for resolving the hung issue that's occurring now?

15-Jun-2018 09:24:35.738 WARNING \[bamboo.utix.net-startStop-1\] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application \[ROOT\] appears to have started a thread named \[C3P0PooledConnectionPoolManager\[identityToken-\>2rxcp09w10565a1ik7oew\|1330f9d4\]-HelperThread-#1\] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:  
java.lang.Object.wait(Native Method)  
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:683)  
15-Jun-2018 09:24:35.740 WARNING \[bamboo.utix.net-startStop-1\] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application \[ROOT\] appears to have started a thread named \[C3P0PooledConnectionPoolManager\[identityToken-\>2rxcp09w10565a1ik7oew\|1330f9d4\]-HelperThread-#2\] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:  
java.lang.Object.wait(Native Method)  
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:683)  
15-Jun-2018 09:24:35.741 SEVERE \[bamboo.utix.net-startStop-1\] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application \[ROOT\] created a ThreadLocal with key of type \[java.lang.ThreadLocal\] (value \[java.lang.ThreadLocal@519d465d\]) and a value of type \[org.hibernate.boot.registry.internal.StandardServiceRegistryImpl\] (value \[org.hibernate.boot.registry.internal.StandardServiceRegistryImpl@6af58d0\]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.  
15-Jun-2018 09:24:35.741 SEVERE \[bamboo.utix.net-startStop-1\] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application \[ROOT\] created a ThreadLocal with key of type \[java.lang.ThreadLocal.SuppliedThreadLocal\] (value \[java.lang.ThreadLocal$SuppliedThreadLocal@34b4b881\]) and a value of type \[com.atlassian.bamboo.utils.scopedcaches.ScopedCaches\] (value \[com.atlassian.bamboo.utils.scopedcaches.ScopedCaches@686a727c\]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.  
15-Jun-2018 09:24:35.770 INFO \[Thread-8\] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler \["http-apr-8085"\]