You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Bryan Duxbury (JIRA)" <ji...@apache.org> on 2008/07/10 21:54:33 UTC
[jira] Created: (THRIFT-73) TNonblockingServer loses client sockets
permanently if wire data is corrupt
TNonblockingServer loses client sockets permanently if wire data is corrupt
---------------------------------------------------------------------------
Key: THRIFT-73
URL: https://issues.apache.org/jira/browse/THRIFT-73
Project: Thrift
Issue Type: Bug
Components: Library (Java)
Reporter: Bryan Duxbury
Assignee: Bryan Duxbury
Attachments: thrift-73.patch
We currently have a problem where some bad messages are getting sent through to one of our servers. It results in an unhandled exception in FrameBuffer.invoke, which kills the worker thread but fails to close that socket. The result is a hung client, perpetually waiting for the server to start writing.
The server should be resilient to such message corruption issues and close the client socket.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-73) TNonblockingServer loses client
sockets permanently if wire data is corrupt
Posted by "David Reiss (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12612703#action_12612703 ]
David Reiss commented on THRIFT-73:
-----------------------------------
I'm no nio expert, but this looks good to me, so I can commit it if no one objects (and you write the commit message :)). One tiny thing that might help would be a comment right before "state_ = AWAITING_CLOSE;" to remind the reader that this code only executes in the exception case.
> TNonblockingServer loses client sockets permanently if wire data is corrupt
> ---------------------------------------------------------------------------
>
> Key: THRIFT-73
> URL: https://issues.apache.org/jira/browse/THRIFT-73
> Project: Thrift
> Issue Type: Bug
> Components: Library (Java)
> Reporter: Bryan Duxbury
> Assignee: Bryan Duxbury
> Attachments: thrift-73.patch
>
>
> We currently have a problem where some bad messages are getting sent through to one of our servers. It results in an unhandled exception in FrameBuffer.invoke, which kills the worker thread but fails to close that socket. The result is a hung client, perpetually waiting for the server to start writing.
> The server should be resilient to such message corruption issues and close the client socket.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (THRIFT-73) TNonblockingServer loses client
sockets permanently if wire data is corrupt
Posted by "David Reiss (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-73?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Reiss resolved THRIFT-73.
-------------------------------
Resolution: Fixed
> TNonblockingServer loses client sockets permanently if wire data is corrupt
> ---------------------------------------------------------------------------
>
> Key: THRIFT-73
> URL: https://issues.apache.org/jira/browse/THRIFT-73
> Project: Thrift
> Issue Type: Bug
> Components: Library (Java)
> Reporter: Bryan Duxbury
> Assignee: Bryan Duxbury
> Attachments: thrift-73-v2.patch, thrift-73.patch
>
>
> We currently have a problem where some bad messages are getting sent through to one of our servers. It results in an unhandled exception in FrameBuffer.invoke, which kills the worker thread but fails to close that socket. The result is a hung client, perpetually waiting for the server to start writing.
> The server should be resilient to such message corruption issues and close the client socket.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (THRIFT-73) TNonblockingServer loses client sockets
permanently if wire data is corrupt
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-73?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury updated THRIFT-73:
--------------------------------
Attachment: thrift-73.patch
This patch adds the correct error handling code to do the right thing in the face of unexpected exceptions when processing an invocation.
> TNonblockingServer loses client sockets permanently if wire data is corrupt
> ---------------------------------------------------------------------------
>
> Key: THRIFT-73
> URL: https://issues.apache.org/jira/browse/THRIFT-73
> Project: Thrift
> Issue Type: Bug
> Components: Library (Java)
> Reporter: Bryan Duxbury
> Assignee: Bryan Duxbury
> Attachments: thrift-73.patch
>
>
> We currently have a problem where some bad messages are getting sent through to one of our servers. It results in an unhandled exception in FrameBuffer.invoke, which kills the worker thread but fails to close that socket. The result is a hung client, perpetually waiting for the server to start writing.
> The server should be resilient to such message corruption issues and close the client socket.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (THRIFT-73) TNonblockingServer loses client sockets
permanently if wire data is corrupt
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-73?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury updated THRIFT-73:
--------------------------------
Attachment: thrift-73-v2.patch
Here's a version with a teensy comment about flow.
Commit message:
THRIFT-73: java: fixed a bug where TNonblockingServer (and by extension THsHaServer) could permanently lose track of client connections if the message on-wire was malformed. If the client sends a bad message now, the server will close the transport at its earliest convenience.
> TNonblockingServer loses client sockets permanently if wire data is corrupt
> ---------------------------------------------------------------------------
>
> Key: THRIFT-73
> URL: https://issues.apache.org/jira/browse/THRIFT-73
> Project: Thrift
> Issue Type: Bug
> Components: Library (Java)
> Reporter: Bryan Duxbury
> Assignee: Bryan Duxbury
> Attachments: thrift-73-v2.patch, thrift-73.patch
>
>
> We currently have a problem where some bad messages are getting sent through to one of our servers. It results in an unhandled exception in FrameBuffer.invoke, which kills the worker thread but fails to close that socket. The result is a hung client, perpetually waiting for the server to start writing.
> The server should be resilient to such message corruption issues and close the client socket.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (THRIFT-73) TNonblockingServer loses client sockets
permanently if wire data is corrupt
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-73?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury updated THRIFT-73:
--------------------------------
Patch Info: [Patch Available]
> TNonblockingServer loses client sockets permanently if wire data is corrupt
> ---------------------------------------------------------------------------
>
> Key: THRIFT-73
> URL: https://issues.apache.org/jira/browse/THRIFT-73
> Project: Thrift
> Issue Type: Bug
> Components: Library (Java)
> Reporter: Bryan Duxbury
> Assignee: Bryan Duxbury
> Attachments: thrift-73.patch
>
>
> We currently have a problem where some bad messages are getting sent through to one of our servers. It results in an unhandled exception in FrameBuffer.invoke, which kills the worker thread but fails to close that socket. The result is a hung client, perpetually waiting for the server to start writing.
> The server should be resilient to such message corruption issues and close the client socket.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.