Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible stuck thread in Jetty #3645

Closed
rushalias opened this issue May 13, 2019 · 9 comments
Closed

Possible stuck thread in Jetty #3645

rushalias opened this issue May 13, 2019 · 9 comments

Comments

@rushalias
Copy link

We have been running a reverse proxy based on Jetty's AsyncMiddleManServlet for years without any major issue. However, we started noticing that once in a great while a thread gets stuck in a "hot" loop. The only way to recover is to bounce the application. Whenever a server gets in this state we notice substantially (~30% more) higher CPU usage when compared to its peers, this will continue until the application is bounced.

Details:
Jetty version: 9.4.14.v20181114
JDK version: 10.0.2

Suspected stuck thread: default-pool-303663
Thread dump threaddump-1557771226203.txt @ 2019-05-13 11:13:04
Thread dump threaddump-1557771266357.txt @ 2019-05-13 11:13:52
Server state serverstate.txt

Reference email thread: https://www.eclipse.org/lists/jetty-users/msg08899.html

@sbordet please take a look, let me know if I can provide more info. I know you requested thread dumps within seconds of each other, however, this is the closest I could get it.

@joakime
Copy link
Contributor

joakime commented May 13, 2019

Please use Java 11.0.3 (many many networking improvements over Java 10!) and Jetty 9.4.18.v20190429 (many threading improvements over Jetty 9.4.14) and try again.

@joakime
Copy link
Contributor

joakime commented May 13, 2019

Threads referenced by OP.

From threaddump-1557771226203.txt @ 2019-05-13 11:13:04

"default-pool-303663" - Thread t@303663
   java.lang.Thread.State: RUNNABLE
	at app//org.eclipse.jetty.util.IteratingNestedCallback.onCompleteSuccess(IteratingNestedCallback.java:60)
	at app//org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:325)
	at app//org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224)
	at app//org.eclipse.jetty.server.handler.gzip.GzipHttpOutputInterceptor.gzip(GzipHttpOutputInterceptor.java:148)
	at app//org.eclipse.jetty.server.handler.gzip.GzipHttpOutputInterceptor.write(GzipHttpOutputInterceptor.java:117)
	at app//org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:240)
	at app//org.eclipse.jetty.server.HttpOutput$AsyncWrite.process(HttpOutput.java:1243)
	at app//org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241)
	at app//org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224)
	at app//org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:471)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet.write(AsyncMiddleManServlet.java:219)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet.writeProxyResponseContent(AsyncMiddleManServlet.java:201)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet$ProxyWriter.onWritePossible(AsyncMiddleManServlet.java:651)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet$ProxyResponseListener.onContent(AsyncMiddleManServlet.java:499)
	at app//org.eclipse.jetty.client.ResponseNotifier.notifyContent(ResponseNotifier.java:133)
	at app//org.eclipse.jetty.client.ResponseNotifier.notifyContent(ResponseNotifier.java:125)
	at app//org.eclipse.jetty.client.HttpReceiver.responseContent(HttpReceiver.java:338)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.content(HttpReceiverOverHTTP.java:283)
	at app//org.eclipse.jetty.http.HttpParser.parseContent(HttpParser.java:1787)
	at app//org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:1517)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.parse(HttpReceiverOverHTTP.java:172)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.process(HttpReceiverOverHTTP.java:135)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.receive(HttpReceiverOverHTTP.java:73)
	at app//org.eclipse.jetty.client.http.HttpChannelOverHTTP.receive(HttpChannelOverHTTP.java:133)
	at app//org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onFillable(HttpConnectionOverHTTP.java:155)
	at app//org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
	at app//org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
	at app//org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
	at app//org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
	at app//com.opentable.metrics.JettyServerMetricsConfiguration$OTQueuedThreadPool.runJob(JettyServerMetricsConfiguration.java:109)
	at app//org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683)
	at [email protected]/java.lang.Thread.run(Thread.java:844)

From threaddump-1557771266357.txt @ 2019-05-13 11:13:52

