https://issues.apache.org/bugzilla/show_bug.cgi?id=54963

            Bug ID: 54963
           Summary: Concurrent issue of Spdy/NetSupportSocket
           Product: Tomcat 8
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Connectors
          Assignee: dev@tomcat.apache.org
          Reporter: xs...@ebay.com
    Classification: Unclassified

Created attachment 30280
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=30280&action=edit
Patch for NetSupportSocket

Duplicated Threads were started for doing "onBlockingSocket" in
NetSupportSocket.java

When a socket is coming, Listener creates a Runnable and executes the runnable
with Thread Pool.  

In "onAccept", it invokes the method "onBlockingSocket". And the same method
will be invoked in "ctx.getExecutor().execute(ch.inputThread);" as well.

It means there are two threads work on one sinle Socket.  This cause concurrent
issue.

Here is the orginal code,


    @Override
    public void onAccept(Object socket) {
        SpdyConnectionSocket ch = new SpdyConnectionSocket(ctx, (Socket)
socket);
        ctx.getExecutor().execute(ch.inputThread);
        ch.onBlockingSocket();
    }

Just remove the line "ctx.getExecutor().execute(ch.inputThread);" will fix this
issue.

-- 
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