-
Notifications
You must be signed in to change notification settings - Fork 38.5k
SSE: Terminating chunk not sent using tomcat >= 8.0.35 [SPR-14444] #19014
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
Comments
Johannes Edmeier commented p.s. moving back to tomcat 8.0.33 fixes the issue... |
Rossen Stoyanchev commented According to the stack trace, Can you provide some more details? What does the controller method look like? Is this happening on the initial request to the controller method, or after a few events? Or if you have a small repro project... |
Johannes Edmeier commented
https://tomcat.apache.org/tomcat-8.0-doc/changelog.html
|
Rossen Stoyanchev commented I've created basic repro project https://github.com/spring-projects/spring-framework-issues/tree/master/SPR-14444 to demonstrate the issue. When the async request times out, an error dispatch is issued to Boot's error controller, and that's when the failure occurs. According to the Servlet spec asyncStarted should be false after the request that called startAsync exits but it doesn't mention error dispatches explicitly. I've sent an email to the Tomcat dev list to probe if this is expected. Also for what it's worth Jetty doesn't have this issue. |
Juergen Hoeller commented Can we be more defensive, i.e. not throw an |
Rossen Stoyanchev commented Yes in fact we will have to be. There is no interest in changing the behavior on Tomcat's side, see http://markmail.org/thread/54jris7yp74pneox. |
Juergen Hoeller commented Rossen Stoyanchev, does your recent commit sufficiently address the issue already? Is it good enough to simply remove that assertion? |
Rossen Stoyanchev commented I've removed the assertion. Johannes Edmeier, there is now a 4.2.8.BUILD-SNAPSHOT, if you could please give that a try. |
Rossen Stoyanchev commented Juergen Hoeller yes I think it is good enough to remove the assertion. We are simply getting out of the way. In any case we don't know how the application wants to handle the error dispatch. If the thread simply exits without any further handling, then the async request should complete automatically. I did try with a sample application the above scenario and SSE polling continues without any errors in the logs. |
Juergen Hoeller commented OK, let's optimistically mark this issue as resolved then. |
Johannes Edmeier commented I gave 4.2.8-BUILD-SNAPSHOT and 4.3.2-BUILD-SNAPSHOT a try. Both looking good. The errors in the browser and the exception on the server doesn't occur anymore. Good Job! Thank you. |
dilbert side commented I guess the issue is not working yet with version Spring Framework 4.3.3.RELEASE and Tomcat 8.5.5, or we face a border-line situation with docker. In an example project I tweaked git pull https://github.com/dilbertside/compose-spring-boot-admin.git if you remove the class override configureAsyncSupport(AsyncSupportConfigurer configurer) added in dilbertside/compose-spring-boot-admin@861a0de Raising the timeout value and handleTimeout in registerDeferredResultInterceptors doesn't show the exception any-more. If you think my report is not related to this issue, I can file a new issue report. Thank you. |
dilbert side commented It looks like the above related issue is instead addressed by #19305 and codecentric/spring-boot-admin#286 |
Johannes Edmeier opened SPR-14444 and commented
Since tomcat version 8.0.35 chrome complains about an
net::ERR_INCOMPLETE_CHUNKED_ENCODING
error. When you have a look in tcpdump you can see that the terminating chunk with size zero is missing and the tcp connection gets closed. Also a exception is thrown on the server side (for the next polling request?).A tcp dump for wireshark is attached.
Affects: 4.2.7
Attachments:
Backported to: 4.2.8
0 votes, 5 watchers
The text was updated successfully, but these errors were encountered: