You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Sidney Borne (JIRA)" <ji...@apache.org> on 2018/04/19 11:43:00 UTC
[jira] [Created] (THRIFT-4559) TSSLServerSocket incorrectly prints
errors
Sidney Borne created THRIFT-4559:
------------------------------------
Summary: TSSLServerSocket incorrectly prints errors
Key: THRIFT-4559
URL: https://issues.apache.org/jira/browse/THRIFT-4559
Project: Thrift
Issue Type: Bug
Components: C++ - Library
Affects Versions: 0.11.0
Environment: Ubuntu Linux 16.04 with Thrift 0.11.0
Reporter: Sidney Borne
Attachments: 0001-maybe-fixes-things.patch
Tested on both 0.11.0 and master.
C++ Server, Python Client. SSL sockets. SSL works correctly and communication is successful, however when the client disconnects the server always prints the following message:
{{Thrift: Tue Apr 17 15:43:36 2018 TConnectedClient died: SSL_read: error code: 0 (SSL_error_code = 5)}}
Deeper diving shows that SSL_error_code 5 is SSL_ERROR_SYSCALL. Documentation says to check both errno and the SLL error stack, however upon inspection both return 0 (no error). I believe this message is printed incorrectly.
Upon inspecting the code for handing SSL_read, it appears that reading is done in a while-loop, which if no error is found is broken out of. At some point a switch-case was added, but the single level of break statements remained, leaving non-errors to break out of the switch instead of the while.
A potential fix can be seen here: https://github.com/Sidneys1/thrift/commit/9d3c2b26e18a3e6f0a787446ea4e1c7d7381e2b6
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)