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

            Bug ID: 58624
           Summary: Websocket send blocks indefinitely in
                    FutureToSendHandler
           Product: Tomcat 8
           Version: 8.0.24
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: WebSocket
          Assignee: dev@tomcat.apache.org
          Reporter: b.coughl...@gmail.com

- Tomcat 8.0.24
- APR connector disabled, using the NIO connector
- SSL is on
- Encoder is of type Encoder.Text<Object>

We found this during load tests, it only happened to one message out of
millions but there is nothing special about that message.

We have a class that wraps javax.websocket.RemoteEndpoint.Basic to ensure that
it's thread-safe - so messages are never sent from multiple threads on one
socket.

The FutureToSendHandler gets stuck waiting for the call to onResult. Looking at
the code, logically sendStringByCompletion(msg, completion)
(WsRemoteEndpoint.java:573) must not call the onResult for some code path. I am
trying to figure out where but no luck so far.

This is the first time we have seen this problem over many load tests so
unfortunately we can't try to replicate on the latest at the moment.

"defaultEventExecutorGroup-3-18" - Thread t@61
   java.lang.Thread.State: WAITING
    at sun.misc.Unsafe.park(Native Method)
    - parking to wait for <2fcb7fa> (a
java.util.concurrent.CountDownLatch$Sync)
    at java.util.concurrent.locks.LockSupport.park(Unknown Source)
    at
java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(Unknown
Source)
    at
java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(Unknown
Source)
    at
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(Unknown
Source)
    at java.util.concurrent.CountDownLatch.await(Unknown Source)
    at
org.apache.tomcat.websocket.FutureToSendHandler.get(FutureToSendHandler.java:76)
    at
org.apache.tomcat.websocket.FutureToSendHandler.get(FutureToSendHandler.java:31)
    at
org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendObject(WsRemoteEndpointImplBase.java:521)
    at
org.apache.tomcat.websocket.WsRemoteEndpointBasic.sendObject(WsRemoteEndpointBasic.java:74)
        ...

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