Skip to content

Conversation

lorban
Copy link
Contributor

@lorban lorban commented Jun 2, 2025

The problem is that HttpReceiverOverHTTP.parse() calls responseSuccess() assuming that this method will queue its task into the HttpReceiver's serialized executor for later execution.

Unfortunately, if Response.Listener.onContentSource() spawns a thread that does the usual read/demand loop on the given Content.Source instance, HttpReceiverOverHTTP.parse()'s call to responseSuccess() immediately executes the task which calls HttpReceiver.reset() before returning. This means that the Content.Source.read() call that initiated the HttpReceiverOverHTTP.parse() call does not see the EOF chunk but null, so it thinks it must demand while responseSuccess() already called receiveNext() which also did demand.

Fixes #13177

@lorban lorban changed the title try forcing the chunk back to EOF after responseSuccess() Fix ReadPendingException warning Jun 2, 2025
lorban added 3 commits June 2, 2025 16:32
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
@lorban lorban force-pushed the experiment/jetty-12.0.x/13177-ReadPendingException branch from 1fa8f47 to 8fa46e2 Compare June 3, 2025 15:29
@lorban lorban self-assigned this Jun 3, 2025
@lorban lorban added the Bug For general bugs on Jetty side label Jun 3, 2025
@lorban lorban moved this to 🏗 In progress in Jetty 12.0.23 - FROZEN Jun 3, 2025
lorban added 3 commits June 5, 2025 10:42
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
lorban added 2 commits June 9, 2025 15:08
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
@lorban lorban marked this pull request as ready for review June 9, 2025 13:11
@lorban lorban requested a review from sbordet June 9, 2025 13:11
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
lorban added 3 commits June 11, 2025 10:33
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
…k on client

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
@lorban lorban requested a review from sbordet June 11, 2025 09:09
@lorban lorban merged commit dd45eef into jetty-12.0.x Jun 12, 2025
10 checks passed
@lorban lorban deleted the experiment/jetty-12.0.x/13177-ReadPendingException branch June 12, 2025 11:22
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Jetty 12.0.23 - FROZEN Jun 12, 2025
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
No open projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Avoid to log a warning when unneeded in org.eclipse.jetty.io.FillInterest#register/org.eclipse.jetty.io.FillInterest#tryRegister
2 participants