-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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 client calls onDataAvailable with producing thread #8887
Comments
Note that if somehow the |
An analysis with @sbordet and @lorban reveal that this issue is at least partially caused by a bad test, which was always demanding in onDataAvailable, even if EOF had been reached. That was always going to loop forever, but in this case the loop happened on the selector thread. Commit a812b86 fixes the test. However, this issue is still left open, as we should not be calling application code from a producing thread in HTTP2 |
…read. Now the calls to the upper layer produce tasks that are fed to the ExecutionFactory in HTTP2Connection. Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
@gregw a fix is in #11429 but only for the upper HTTP layer. The reason is that to make this work in the low HTTP/2 layer I would have to change the signature of many HTTP/2 low level API methods. So the contract would be that the low layer must always be non-blocking, but the upper layer may be blocking as internally we can wrap the calls to the upper layer to return a |
…read. Now the calls to the upper layer produce tasks that are fed to the ExecutionFactory in HTTP2Connection. Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Jetty version(s)
12
Description
The HttpClient is calling onDataAvailable from within the parser, which is called from the producing thread. This can be the last producing thread in the selector and it is invoked with
invokeNonBlocking
, yet it still blocks.The producer should not call application code. It should produce tasks which call application code.
The following stack illustrates the problem and is from org.eclipse.jetty.http2.tests.ReverseProxyTest#testServerBigDownloadSlowClient
How to reproduce?
org.eclipse.jetty.http2.tests.ReverseProxyTest#testServerBigDownloadSlowClient
The text was updated successfully, but these errors were encountered: