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

Jetty-12 already complete exception #8211

Closed
gregw opened this issue Jun 27, 2022 · 2 comments · Fixed by #8459 or #9090
Closed

Jetty-12 already complete exception #8211

gregw opened this issue Jun 27, 2022 · 2 comments · Fixed by #8459 or #9090
Labels
Bug For general bugs on Jetty side

Comments

@gregw
Copy link
Contributor

gregw commented Jun 27, 2022

Jetty version(s)
jetty-12

Java version/vendor (use: java -version)

OS type/version

Description

When building with tests, the following exception is produced many times from many tests. This should either not happen, or if it is normal (??) then the log should be stackless at least.

java.lang.IllegalStateException: already completed
	at org.eclipse.jetty.server.internal.HttpChannelState$ChannelCallback.lockedOnComplete(HttpChannelState.java:1422)
	at org.eclipse.jetty.server.internal.HttpChannelState$ChannelCallback.failed(HttpChannelState.java:1367)
	at org.eclipse.jetty.server.internal.HttpChannelState$HandlerInvoker.run(HttpChannelState.java:666)
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:412)
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:381)
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:268)
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.produce(AdaptiveExecutionStrategy.java:190)
	at org.eclipse.jetty.http2.internal.HTTP2Connection.produce(HTTP2Connection.java:209)
	at org.eclipse.jetty.http2.internal.HTTP2Connection.onFillable(HTTP2Connection.java:156)
	at org.eclipse.jetty.http2.internal.HTTP2Connection$FillableCallback.succeeded(HTTP2Connection.java:379)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100)
	at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53)
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:412)
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:381)
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:268)
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.produce(AdaptiveExecutionStrategy.java:190)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:894)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1038)
	at java.base/java.lang.Thread.run(Thread.java:833)
@gregw gregw added the Bug For general bugs on Jetty side label Jun 27, 2022
@gregw
Copy link
Contributor Author

gregw commented Jun 27, 2022

@sbordet , @lorban, @lachlan-roberts, @gregw can one of us investigate this

lachlan-roberts added a commit that referenced this issue Jun 28, 2022
lachlan-roberts added a commit that referenced this issue Jul 4, 2022
Signed-off-by: Lachlan Roberts <[email protected]>
sbordet added a commit that referenced this issue Aug 4, 2022
…#8215)

Now all the logic for completion is in lockedOnComplete().

Avoid throwing in ChannelCallback.succeeded() if HttpChannelState._error != null.
This is necessary because HttpChannelState._error may be set asynchronously by
some event such as HTTP/2 reset streams or idle timeouts, but if there is a
thread dispatched to the application the asynchronous event will not fail the
callback, as the failure may be noticed by the application (e.g. via a read() call).

Fixed TrailersTest.testHandlerRequestTrailers() by avoid reading again after
having read the trailers.

Signed-off-by: Lachlan Roberts <[email protected]>
Signed-off-by: Simone Bordet <[email protected]>
Co-authored-by: Simone Bordet <[email protected]>
@olamy olamy moved this to To do in Jetty 12.0.ALPHAS Sep 7, 2022
@joakime joakime moved this to 🏗 In progress in Jetty 12.0.0.beta0 - FROZEN Jan 12, 2023
@joakime
Copy link
Contributor

joakime commented Jan 25, 2023

PR #9090 is the last thing keeping this issue open.

@gregw gregw closed this as completed Feb 2, 2023
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Jetty 12.0.0.beta0 - FROZEN Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For general bugs on Jetty side
Projects
None yet
2 participants