jetty.project icon indicating copy to clipboard operation
jetty.project copied to clipboard

Flaky Test - `org.eclipse.jetty.quic.client.End2EndClientTest.testMultiThreadedHTTP1`

Open joakime opened this issue 2 years ago • 3 comments

Jetty version(s) Jetty 10.0.x

Description Flaky Test seen repeatedly on jetty-10.0.x branch (and PRs)

java.util.concurrent.CompletionException: java.util.concurrent.TimeoutException
	at [email protected]/org.eclipse.jetty.quic.client.End2EndClientTest.testMultiThreadedHTTP1(End2EndClientTest.java:166)
Caused by: java.util.concurrent.TimeoutException
	at java.base/java.util.concurrent.CompletableFuture$Timeout.run(CompletableFuture.java:2792)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)

Running org.eclipse.jetty.quic.client.End2EndClientTest.testMultiThreadedHTTP1()
2022-11-01 15:55:45.782:INFO :oejs.Server:main: jetty-10.0.13-SNAPSHOT; built: 2022-11-01T15:18:15.980Z; git: 48593530c165fc568f62204d72ef9fad1c27babc; jvm 11.0.14.1+1
2022-11-01 15:55:46.245:INFO :oejus.SslContextFactory:main: x509=X509@2c88b9fc(mykey,h=[quic.tech],a=[],w=[]) for Server@64dafeed[provider=null,keyStore=file:///home/jenkins/agent/workspace/jetty.project_PR-8795/jetty-quic/quic-client/src/test/resources/keystore.p12,trustStore=null]
2022-11-01 15:55:46.290:INFO :oejs.AbstractConnector:main: Started QuicServerConnector@13e3c1c7{HTTP/1.1, (http/1.1, h2)}{0.0.0.0:41540}
2022-11-01 15:55:46.396:INFO :oejs.Server:main: Started Server@6c6c5427{STARTING}[10.0.13-SNAPSHOT,sto=0] @4369ms
2022-11-01 15:56:01.491:INFO :oejs.Server:main: Stopped Server@6c6c5427{STOPPING}[10.0.13-SNAPSHOT,sto=0]
2022-11-01 15:56:01.497:INFO :oejs.AbstractConnector:main: Stopped QuicServerConnector@13e3c1c7{HTTP/1.1, (http/1.1, h2)}{0.0.0.0:41540}

joakime avatar Nov 01 '22 17:11 joakime

Disabled in PR #8816 on jetty-10.0.x

joakime avatar Nov 02 '22 10:11 joakime

This issue has been automatically marked as stale because it has been a full year without activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Nov 03 '23 00:11 github-actions[bot]

This test now fails with:

java.util.concurrent.CompletionException: java.lang.RuntimeException: java.util.concurrent.RejectedExecutionException: Thread limit exceeded replacing blocked worker

	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1807)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: java.lang.RuntimeException: java.util.concurrent.RejectedExecutionException: Thread limit exceeded replacing blocked worker
	at [email protected]/org.eclipse.jetty.quic.client.End2EndClientTest.lambda$testMultiThreadedHTTP1$0(End2EndClientTest.java:179)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804)
	... 6 more
Caused by: java.util.concurrent.RejectedExecutionException: Thread limit exceeded replacing blocked worker
	at java.base/java.util.concurrent.ForkJoinPool.tryCompensate(ForkJoinPool.java:1819)
	at java.base/java.util.concurrent.ForkJoinPool.compensatedBlock(ForkJoinPool.java:3448)
	at java.base/java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3434)
	at java.base/java.util.concurrent.CompletableFuture.waitingGet(CompletableFuture.java:1898)
	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2072)
	at org.eclipse.jetty.client.transport.HttpRequest.send(HttpRequest.java:708)
	at org.eclipse.jetty.client.HttpClient.GET(HttpClient.java:351)
	at org.eclipse.jetty.client.HttpClient.GET(HttpClient.java:336)
	at [email protected]/org.eclipse.jetty.quic.client.End2EndClientTest.lambda$testMultiThreadedHTTP1$0(End2EndClientTest.java:172)
	... 7 more

It should probably be rewritten to avoid blocking inside the task.

sbordet avatar Feb 01 '24 15:02 sbordet