Thread may be stuck

Hello,

Since i upgrade confluence to 5.9.12, i got an issue with thread being stuck and leading to a crash of the instance.

01-Aug-2016 10:02:39.041 WARNING [ContainerBackgroundProcessor[StandardEngine[Standalone]]] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadDetected Thread "http-nio-8080-exec-11" (id=749) has been active for 62,746 milliseconds (since 8/1/16 10:01 AM) to serve the same request for http://localhost:8080/rest/mywork/latest/status/notification/count and may be stuck (configured threshold for this StuckThreadDetectionValve is 60 seconds). There is/are 10 thread(s) in total that are monitored by this Valve and may be stuck.
java.lang.Throwable

 

Someone knows something about that?

Thanks,

François

7 answers

I get the same error when trying to create a new build plan in Bamboo v5.14.3.1. At the end I get an error message in the GUI: "New access key is required but could not be added to Bitbucket Server."

Hey Logan,

 

I am also using bamboo v5.14.3.1  and getting same error like thread may be stuck, have you solved this issue.

If yes please help...

I am having this issue as well, using Confluence 5.9.10 when running a backup.

Same issue using 5.10.2

This seems to be a feature, according to the following issue:

https://jira.atlassian.com/browse/CONF-40977

In previous confluence versions we did not know about stuck threats. Now we see them in the logs. But they might not be new.

Same issue i see on my confluence 5.9.11 and due to that one of Confluence DC instance we are getting 500 Error.

 

09-Nov-2016 01:27:59.626 WARNING [ContainerBackgroundProcessor[StandardEngine[Standalone]]] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadDetected Thread "http-nio-8090-exec-29" (id=267) has been active for 69,335 milliseconds (since 11/9/16 1:26 AM) to serve the same request for https://escmconfluence.1dc.com/download/attachments/74685514/Session%202%20-%20Ease%20Application%20Overview.mp4 and may be stuck (configured threshold for this StuckThreadDetectionValve is 60 seconds). There is/are 1 thread(s) in total that are monitored by this Valve and may be stuck.

java.lang.Throwable

        at sun.misc.Unsafe.park(Native Method)

        at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)

        at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedNanos(AbstractQueuedSynchronizer.java:1037)

        at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1328)

        at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:277)

 

09-Nov-2016 07:06:24.899 WARNING [ContainerBackgroundProcessor[StandardEngine[Standalone]]] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadDetected Thread "http-nio-8090-exec-34" (id=705) has been active for 67,996 milliseconds (since 11/9/16 7:05 AM) to serve the same request for https://escmconfluence.1dc.com/display/Core360Control/Environment+Priorities?flashId=1427034727 and may be stuck (configured threshold for this StuckThreadDetectionValve is 60 seconds). There is/are 1 thread(s) in total that are monitored by this Valve and may be stuck.

java.lang.Throwable

        at java.lang.Object.wait(Native Method)

        at com.hazelcast.spi.impl.BasicInvocationFuture.pollResponse(BasicInvocationFuture.java:265)

        at com.hazelcast.spi.impl.BasicInvocationFuture.waitForResponse(BasicInvocationFuture.java:216)

        at com.hazelcast.spi.impl.BasicInvocationFuture.get(BasicInvocationFuture.java:193)

 

09-Nov-2016 07:15:16.982 WARNING [ContainerBackgroundProcessor[StandardEngine[Standalone]]] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadDetected Thread "http-nio-8090-exec-22" (id=260) has been active for 248,698 milliseconds (since 11/9/16 7:11 AM) to serve the same request for https://escmconfluence.1dc.com/rest/mywork/latest/status/notification/count?_=1478693467722 and may be stuck (configured threshold for this StuckThreadDetectionValve is 60 seconds). There is/are 15 thread(s) in total that are monitored by this Valve and may be stuck.

java.lang.Throwable

        at sun.misc.Unsafe.park(Native Method)

        at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)

 

 

09-Nov-2016 07:15:17.289 WARNING [ContainerBackgroundProcessor[StandardEngine[Standalone]]] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadCompleted Thread "http-nio-8090-exec-22" (id=260) was previously reported to be stuck but has completed. It was active for approximately 248,715 milliseconds. There is/are still 14 thread(s) that are monitored by this Valve and may be stuck.

09-Nov-2016 07:15:17.289 WARNING [ContainerBackgroundProcessor[StandardEngine[Standalone]]] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadCompleted Thread "http-nio-8090-exec-3" (id=228) was previously reported to be stuck but has completed. It was active for approximately 350,492 milliseconds. There is/are still 13 thread(s) that are monitored by this Valve and may be stuck.

09-Nov-2016 07:15:18.013 SEVERE [http-nio-8090-exec-59] org.apache.catalina.core.StandardHostValve.custom Exception Processing ErrorPage[errorCode=500, location=/500page.jsp]

com.atlassian.cache.CacheException: Problem retrieving a value from cache com.atlassian.confluence.user.persistence.dao.ConfluenceRememberMeToken

 

I'm getting same issue in confluence 5.10.7 and what is the fix for this bug?

In confluence 5.10.4, I see this struck thread when we are running the load test.  evetually it gets complete when the thread processor beocmes free

Example:
06-Jun-2017 12:44:40.689 WARNING [ContainerBackgroundProcessor[StandardEngine[Standalone]]] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadDetected Thread "http-apr-8443-exec-1233" (id=2713) has been active for 65,998 milliseconds (since 6/6/17 12:43 PM) to serve the same request for https://**************** and may be stuck (configured threshold for this StuckThreadDetectionValve is 60 seconds). There is/are 147 thread(s) in total that are monitored by this Valve and may be stuck.

Once thread is completed, you can see below message in the Catalina.out

06-Jun-2017 12:45:46.090 WARNING [ContainerBackgroundProcessor[StandardEngine[Standalone]]] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadCompleted Thread "http-apr-8443-exec-1233" (id=2713) was previously reported to be stuck but has completed. It was active for approximately 114,298 milliseconds. There is/are still 186 thread(s) that are monitored by this Valve and may be stuck.

 such many stuck threads cause the application stuck and start failed... and the numbers of threads are increasing faster and faster... 

Hi,all.

when I upgrade Confluence from 5.8.14 to 5.10.8, I also met the same issue. 

and i found there were four main url requests cause the threads increase:

https://localhost:8090/rest/quickreload/latest/

https://localhost:8090/rest/analytics/1.0/publish/bulk

https://localhost:8090/rest/mywork/latest/status/notification/count

https://localhost:8090/json/startheartbeatactivity.action

Is there an official solution for this issue ? 

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

2,925 views 27 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you