"default-pool-303663" - Thread t@303663
   java.lang.Thread.State: RUNNABLE
	at app//org.eclipse.jetty.util.IteratingNestedCallback.onCompleteSuccess(IteratingNestedCallback.java:60)
	at app//org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:325)
	at app//org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224)
	at app//org.eclipse.jetty.server.handler.gzip.GzipHttpOutputInterceptor.gzip(GzipHttpOutputInterceptor.java:148)
	at app//org.eclipse.jetty.server.handler.gzip.GzipHttpOutputInterceptor.write(GzipHttpOutputInterceptor.java:117)
	at app//org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:240)
	at app//org.eclipse.jetty.server.HttpOutput$AsyncWrite.process(HttpOutput.java:1243)
	at app//org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241)
	at app//org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224)
	at app//org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:471)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet.write(AsyncMiddleManServlet.java:219)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet.writeProxyResponseContent(AsyncMiddleManServlet.java:201)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet$ProxyWriter.onWritePossible(AsyncMiddleManServlet.java:651)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet$ProxyResponseListener.onContent(AsyncMiddleManServlet.java:499)
	at app//org.eclipse.jetty.client.ResponseNotifier.notifyContent(ResponseNotifier.java:133)
	at app//org.eclipse.jetty.client.ResponseNotifier.notifyContent(ResponseNotifier.java:125)
	at app//org.eclipse.jetty.client.HttpReceiver.responseContent(HttpReceiver.java:338)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.content(HttpReceiverOverHTTP.java:283)
	at app//org.eclipse.jetty.http.HttpParser.parseContent(HttpParser.java:1787)
	at app//org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:1517)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.parse(HttpReceiverOverHTTP.java:172)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.process(HttpReceiverOverHTTP.java:135)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.receive(HttpReceiverOverHTTP.java:73)
	at app//org.eclipse.jetty.client.http.HttpChannelOverHTTP.receive(HttpChannelOverHTTP.java:133)
	at app//org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onFillable(HttpConnectionOverHTTP.java:155)
	at app//org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
	at app//org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
	at app//org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
	at app//org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
	at app//com.opentable.metrics.JettyServerMetricsConfiguration$OTQueuedThreadPool.runJob(JettyServerMetricsConfiguration.java:109)
	at app//org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683)
	at [email protected]/java.lang.Thread.run(Thread.java:844)

@joakime
Copy link
Contributor

joakime commented May 13, 2019

What does your QueuedThreadPool setup look like?

Namely the com.opentable.metrics.JettyServerMetricsConfiguration$OTQueuedThreadPool.runJob(JettyServerMetricsConfiguration.java:109) class referenced in your stacktraces?

Have you run without this customization, using standard (and unconfigured, with default values) QueuedThreadPool?
If that works, then you should look closely at your QTP replacement class.

@rushalias
Copy link
Author

@joakime
The same issue has been observed with OpenJDK 11.0.3, however, we are still to run Jetty 9.4.14.

OTQueuedThreadPool is sub class of com.codahale.metrics.jetty9.InstrumentedQueuedThreadPool with unbouned queue.

class OTQueuedThreadPool extends InstrumentedQueuedThreadPool {

        OTQueuedThreadPool(MetricRegistry metricRegistry) {
            super(metricRegistry,
                32, 
                32, 
                30000,
                new BlockingArrayQueue<>());
        }

