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

Test failure: com.linecorp.armeria.server.InvalidPathWithDataTest.invalidPath() #5681

Closed
minwoox opened this issue May 16, 2024 · 1 comment · Fixed by #5694
Closed

Test failure: com.linecorp.armeria.server.InvalidPathWithDataTest.invalidPath() #5681

minwoox opened this issue May 16, 2024 · 1 comment · Fixed by #5694

Comments

@minwoox
Copy link
Member

minwoox commented May 16, 2024

java.io.IOException: RST_STREAM received
	at java.net.http/jdk.internal.net.http.HttpClientImpl.send(HttpClientImpl.java:964)
	at java.net.http/jdk.internal.net.http.HttpClientFacade.send(HttpClientFacade.java:133)
	at com.linecorp.armeria.server.InvalidPathWithDataTest.invalidPath(InvalidPathWithDataTest.java:76)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
Caused by: java.io.IOException: RST_STREAM received
	at java.net.http/jdk.internal.net.http.Stream.incoming_reset(Stream.java:586)
	at java.net.http/jdk.internal.net.http.Stream.otherFrame(Stream.java:501)
	at java.net.http/jdk.internal.net.http.Stream.incoming(Stream.java:494)
	at java.net.http/jdk.internal.net.http.Http2Connection.processFrame(Http2Connection.java:936)
	at java.net.http/jdk.internal.net.http.frame.FramesDecoder.decode(FramesDecoder.java:155)
	at java.net.http/jdk.internal.net.http.Http2Connection$FramesController.processReceivedData(Http2Connection.java:307)
	at java.net.http/jdk.internal.net.http.Http2Connection.asyncReceive(Http2Connection.java:778)
	at java.net.http/jdk.internal.net.http.Http2Connection$Http2TubeSubscriber.processQueue(Http2Connection.java:1594)
	at java.net.http/jdk.internal.net.http.common.SequentialScheduler$LockingRestartableTask.run(SequentialScheduler.java:182)
	at java.net.http/jdk.internal.net.http.common.SequentialScheduler$CompleteRestartableTask.run(SequentialScheduler.java:149)
	at java.net.http/jdk.internal.net.http.common.SequentialScheduler$SchedulableTask.run(SequentialScheduler.java:207)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)

@minwoox
Copy link
Member Author

minwoox commented May 23, 2024

I've seen this flaky test frequently so I've analyzed it.

ServerHttp2ObjectEncoder resets the stream after sending an invalid request path response if the client still sends something:

future = encoder().writeRstStream(ctx(), streamId, Http2Error.CANCEL.code(),

If the client receives the response before receiving the RST_STREAM, the test doesn't fail. Otherwise, it fails.
I believe we can't avoid this flakiness so we need to mark it with the @FlakyTest.

minwoox added a commit that referenced this issue May 24, 2024
Dogacel pushed a commit to Dogacel/armeria that referenced this issue Jun 8, 2024
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

Successfully merging a pull request may close this issue.

1 participant