Vladimir Nevzorov created THRIFT-4888:
-----------------------------------------

             Summary: TSSLSocket::close() server crash
                 Key: THRIFT-4888
                 URL: https://issues.apache.org/jira/browse/THRIFT-4888
             Project: Thrift
          Issue Type: Bug
          Components: C++ - Library
    Affects Versions: 0.10.0
            Reporter: Vladimir Nevzorov


*Client* gets info from the server and terminates succesfully.

But *Server* crashes when *client* _TBufferedTransport_ calls close().

 

Client code:
{code:java}
int main() {
    std::cout << "C++ client in network mode start..." << std::endl;

    shared_ptr<AllowAllAccessManager> acc_mgr(new AllowAllAccessManager());
    shared_ptr<apache::thrift::transport::TSSLSocketFactory> 
ssl_tx_transp_factory(
        new qkd_api_client::SSLSocketTransportFactory(CLIENT_TX_CERT_PATH,
                                      CLIENT_TX_KEY_PATH,
                                      TRUSTED_CA_PATH,
                                      acc_mgr)
    );

    shared_ptr<TBufferedTransport> transp_tx(
            new 
TBufferedTransport(ssl_tx_transp_factory->createSocket(TX_SERVER_ADDR, 
SERVER_PORT)));

    auto client_tx = 
qkd_network_api::v1::NetworkApiServiceClient(boost::shared_ptr<TProtocol>(new 
TBinaryProtocol(transp_tx)));

    try {
        transp_tx->open();

        qkd_network_api::v1::Info info_tx;
        client_tx.get_by_length(info_tx, 22, 33);

        transp_tx->close()
...
{code}
 

Server output:
{code:java}
write 0x00007f2a0992c1cd
<unknown> 0x00007f2a07d65d05
BIO_write 0x00007f2a07d607cb
<unknown> 0x00007f2a08165c9b
<unknown> 0x00007f2a081664d0
<unknown> 0x00007f2a0816e9b1
<unknown> 0x00007f2a0816ce05
SSL_shutdown 0x00007f2a081770c9
apache::thrift::transport::TSSLSocket::close 0x00007f2a0842aa51
apache::thrift::server::TConnectedClient::cleanup 0x00007f2a08433196
apache::thrift::server::TConnectedClient::run 0x00007f2a08432d65
apache::thrift::server::TThreadedServer::TConnectedClientRunner::run 
0x00007f2a0843a5f8
apache::thrift::concurrency::PthreadThread::threadMain 0x00007f2a0843e5ff
start_thread 0x00007f2a099234a4
clone 0x00007f2a051e2d0f
{code}
 

If client open() and close() transport without calling interface method - 
server works fine.

 

When I use python client - all works fine.

 

Help me, please.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to