[
https://issues.apache.org/jira/browse/THRIFT-1931?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
James E. King, III resolved THRIFT-1931.
----------------------------------------
Resolution: Not A Bug
Working as designed.
> Sending a frame size of zero to a TNonblockingServer causes an assertion
> failure
> --------------------------------------------------------------------------------
>
> Key: THRIFT-1931
> URL: https://issues.apache.org/jira/browse/THRIFT-1931
> Project: Thrift
> Issue Type: Bug
> Components: C++ - Library
> Affects Versions: 0.9
> Environment: Ubuntu 10.04 and 12.04, both 64-bit
> Reporter: Martin Michelsen
> Assignee: James E. King, III
> Labels: TNonblockingServer
>
> TNonblockingServer::TConnection::workSocket doesn't check if readWant_ is
> zero before returning. Sending a frame with a size of zero leads to an
> assertion failure:
> {{src/thrift/server/TNonblockingServer.cpp:494: void
> apache::thrift::server::TNonblockingServer::TConnection::workSocket():
> Assertion `readBufferPos_ < readWant_' failed.}}
> (You can reproduce this behavior on a TNonblockingServer by doing {{echo -e
> '\0\0\0\0' | nc server port}}.)
> It can probably be fixed by checking if readWant_ is zero before the
> transition() call in workSocket, and disconnecting the client if so (just
> like what happens if readWant_ is too large). Not sure if this is necessarily
> the right thing to do though.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)