        @Override
        protected void runJob(Runnable job) {
            try {
                job.run();
            } finally {
               // clean up code here 
            }
        }

Until now we have not tried running without this customization, if no viable solution is found, will do that in the future (most likely after we have tried jetty 9.4.14).

Stack trace from 11.0.3 JDK, stuck thread, in this case, is default-pool-73.
instance 1


2019-05-13 13:34:15

"default-pool-73" - Thread t@73
   java.lang.Thread.State: RUNNABLE
	at app//org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241)
	at app//org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224)
	at app//org.eclipse.jetty.server.handler.gzip.GzipHttpOutputInterceptor.gzip(GzipHttpOutputInterceptor.java:148)
	at app//org.eclipse.jetty.server.handler.gzip.GzipHttpOutputInterceptor.write(GzipHttpOutputInterceptor.java:117)
	at app//org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:249)
	at app//org.eclipse.jetty.server.HttpOutput$AsyncWrite.process(HttpOutput.java:1359)
	at app//org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241)
	at app//org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224)
	at app//org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:480)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet.write(AsyncMiddleManServlet.java:222)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet.writeProxyResponseContent(AsyncMiddleManServlet.java:204)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet$ProxyWriter.onWritePossible(AsyncMiddleManServlet.java:651)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet$ProxyResponseListener.onContent(AsyncMiddleManServlet.java:500)
	at app//org.eclipse.jetty.client.ResponseNotifier.notifyContent(ResponseNotifier.java:133)
	at app//org.eclipse.jetty.client.ResponseNotifier.notifyContent(ResponseNotifier.java:125)
	at app//org.eclipse.jetty.client.HttpReceiver.responseContent(HttpReceiver.java:337)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.content(HttpReceiverOverHTTP.java:283)
	at app//org.eclipse.jetty.http.HttpParser.parseContent(HttpParser.java:1787)
	at app//org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:1517)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.parse(HttpReceiverOverHTTP.java:172)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.process(HttpReceiverOverHTTP.java:135)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.receive(HttpReceiverOverHTTP.java:73)
	at app//org.eclipse.jetty.client.http.HttpChannelOverHTTP.receive(HttpChannelOverHTTP.java:133)
	at app//org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onFillable(HttpConnectionOverHTTP.java:155)
	at app//org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
	at app//org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
	at app//org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
	at app//org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
	at app//com.opentable.metrics.JettyServerMetricsConfiguration$OTQueuedThreadPool.runJob(JettyServerMetricsConfiguration.java:109)
	at app//org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:743)
	at [email protected]/java.lang.Thread.run(Thread.java:834)

   Locked ownable synchronizers:
	- None


instance 2


2019-05-13 13:34:35

"default-pool-73" - Thread t@73
   java.lang.Thread.State: RUNNABLE
	at app//org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241)
	at app//org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224)
	at app//org.eclipse.jetty.server.handler.gzip.GzipHttpOutputInterceptor.gzip(GzipHttpOutputInterceptor.java:148)
	at app//org.eclipse.jetty.server.handler.gzip.GzipHttpOutputInterceptor.write(GzipHttpOutputInterceptor.java:117)
	at app//org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:249)
	at app//org.eclipse.jetty.server.HttpOutput$AsyncWrite.process(HttpOutput.java:1359)
	at app//org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241)
	at app//org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224)
	at app//org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:480)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet.write(AsyncMiddleManServlet.java:222)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet.writeProxyResponseContent(AsyncMiddleManServlet.java:204)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet$ProxyWriter.onWritePossible(AsyncMiddleManServlet.java:651)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet$ProxyResponseListener.onContent(AsyncMiddleManServlet.java:500)
	at app//org.eclipse.jetty.client.ResponseNotifier.notifyContent(ResponseNotifier.java:133)
	at app//org.eclipse.jetty.client.ResponseNotifier.notifyContent(ResponseNotifier.java:125)
	at app//org.eclipse.jetty.client.HttpReceiver.responseContent(HttpReceiver.java:337)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.content(HttpReceiverOverHTTP.java:283)
	at app//org.eclipse.jetty.http.HttpParser.parseContent(HttpParser.java:1787)
	at app//org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:1517)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.parse(HttpReceiverOverHTTP.java:172)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.process(HttpReceiverOverHTTP.java:135)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.receive(HttpReceiverOverHTTP.java:73)
	at app//org.eclipse.jetty.client.http.HttpChannelOverHTTP.receive(HttpChannelOverHTTP.java:133)
	at app//org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onFillable(HttpConnectionOverHTTP.java:155)
	at app//org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
	at app//org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
	at app//org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
	at app//org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
	at app//com.opentable.metrics.JettyServerMetricsConfiguration$OTQueuedThreadPool.runJob(JettyServerMetricsConfiguration.java:109)
	at app//org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:743)
	at [email protected]/java.lang.Thread.run(Thread.java:834)

   Locked ownable synchronizers:
	- None


@rushalias
Copy link
Author

Updating with latest observation:
jetty version: 9.4.19.v20190610
jdk version: 11.0.4+11-LTS

Stuck thread on instance 1 (has been in this state multiple days)

2019-09-27 14:19:57

"default-pool-26" - Thread t@26
   java.lang.Thread.State: RUNNABLE
	at app//org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241)
	at app//org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224)
	at app//org.eclipse.jetty.server.handler.gzip.GzipHttpOutputInterceptor.gzip(GzipHttpOutputInterceptor.java:148)
	at app//org.eclipse.jetty.server.handler.gzip.GzipHttpOutputInterceptor.write(GzipHttpOutputInterceptor.java:117)
	at app//org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:249)
	at app//org.eclipse.jetty.server.HttpOutput$AsyncWrite.process(HttpOutput.java:1359)
	at app//org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241)
	at app//org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224)
	at app//org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:480)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet.write(AsyncMiddleManServlet.java:222)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet.writeProxyResponseContent(AsyncMiddleManServlet.java:204)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet$ProxyWriter.onWritePossible(AsyncMiddleManServlet.java:651)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet$ProxyResponseListener.onContent(AsyncMiddleManServlet.java:500)
	at app//org.eclipse.jetty.client.ResponseNotifier.notifyContent(ResponseNotifier.java:133)
	at app//org.eclipse.jetty.client.ResponseNotifier.notifyContent(ResponseNotifier.java:125)
	at app//org.eclipse.jetty.client.HttpReceiver.responseContent(HttpReceiver.java:337)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.content(HttpReceiverOverHTTP.java:283)
	at app//org.eclipse.jetty.http.HttpParser.parseContent(HttpParser.java:1788)
	at app//org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:1518)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.parse(HttpReceiverOverHTTP.java:172)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.process(HttpReceiverOverHTTP.java:135)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.receive(HttpReceiverOverHTTP.java:73)
	at app//org.eclipse.jetty.client.http.HttpChannelOverHTTP.receive(HttpChannelOverHTTP.java:133)
	at app//org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onFillable(HttpConnectionOverHTTP.java:155)
	at app//org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
	at app//org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
	at app//org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
	at app//org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
	at app//com.opentable.metrics.JettyServerMetricsConfiguration$OTQueuedThreadPool.runJob(JettyServerMetricsConfiguration.java:109)
	at app//org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:917)
	at [email protected]/java.lang.Thread.run(Thread.java:834)

   Locked ownable synchronizers:
	- None

Stuck thread on instance 2 (has been in this state multiple days)

2019-09-27 14:29:00

"default-pool-31" - Thread t@31
   java.lang.Thread.State: RUNNABLE
	at app//org.eclipse.jetty.server.HttpOutput$AsyncWrite.process(HttpOutput.java:1344)
	at app//org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241)
	at app//org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224)
	at app//org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:480)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet.write(AsyncMiddleManServlet.java:222)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet.writeProxyResponseContent(AsyncMiddleManServlet.java:204)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet$ProxyWriter.onWritePossible(AsyncMiddleManServlet.java:651)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet$ProxyResponseListener.onContent(AsyncMiddleManServlet.java:500)
	at app//org.eclipse.jetty.client.ResponseNotifier.notifyContent(ResponseNotifier.java:133)
	at app//org.eclipse.jetty.client.ResponseNotifier.notifyContent(ResponseNotifier.java:125)
	at app//org.eclipse.jetty.client.HttpReceiver.responseContent(HttpReceiver.java:337)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.content(HttpReceiverOverHTTP.java:283)
	at app//org.eclipse.jetty.http.HttpParser.parseContent(HttpParser.java:1788)
	at app//org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:1518)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.parse(HttpReceiverOverHTTP.java:172)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.process(HttpReceiverOverHTTP.java:135)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.receive(HttpReceiverOverHTTP.java:73)
	at app//org.eclipse.jetty.client.http.HttpChannelOverHTTP.receive(HttpChannelOverHTTP.java:133)
	at app//org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onFillable(HttpConnectionOverHTTP.java:155)
	at app//org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
	at app//org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
	at app//org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
	at app//org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
	at app//com.opentable.metrics.JettyServerMetricsConfiguration$OTQueuedThreadPool.runJob(JettyServerMetricsConfiguration.java:109)
	at app//org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:917)
	at [email protected]/java.lang.Thread.run(Thread.java:834)

   Locked ownable synchronizers:
	- None


@gregw
Copy link
Contributor

gregw commented Sep 30, 2019

@rushalias

