https://bz.apache.org/bugzilla/show_bug.cgi?id=59398

james.s...@metaswitch.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|INVALID                     |---
             Status|RESOLVED                    |REOPENED

--- Comment #4 from james.s...@metaswitch.com ---
So I've done some more digging into this and the issue is that
org.apache.coyote.http11.InternalAprOutputBuffer.recycle is not synchronized.
This leaves the door open to the bytebuffer and socket being reset while data
is being written to the socket by
org.apache.coyote.http11.InternalAprOutputBuffer.writeToSocket, which is
synchronized, and this is what was biting me. So I propose the following fix:

--- tomcat-8-28-src/java/org/apache/coyote/http11/InternalAprOutputBuffer.java
(revision 10252)
+++ tomcat-8-28-src/java/org/apache/coyote/http11/InternalAprOutputBuffer.java
(working copy)
@@ -105,7 +105,7 @@
      * connection.
      */
     @Override
-    public void recycle() {
+    public synchronized void recycle() {

         super.recycle();


Note that I've checked and this method is not synchronized in tomcat 8.0.33 or
8.5 but I believe it should be. This is the first patch I've tried to submit to
tomcat so apologies if there is some process I've not followed (and if this is
the case please point me at it and I'll be happy to follow it!).

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to