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 2013/07/09 14:39:48 UTC

[Bug 55221] New: [websocket] Session is closed without notification

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

            Bug ID: 55221
           Summary: [websocket] Session is closed without notification
           Product: Tomcat 8
           Version: trunk
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: s.boshev@gmail.com

I am trying to retest the scenario described in bug#55200 after that bug was
fixed. Now I can see the session is being silently closed without any
notification after several thousands messages were sent. 
I could not find any errors in the logs as well.

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


[Bug 55221] [websocket] Session is closed without notification

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55221

Stoyan Boshev <s....@gmail.com> changed:

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

--- Comment #1 from Stoyan Boshev <s....@gmail.com> ---
I think I found where the problem is. 
The bug is in WsSession.sendCloseMessage(). 
This method creates a ByteBuffer with size 125, but the closeReason which is
added in this buffer may be way beyond this limit. In such case it will throw
BufferOverflowException and cause the handlers not being notified.
Perhaps the close reason needs to be truncated in order to fit the maximum
limit of the buffer.

In my case the close reason was "Unable to complete read due to destination
buffer overflow. Destination is [8,192] bytes in size and currently contains
[0] bytes."

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


[Bug 55221] [websocket] Session is closed without notification

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55221

--- Comment #2 from Mark Thomas <ma...@apache.org> ---
I've fixed the immediate issue in trunk and provided some more information in
the message. I'll look into truncating overly long close reasons.

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


[Bug 55221] [websocket] Session is closed without notification

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55221

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Mark Thomas <ma...@apache.org> ---
I've added truncation of the close reason phrase. Any reason > 123 bytes in
length (the first two bytes are the clse code) is truncated at a character
boundary to 120 characters or less and an ellipsis is appended to indicate that
the message has been truncated.

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