You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2015/11/18 16:41:37 UTC

[Bug 58624] Websocket send blocks indefinitely in FutureToSendHandler

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

Barry Coughlan <b....@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #1 from Barry Coughlan <b....@gmail.com> ---
I mistakenly thought that packets sent with getBasicRemote() were sent on the
same thread.

To add, all of the threads for sending messages are in the state of waiting for
tasks - none of them are blocked:

"WebSocketServer-localhost-/MyApp-1453" - Thread t@13892
   java.lang.Thread.State: TIMED_WAITING
    at sun.misc.Unsafe.park(Native Method)
    - parking to wait for <785b947d> (a
java.util.concurrent.SynchronousQueue$TransferStack)
    at java.util.concurrent.locks.LockSupport.parkNanos(Unknown Source)
    at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(Unknown
Source)
    at java.util.concurrent.SynchronousQueue$TransferStack.transfer(Unknown
Source)
    at java.util.concurrent.SynchronousQueue.poll(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

   Locked ownable synchronizers:
    - None

Some other things that might be relevant from looking at the code:
- We don't call the sendPing() or sendText() methods, only sendObject().
- We don't use partial message decoding/encoding.
- Batching is not enabled.
- Looking at a heap dump, the only reference to the FutureSendHandler from the
stuck thread is in the ConcurrentHashMap in
org.apache.tomcat.websocket.WsSession.futures

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

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