thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sidney Borne (JIRA)" <>
Subject [jira] [Created] (THRIFT-4559) TSSLServerSocket incorrectly prints errors
Date Thu, 19 Apr 2018 11:43:00 GMT
Sidney Borne created THRIFT-4559:

             Summary: TSSLServerSocket incorrectly prints errors
                 Key: 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:

This message was sent by Atlassian JIRA

View raw message