  • are server1 and server2 related?
  • Do you always get pairs of stuck threads like this?
  • Can you take many stack traces for each stuck thread so we can get a feel for the scope of the loop - ie how far up the stack does the loop go? are they looping inside IteratingCallback.iterate or are they looping inside ProxyWriter.onWritePossible etc.

@rushalias
Copy link
Author

rushalias commented Dec 9, 2019

@gregw (apologies for the late response, did not notice the questions)
The issue is still present and we see it intermittently.

  • are server1 and server2 related?
    They are both running the same codebase, however, they are different instances of the same application running on different hosts.

  • Do you always get pairs of stuck threads like this?
    No. For example, currently, I am noticing three instances with "stuck/hot threads"

  • Mulitple stack traces for default-pool-44, all the reported stack traces are from single instance.


2019-12-09 13:31:24

"default-pool-44" - Thread t@44
   java.lang.Thread.State: RUNNABLE
	at [email protected]/java.util.concurrent.locks.AbstractOwnableSynchronizer.<init>(AbstractOwnableSynchronizer.java:59)
	at [email protected]/java.util.concurrent.locks.AbstractQueuedSynchronizer.<init>(AbstractQueuedSynchronizer.java:313)
	at [email protected]/java.util.concurrent.locks.ReentrantLock$Sync.<init>(ReentrantLock.java:118)
	at [email protected]/java.util.concurrent.locks.ReentrantLock$NonfairSync.<init>(ReentrantLock.java:196)
	at [email protected]/java.util.concurrent.locks.ReentrantLock.<init>(ReentrantLock.java:239)
	at app//org.eclipse.jetty.util.thread.Locker.<init>(Locker.java:36)
	at app//org.eclipse.jetty.util.IteratingCallback.<init>(IteratingCallback.java:128)
	at app//org.eclipse.jetty.util.IteratingNestedCallback.<init>(IteratingNestedCallback.java:44)
	at app//org.eclipse.jetty.server.handler.gzip.GzipHttpOutputInterceptor$GzipBufferCB.<init>(GzipHttpOutputInterceptor.java:312)
	at app//org.eclipse.jetty.server.handler.gzip.GzipHttpOutputInterceptor.gzip(GzipHttpOutputInterceptor.java:150)
	at app//org.eclipse.jetty.server.handler.gzip.GzipHttpOutputInterceptor.write(GzipHttpOutputInterceptor.java:120)
	at app//org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:250)
	at app//org.eclipse.jetty.server.HttpOutput$AsyncWrite.process(HttpOutput.java:1360)
	at app//org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241)
	at app//org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:223)
	at app//org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:481)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet.write(AsyncMiddleManServlet.java:222)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet.writeProxyResponseContent(AsyncMiddleManServlet.java:204)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet$ProxyWriter.onWritePossible(AsyncMiddleManServlet.java:649)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet$ProxyResponseListener.onContent(AsyncMiddleManServlet.java:498)
	at app//org.eclipse.jetty.client.ResponseNotifier.notifyContent(ResponseNotifier.java:135)
	at app//org.eclipse.jetty.client.ResponseNotifier.notifyContent(ResponseNotifier.java:126)
	at app//org.eclipse.jetty.client.HttpReceiver.responseContent(HttpReceiver.java:340)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.content(HttpReceiverOverHTTP.java:283)
	at app//org.eclipse.jetty.http.HttpParser.parseContent(HttpParser.java:1762)
	at app//org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:1490)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.parse(HttpReceiverOverHTTP.java:172)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.process(HttpReceiverOverHTTP.java:135)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.receive(HttpReceiverOverHTTP.java:73)
	at app//org.eclipse.jetty.client.http.HttpChannelOverHTTP.receive(HttpChannelOverHTTP.java:133)
	at app//org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onFillable(HttpConnectionOverHTTP.java:154)
	at app//org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
	at app//org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
	at app//org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
	at app//org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:367)
	at app//com.opentable.metrics.JettyServerMetricsConfiguration$OTQueuedThreadPool.runJob(JettyServerMetricsConfiguration.java:109)
	at app//org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:918)
	at [email protected]/java.lang.Thread.run(Thread.java:834)

   Locked ownable synchronizers:
	- None


2019-12-09 13:33:09

"default-pool-44" - Thread t@44
   java.lang.Thread.State: RUNNABLE
	at [email protected]/java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1239)
	at [email protected]/java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:267)
	at app//org.eclipse.jetty.util.thread.Locker.lock(Locker.java:46)
	at app//org.eclipse.jetty.util.IteratingCallback.succeeded(IteratingCallback.java:338)
	at app//org.eclipse.jetty.util.IteratingNestedCallback.onCompleteSuccess(IteratingNestedCallback.java:57)
	at app//org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:326)
	at app//org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:223)
	at app//org.eclipse.jetty.server.handler.gzip.GzipHttpOutputInterceptor.gzip(GzipHttpOutputInterceptor.java:150)
	at app//org.eclipse.jetty.server.handler.gzip.GzipHttpOutputInterceptor.write(GzipHttpOutputInterceptor.java:120)
	at app//org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:250)
	at app//org.eclipse.jetty.server.HttpOutput$AsyncWrite.process(HttpOutput.java:1360)
	at app//org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241)
	at app//org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:223)
	at app//org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:481)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet.write(AsyncMiddleManServlet.java:222)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet.writeProxyResponseContent(AsyncMiddleManServlet.java:204)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet$ProxyWriter.onWritePossible(AsyncMiddleManServlet.java:649)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet$ProxyResponseListener.onContent(AsyncMiddleManServlet.java:498)
	at app//org.eclipse.jetty.client.ResponseNotifier.notifyContent(ResponseNotifier.java:135)
	at app//org.eclipse.jetty.client.ResponseNotifier.notifyContent(ResponseNotifier.java:126)
	at app//org.eclipse.jetty.client.HttpReceiver.responseContent(HttpReceiver.java:340)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.content(HttpReceiverOverHTTP.java:283)
	at app//org.eclipse.jetty.http.HttpParser.parseContent(HttpParser.java:1762)
	at app//org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:1490)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.parse(HttpReceiverOverHTTP.java:172)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.process(HttpReceiverOverHTTP.java:135)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.receive(HttpReceiverOverHTTP.java:73)
	at app//org.eclipse.jetty.client.http.HttpChannelOverHTTP.receive(HttpChannelOverHTTP.java:133)
	at app//org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onFillable(HttpConnectionOverHTTP.java:154)
	at app//org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
	at app//org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
	at app//org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
	at app//org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:367)
	at app//com.opentable.metrics.JettyServerMetricsConfiguration$OTQueuedThreadPool.runJob(JettyServerMetricsConfiguration.java:109)
	at app//org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:918)
	at [email protected]/java.lang.Thread.run(Thread.java:834)

   Locked ownable synchronizers:
	- locked <3f2c1768> (a java.util.concurrent.locks.ReentrantLock$NonfairSync)


2019-12-09 13:34:01

"default-pool-44" - Thread t@44
   java.lang.Thread.State: RUNNABLE
	at [email protected]/java.util.concurrent.locks.AbstractOwnableSynchronizer.<init>(AbstractOwnableSynchronizer.java:59)
	at [email protected]/java.util.concurrent.locks.AbstractQueuedSynchronizer.<init>(AbstractQueuedSynchronizer.java:313)
	at [email protected]/java.util.concurrent.locks.ReentrantLock$Sync.<init>(ReentrantLock.java:118)
	at [email protected]/java.util.concurrent.locks.ReentrantLock$NonfairSync.<init>(ReentrantLock.java:196)
	at [email protected]/java.util.concurrent.locks.ReentrantLock.<init>(ReentrantLock.java:239)
	at app//org.eclipse.jetty.util.thread.Locker.<init>(Locker.java:36)
	at app//org.eclipse.jetty.util.IteratingCallback.<init>(IteratingCallback.java:128)
	at app//org.eclipse.jetty.util.IteratingNestedCallback.<init>(IteratingNestedCallback.java:44)
	at app//org.eclipse.jetty.server.handler.gzip.GzipHttpOutputInterceptor$GzipBufferCB.<init>(GzipHttpOutputInterceptor.java:312)
	at app//org.eclipse.jetty.server.handler.gzip.GzipHttpOutputInterceptor.gzip(GzipHttpOutputInterceptor.java:150)
	at app//org.eclipse.jetty.server.handler.gzip.GzipHttpOutputInterceptor.write(GzipHttpOutputInterceptor.java:120)
	at app//org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:250)
	at app//org.eclipse.jetty.server.HttpOutput$AsyncWrite.process(HttpOutput.java:1360)
	at app//org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241)
	at app//org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:223)
	at app//org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:481)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet.write(AsyncMiddleManServlet.java:222)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet.writeProxyResponseContent(AsyncMiddleManServlet.java:204)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet$ProxyWriter.onWritePossible(AsyncMiddleManServlet.java:649)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet$ProxyResponseListener.onContent(AsyncMiddleManServlet.java:498)
	at app//org.eclipse.jetty.client.ResponseNotifier.notifyContent(ResponseNotifier.java:135)
	at app//org.eclipse.jetty.client.ResponseNotifier.notifyContent(ResponseNotifier.java:126)
	at app//org.eclipse.jetty.client.HttpReceiver.responseContent(HttpReceiver.java:340)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.content(HttpReceiverOverHTTP.java:283)
	at app//org.eclipse.jetty.http.HttpParser.parseContent(HttpParser.java:1762)
	at app//org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:1490)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.parse(HttpReceiverOverHTTP.java:172)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.process(HttpReceiverOverHTTP.java:135)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.receive(HttpReceiverOverHTTP.java:73)
	at app//org.eclipse.jetty.client.http.HttpChannelOverHTTP.receive(HttpChannelOverHTTP.java:133)
	at app//org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onFillable(HttpConnectionOverHTTP.java:154)
	at app//org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
	at app//org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
	at app//org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
	at app//org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:367)
	at app//com.opentable.metrics.JettyServerMetricsConfiguration$OTQueuedThreadPool.runJob(JettyServerMetricsConfiguration.java:109)
	at app//org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:918)
	at [email protected]/java.lang.Thread.run(Thread.java:834)

   Locked ownable synchronizers:
	- None



