https://bz.apache.org/bugzilla/show_bug.cgi?id=69982
--- Comment #5 from Phil Clay <[email protected]> --- Made some progress. I modified SecureNioChannel to perform some more logging for both 10.1.52 and 11.0.18 https://github.com/philsttr/tomcat/compare/10.1.52...10.1.52.flushlogs https://github.com/philsttr/tomcat/compare/11.0.18...11.0.18.flushlogs I enabled logging for: org.apache.tomcat: TRACE org.apache.coyote: TRACE _org.springframework.http.server.reactive.AbstractListenerReadPublisher: TRACE _org.springframework.http.server.reactive.AbstractListenerWriteProcessor: TRACE _org.springframework.http.server.reactive.AbstractListenerWriteFlushProcessor: TRACE _org.springframework.http.server.reactive: TRACE I ran tests for 10.1.52 (plus additional logging) and 11.0.18 (plus additional logging). Logs and packet captures are available here: https://github.com/philsttr/tomcat_11_delayed_response/tree/main/logs/withAdditionalLogs I've noticed a difference in the two when writing the response. I've annotated the failure case in tomcat11.0.18.flushlogs-SNAPSHOT.2.log with some comments. ---------- In Tomcat 10, while the response is being written: 1. Spring starts writing the response 2. Something detects that writing is no longer possible (presumably because the client's TCP window has filled up) 3. The following log line is written "Registered write interest for..." 4. A few lines later, writing becomes possible again, and the remainder of the response is written, and Spring flushes the stream. Also note that when writing ciphertext to the socket, buffers are always completely written. i.e. afterRemaining=0 ---------- In Tomcat 11, during the failure case at the bottom of tomcat11.0.18.flushlogs-SNAPSHOT.2.log, while the response is being written: 1. Spring starts writing the response 2. Nothing detects that writing is no longer possible 3. No log line for "Registered write interest for..." is written (at least, not while writing the response) 4. buffered ciphertext is not completely written to the socket (afterRemaining=1904) 5. Spring flushes the stream, but SecureNioChannel still fails to write ciphertext to the socket (afterRemaining=1904 again) 6. 20s pause 7. keepAliveTimeout elapses, and the remaining buffered ciphertext is written to the socket, and the socket closed. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