2019-12-09 13:34:46

"default-pool-44" - Thread t@44
   java.lang.Thread.State: RUNNABLE
	at app//org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:326)
	at app//org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:223)
	at app//org.eclipse.jetty.server.handler.gzip.GzipHttpOutputInterceptor.gzip(GzipHttpOutputInterceptor.java:150)
	at app//org.eclipse.jetty.server.handler.gzip.GzipHttpOutputInterceptor.write(GzipHttpOutputInterceptor.java:120)
	at app//org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:250)
	at app//org.eclipse.jetty.server.HttpOutput$AsyncWrite.process(HttpOutput.java:1360)
	at app//org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241)
	at app//org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:223)
	at app//org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:481)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet.write(AsyncMiddleManServlet.java:222)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet.writeProxyResponseContent(AsyncMiddleManServlet.java:204)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet$ProxyWriter.onWritePossible(AsyncMiddleManServlet.java:649)
	at app//org.eclipse.jetty.proxy.AsyncMiddleManServlet$ProxyResponseListener.onContent(AsyncMiddleManServlet.java:498)
	at app//org.eclipse.jetty.client.ResponseNotifier.notifyContent(ResponseNotifier.java:135)
	at app//org.eclipse.jetty.client.ResponseNotifier.notifyContent(ResponseNotifier.java:126)
	at app//org.eclipse.jetty.client.HttpReceiver.responseContent(HttpReceiver.java:340)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.content(HttpReceiverOverHTTP.java:283)
	at app//org.eclipse.jetty.http.HttpParser.parseContent(HttpParser.java:1762)
	at app//org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:1490)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.parse(HttpReceiverOverHTTP.java:172)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.process(HttpReceiverOverHTTP.java:135)
	at app//org.eclipse.jetty.client.http.HttpReceiverOverHTTP.receive(HttpReceiverOverHTTP.java:73)
	at app//org.eclipse.jetty.client.http.HttpChannelOverHTTP.receive(HttpChannelOverHTTP.java:133)
	at app//org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onFillable(HttpConnectionOverHTTP.java:154)
	at app//org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
	at app//org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
	at app//org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
	at app//org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
	at app//org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:367)
	at app//com.opentable.metrics.JettyServerMetricsConfiguration$OTQueuedThreadPool.runJob(JettyServerMetricsConfiguration.java:109)
	at app//org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:918)
	at [email protected]/java.lang.Thread.run(Thread.java:834)

   Locked ownable synchronizers:
	- None

@rushalias
Copy link
Author

Got a couple of more stack traces, interestingly these are ones I have not seen in the past. Yet they occur on a thread that is running hot, stuck in a running state of which it will never come off of.

Stack trace

  sun.security.ssl.SSLEngineImpl.getHandshakeStatus() SSLEngineImpl.java:801
  sun.security.ssl.SSLEngineImpl.writeRecord(ByteBuffer[], int, int, ByteBuffer[], int, int) SSLEngineImpl.java:185
  sun.security.ssl.SSLEngineImpl.wrap(ByteBuffer[], int, int, ByteBuffer[], int, int) SSLEngineImpl.java:136
  sun.security.ssl.SSLEngineImpl.wrap(ByteBuffer[], int, int, ByteBuffer) SSLEngineImpl.java:116
  javax.net.ssl.SSLEngine.wrap(ByteBuffer[], ByteBuffer) SSLEngine.java:519
  org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.flush(ByteBuffer[]) SslConnection.java:891
  org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.doShutdownOutput() SslConnection.java:1111
  org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.doClose() SslConnection.java:1179
  org.eclipse.jetty.io.AbstractEndPoint.doOnClose(Throwable) AbstractEndPoint.java:220
  org.eclipse.jetty.io.AbstractEndPoint.close(Throwable) AbstractEndPoint.java:192
  org.eclipse.jetty.io.AbstractEndPoint.close() AbstractEndPoint.java:175
  org.eclipse.jetty.io.AbstractConnection.close() AbstractConnection.java:254
  org.eclipse.jetty.server.HttpChannelOverHttp.earlyEOF() HttpChannelOverHttp.java:233
  org.eclipse.jetty.http.HttpParser.parseNext(ByteBuffer) HttpParser.java:1526
  org.eclipse.jetty.server.HttpConnection.parseRequestBuffer() HttpConnection.java:369
  org.eclipse.jetty.server.HttpConnection.onFillable() HttpConnection.java:258
  org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded() AbstractConnection.java:311
  org.eclipse.jetty.io.FillInterest.fillable() FillInterest.java:103
  org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable() SslConnection.java:426
  org.eclipse.jetty.io.ssl.SslConnection.onFillable() SslConnection.java:320
  org.eclipse.jetty.io.ssl.SslConnection$2.succeeded() SslConnection.java:158
  org.eclipse.jetty.io.FillInterest.fillable() FillInterest.java:103
  org.eclipse.jetty.io.ChannelEndPoint$2.run() ChannelEndPoint.java:117
  org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(Runnable) EatWhatYouKill.java:336
  org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(boolean) EatWhatYouKill.java:313
  org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(boolean) EatWhatYouKill.java:171
  org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run() EatWhatYouKill.java:129
  org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run() ReservedThreadExecutor.java:367
  com.opentable.metrics.JettyServerMetricsConfiguration$OTQueuedThreadPool.runJob(Runnable) JettyServerMetricsConfiguration.java:109
  org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run() QueuedThreadPool.java:918
  java.lang.Thread.run() Thread.java:834

Stack trace

  org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.flush(ByteBuffer[]) SslConnection.java:887
  org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.fill(ByteBuffer) SslConnection.java:530
  org.eclipse.jetty.server.HttpConnection.fillRequestBuffer() HttpConnection.java:341
  org.eclipse.jetty.server.HttpConnection.onFillable() HttpConnection.java:251
  org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded() AbstractConnection.java:311
  org.eclipse.jetty.io.FillInterest.fillable() FillInterest.java:103
  org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable() SslConnection.java:426
  org.eclipse.jetty.io.ssl.SslConnection.onFillable() SslConnection.java:320
  org.eclipse.jetty.io.ssl.SslConnection$2.succeeded() SslConnection.java:158
  org.eclipse.jetty.io.FillInterest.fillable() FillInterest.java:103
  org.eclipse.jetty.io.ChannelEndPoint$2.run() ChannelEndPoint.java:117
  com.opentable.metrics.JettyServerMetricsConfiguration$OTQueuedThreadPool.runJob(Runnable) JettyServerMetricsConfiguration.java:109
  org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run() QueuedThreadPool.java:918
  java.lang.Thread.run() Thread.java:834

Stack traces were obtained via YourKit.

@rushalias
Copy link
Author

Closing this issue.
It seems it was fixed here: #4217

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants