divyang4481 / rcf-cpp

Automatically exported from code.google.com/p/rcf-cpp
0 stars 0 forks source link

Problems with SSL filters #34

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Can you please help me out to resolve this problem on using SSL(OpenSSL) 
transport filter?
I'm tring to send 512KB of data to server, and receive back the same amount of 
data.

Thanks.

Setup of SSL filter on client:
filterPtr.reset( new RCF::OpenSslEncryptionFilter(
        clientCert,
        clientCertPass,
        caCert);

getClientStub().requestTransportFilters(filterPtr);

Setup of SSL service and filter on server:
    filterServicePtr = RCF::FilterServicePtr(new RCF::FilterService());

    server.addService(filterServicePtr);

    filterServicePtr->addFilterFactory(
        RCF::FilterFactoryPtr( new RCF::OpenSslEncryptionFilterFactory(
        serverCert,
        serverCertPass,
        caCert)));

and remote call looks like this:

    BOOL processCmd(std::string &s)
    {
        if(IsTransportSecured(RCF::getCurrentRcfSession()))
        {       
            cout << "ByteBuffer has been received" << endl;
            char *bufToSend = new char[512*1024];
            memset(bufToSend, 0, 512*1024);

            for(int i = 0; i < 512*1024; i++)
            {
                srand(i);
                bufToSend[i] = rand(); 
            }

            s = std::string(bufToSend, 512*1024);
            return TRUE;
        }
        else
        {
            RCF::getCurrentRcfSession().disconnect();
        }

        return FALSE;
    }

First of all I get the assert window with the following info:
---------------------------
Microsoft Visual C++ Debug Library
---------------------------
Debug Assertion Failed!

Program: d:\samples\RFC_PipeTestSSL\Debug\RCF_SERVER.exe
File: c:\program files\microsoft visual studio 9.0\vc\include\vector
Line: 70

Expression: ("_Pvector == NULL || (((_Myvec *)_Pvector)->_Myfirst <= _Ptr && 
_Ptr <= ((_Myvec *)_Pvector)->_Mylast)", 0)

For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.

and the following server call stack:
>   RCF_SERVER.exe!std::_Vector_const_iterator<RCF::ByteBuffer,std::allocator<RCF:
:ByteBuffer> 
>::_Vector_const_iterator<RCF::ByteBuffer,std::allocator<RCF::ByteBuffer> 
>(RCF::ByteBuffer * _Ptr=0x02170d30, const std::_Container_base_secure * 
_Pvector=0x0214c438)  Line 70 + 0x3d bytes  C++
    RCF_SERVER.exe!std::_Vector_iterator<RCF::ByteBuffer,std::allocator<RCF::ByteBuffer> >::_Vector_iterator<RCF::ByteBuffer,std::allocator<RCF::ByteBuffer> >(RCF::ByteBuffer * _Ptr=0x02170d30, const std::_Container_base_secure * _Pvector=0x0214c438)  Line 322    C++
    RCF_SERVER.exe!std::vector<RCF::ByteBuffer,std::allocator<RCF::ByteBuffer> >::_Make_iter(std::_Vector_const_iterator<RCF::ByteBuffer,std::allocator<RCF::ByteBuffer> > _Where={npos=4294967295 mSpvc={...} mSpos={...} ...})  Line 661 + 0x10 bytes C++
    RCF_SERVER.exe!std::vector<RCF::ByteBuffer,std::allocator<RCF::ByteBuffer> >::erase(std::_Vector_const_iterator<RCF::ByteBuffer,std::allocator<RCF::ByteBuffer> > _First_arg={npos=4294967295 mSpvc={...} mSpos={...} ...}, std::_Vector_const_iterator<RCF::ByteBuffer,std::allocator<RCF::ByteBuffer> > _Last_arg={npos=4294967295 mSpvc={...} mSpos={...} ...})  Line 1030 + 0x26 bytes  C++
    RCF_SERVER.exe!std::vector<RCF::ByteBuffer,std::allocator<RCF::ByteBuffer> >::resize(unsigned int _Newsize=0, RCF::ByteBuffer _Val={...})  Line 721 + 0xd3 bytes    C++
    RCF_SERVER.exe!std::vector<RCF::ByteBuffer,std::allocator<RCF::ByteBuffer> >::resize(unsigned int _Newsize=0)  Line 713 + 0x53 bytes    C++
    RCF_SERVER.exe!RCF::OpenSslEncryptionFilterImpl::transferData()  Line 523   C++
    RCF_SERVER.exe!RCF::OpenSslEncryptionFilterImpl::retryReadWrite()  Line 463 + 0x8 bytes C++
    RCF_SERVER.exe!RCF::OpenSslEncryptionFilterImpl::onReadWriteCompleted(unsigned int bytesTransferred=2048)  Line 372 C++
    RCF_SERVER.exe!RCF::OpenSslEncryptionFilter::onWriteCompleted(unsigned int bytesTransferred=2048)  Line 243 C++
    RCF_SERVER.exe!RCF::FilterProxy::onWriteCompleted(unsigned int bytesTransferred=2048)  Line 237 + 0x3f bytes    C++
    RCF_SERVER.exe!RCF::IocpSessionState::onReadWriteCompleted(unsigned int bytesTransferred=2048)  Line 461 + 0x61 bytes   C++
    RCF_SERVER.exe!RCF::IocpSessionState::onCompletion(int ret=1, unsigned long dwErr=0, unsigned long completionKey=0, unsigned long dwNumBytes=2048)  Line 977    C++
    RCF_SERVER.exe!RCF::Iocp::cycle(int timeoutMs=1000)  Line 158 + 0x1f bytes  C++
    RCF_SERVER.exe!RCF::ThreadPool::cycle(int timeoutMs=1000, RCF::ShouldStop & shouldStop={...})  Line 485 C++
    RCF_SERVER.exe!RCF::ThreadPool::repeatTask(boost::shared_ptr<RCF::ThreadInfo> threadInfoPtr={...}, int timeoutMs=1000, const bool & stopFlag=false)  Line 510   C++
    RCF_SERVER.exe!boost::_mfi::mf3<void,RCF::ThreadPool,boost::shared_ptr<RCF::ThreadInfo>,int,bool const volatile &>::operator()(RCF::ThreadPool * p=0x02148158, boost::shared_ptr<RCF::ThreadInfo> a1={...}, int a2=1000, const bool & a3=false)  Line 393 + 0x2c bytes  C++
    RCF_SERVER.exe!boost::_bi::list4<boost::_bi::value<RCF::ThreadPool *>,boost::_bi::value<boost::shared_ptr<RCF::ThreadInfo> >,boost::_bi::value<int>,boost::reference_wrapper<bool const volatile > >::operator()<boost::_mfi::mf3<void,RCF::ThreadPool,boost::shared_ptr<RCF::ThreadInfo>,int,bool const volatile &>,boost::_bi::list0>(boost::_bi::type<void> __formal={...}, boost::_mfi::mf3<void,RCF::ThreadPool,boost::shared_ptr<RCF::ThreadInfo>,int,bool const volatile &> & f={...}, boost::_bi::list0 & a={...}, boost::_bi::type<void> __formal={...})  Line 458 C++
    RCF_SERVER.exe!boost::_bi::bind_t<void,boost::_mfi::mf3<void,RCF::ThreadPool,boost::shared_ptr<RCF::ThreadInfo>,int,bool const volatile &>,boost::_bi::list4<boost::_bi::value<RCF::ThreadPool *>,boost::_bi::value<boost::shared_ptr<RCF::ThreadInfo> >,boost::_bi::value<int>,boost::reference_wrapper<bool const volatile > > >::operator()()  Line 21   C++
    RCF_SERVER.exe!boost::detail::function::void_function_obj_invoker0<boost::_bi::bind_t<void,boost::_mfi::mf3<void,RCF::ThreadPool,boost::shared_ptr<RCF::ThreadInfo>,int,bool const volatile &>,boost::_bi::list4<boost::_bi::value<RCF::ThreadPool *>,boost::_bi::value<boost::shared_ptr<RCF::ThreadInfo> >,boost::_bi::value<int>,boost::reference_wrapper<bool const volatile > > >,void>::invoke(boost::detail::function::function_buffer & function_obj_ptr={...})  Line 154   C++
    RCF_SERVER.exe!boost::function0<void>::operator()()  Line 1013 + 0x16 bytes C++
    RCF_SERVER.exe!thread_proxy(void * param=0x00d5dfbc)  Line 104  C++
    RCF_SERVER.exe!_callthreadstartex()  Line 348 + 0xf bytes   C
    RCF_SERVER.exe!_threadstartex(void * ptd=0x02149228)  Line 331  C
    kernel32.dll!BaseThreadInitThunk()  + 0x12 bytes    
    [Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]  
    ntdll.dll!RtlInitializeExceptionChain()  + 0x63 bytes   
    ntdll.dll!RtlInitializeExceptionChain()  + 0x36 bytes   

Original issue reported on code.google.com by zoltan.b...@gmail.com on 24 Dec 2010 at 3:36

GoogleCodeExporter commented 9 years ago

I've done some testing, and was able to send 1 MB messages back and forth 
between client and server, with the OpenSSL filter, 100 times, without any 
problems.

I'm using RCF 1.3, which may make a difference. Can you try with 1.3 
(http://deltavsoft.com/w/download.html) , and see if you still get the error?

Original comment by jarl.lin...@gmail.com on 31 Dec 2010 at 2:49

GoogleCodeExporter commented 9 years ago
Then I don't really understand why by disabling OpenSSL transport filters I see 
no problems in the same test application.
Can you please send me your sample client/server implementation which sends 1mb 
of data back and forth over openssl transport filter.
I'm using RCF-1.3 and openssl-0.9.8o.

Thanks.

Original comment by zoltan.b...@gmail.com on 3 Jan 2011 at 7:13

GoogleCodeExporter commented 9 years ago
I've attached the sample code I've used. Look for "// sending large messages".

Original comment by jarl.lin...@gmail.com on 7 Jan 2011 at 12:27

Attachments:

GoogleCodeExporter commented 9 years ago
I get the stack overflow when running your sample.
The exception occurs right when client.echo(s0) is called in "sending large 
messages" block.

Here is the sample output:
Defines:
BOOST_VERSION: 104500
RCF_MAX_METHOD_COUNT: 100
RCF_MULTI_THREADED
RCF_USE_SF_SERIALIZATION
RCF_USE_OPENSSL
RCF_TEMP_DIR:
*********************

and exception:
Unhandled exception at 0x0034e8c9 in RFC_PipeTestSSL.exe: 0xC00000FD: Stack 
overflow.

The stack trace is attached.
I'm using MSVC2008(9.0) with SP1, on Win7, 32 bit.

Original comment by zoltan.b...@gmail.com on 7 Jan 2011 at 9:28

Attachments:

GoogleCodeExporter commented 9 years ago

The test code works on my machines, but there are some environmental 
differences, in particular I don't think we're using the same version of 
OpenSSL.

The stack trace shows pretty clearly what is going on though. I've fixed the 
stack recursion that is causing the overflow - if you apply the attached patch 
to RCF 1.3, it should take care of the issue.

Original comment by jarl.lin...@gmail.com on 9 Jan 2011 at 12:00

Attachments:

GoogleCodeExporter commented 9 years ago
Can you please let me know what OpenSSL version your are using?
Thanks for the patch, I will apply it asap.

Original comment by zoltan.b...@gmail.com on 11 Jan 2011 at 10:47

GoogleCodeExporter commented 9 years ago
I'm using OpenSSL 0.9.7c in my testing environment...

Original comment by jarl.lin...@gmail.com on 12 Jan 2011 at 10:26

GoogleCodeExporter commented 9 years ago
Hello,

The patch did really fix the problem with recursion, thanks.
But I'm having another issue sending big chunks of data over SSL.
Can you please try to split client and server into different projects and run 
separately?
Your OpenSSL filter sample works OK when client/server are started within one 
application. 
But if you try to start them separately the client chokes up with the following 
exception after iterating over several times, sending 1MB data.
Please note I'm using Win32 Named Pipes as a transport.

If I skip the exception below, I get the following error message from the 
client.echo() call:
Failed to echo: [75] Pipe error. OS: 109 - The pipe has been ended.

And here is the stack trace when I get the exception:
    KernelBase.dll!RaiseException()  + 0x54 bytes   
    [Frames below may be incorrect and/or missing, no symbols loaded for KernelBase.dll]    
    msvcr90d.dll!_CxxThrowException(void * pExceptionObject=0x0013bcd0, const _s__ThrowInfo * pThrowInfo=0x01818768)  Line 161  C++
>   RFC_PipeTestSSL.exe!util::detail::InvokeThrow<RCF::Exception>::invoke(const 
std::basic_string<char,std::char_traits<char>,std::allocator<char> > & 
context="d:\dev2008\samples\rcf-1.3\src\rcf\win32namedpipeclienttransport.cpp(30
0): unsigned int __thiscall RCF::Win32NamedPipeClientTransport::implRead(const 
class RCF::ByteBuffer &,unsigned int): : Thread-id=5056 : Timestamp(ms)=9142: : 
", const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & 
args="", int logName=1, int logLevel=1, const char * file=0x017773b8, int 
line=300, const char * func=0x01777918)  Line 83    C++
    RFC_PipeTestSSL.exe!util::ThrowFunctor::~ThrowFunctor()  Line 158 + 0x51 bytes  C++
    RFC_PipeTestSSL.exe!util::VariableArgMacro<util::ThrowFunctor>::~VariableArgMacro<util::ThrowFunctor>()  Line 185 + 0x34 bytes  C++
    RFC_PipeTestSSL.exe!RCF::Win32NamedPipeClientTransport::implRead(const RCF::ByteBuffer & byteBuffer={...}, unsigned int bytesRequested=2048)  Line 300 + 0x15e bytes    C++
    RFC_PipeTestSSL.exe!RCF::ConnectionOrientedClientTransport::read(const RCF::ByteBuffer & byteBuffer_={...}, unsigned int bytesRequested=2048)  Line 310 + 0x1f bytes    C++
    RFC_PipeTestSSL.exe!RCF::ClientFilterProxy::read(const RCF::ByteBuffer & byteBuffer={...}, unsigned int bytesRequested=2048)  Line 41 + 0x4e bytes  C++
    RFC_PipeTestSSL.exe!RCF::OpenSslEncryptionFilterImpl::transferData()  Line 523 + 0x32 bytes C++
    RFC_PipeTestSSL.exe!RCF::applyRecursionLimiter<RCF::RecursionState<int,int>,RCF::OpenSslEncryptionFilterImpl,void (__thiscall RCF::OpenSslEncryptionFilterImpl::*)(void)>(RCF::RecursionState<int,int> & state={...}, void (void)* pfn=0x012391bc, RCF::OpenSslEncryptionFilterImpl & x={...})  Line 116 + 0x8 bytes    C++
    RFC_PipeTestSSL.exe!RCF::OpenSslEncryptionFilterImpl::retryReadWrite()  Line 473 + 0x18 bytes   C++
    RFC_PipeTestSSL.exe!RCF::OpenSslEncryptionFilterImpl::readWrite()  Line 415 C++
    RFC_PipeTestSSL.exe!RCF::OpenSslEncryptionFilterImpl::write(const std::vector<RCF::ByteBuffer,std::allocator<RCF::ByteBuffer> > & byteBuffers=[0]())  Line 354  C++
    RFC_PipeTestSSL.exe!RCF::OpenSslEncryptionFilter::write(const std::vector<RCF::ByteBuffer,std::allocator<RCF::ByteBuffer> > & byteBuffers=[0]())  Line 234  C++
    RFC_PipeTestSSL.exe!RCF::ClientFilterProxy::write(const std::vector<RCF::ByteBuffer,std::allocator<RCF::ByteBuffer> > & byteBuffers=[0]())  Line 48 + 0x26 bytes    C++
    RFC_PipeTestSSL.exe!RCF::ConnectionOrientedClientTransport::issueWrite(const std::vector<RCF::ByteBuffer,std::allocator<RCF::ByteBuffer> > & byteBuffers=[0]())  Line 683 + 0x61 bytes  C++
    RFC_PipeTestSSL.exe!RCF::ConnectionOrientedClientTransport::transition()  Line 747  C++
    RFC_PipeTestSSL.exe!RCF::ConnectionOrientedClientTransport::send(RCF::I_ClientTransportCallback & clientStub={...}, const std::vector<RCF::ByteBuffer,std::allocator<RCF::ByteBuffer> > & data=[0](), unsigned int totalTimeoutMs=3600000)  Line 434    C++
    RFC_PipeTestSSL.exe!RCF::ClientStub::onConnectCompleted(bool alreadyConnected=true)  Line 310 + 0x35 bytes  C++
    RFC_PipeTestSSL.exe!RCF::ClientStub::connect()  Line 170 + 0x11 bytes   C++
    RFC_PipeTestSSL.exe!RCF::ClientStub::send()  Line 362   C++
    RFC_PipeTestSSL.exe!RCF::ClientStub::call(RCF::RemoteCallSemantics rcs=Twoway)  Line 672    C++
    RFC_PipeTestSSL.exe!RCF::FutureImpl<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >::callSync()  Line 2010   C++
    RFC_PipeTestSSL.exe!RCF::FutureImpl<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >::call()  Line 1993   C++
    RFC_PipeTestSSL.exe!RCF::FutureImpl<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >::operator std::basic_string<char,std::char_traits<char>,std::allocator<char> >()  Line 1940  C++
    RFC_PipeTestSSL.exe!test_main(int argc=1, char * * argv=0x00624fe0)  Line 143 + 0x3e bytes  C++
    RFC_PipeTestSSL.exe!main(int argc=1, char * * argv=0x00624fe0)  Line 198 + 0xd bytes    C++
    RFC_PipeTestSSL.exe!__tmainCRTStartup()  Line 586 + 0x19 bytes  C
    RFC_PipeTestSSL.exe!mainCRTStartup()  Line 403  C
    kernel32.dll!BaseThreadInitThunk()  + 0x12 bytes    
    ntdll.dll!RtlInitializeExceptionChain()  + 0x63 bytes   
    ntdll.dll!RtlInitializeExceptionChain()  + 0x36 bytes   

Original comment by zoltan.b...@gmail.com on 14 Feb 2011 at 9:10

GoogleCodeExporter commented 9 years ago
I've split the test code into separate client and server processes, but am 
unable to reproduce the error... The code is attached - you can try to run it 
in your environment.

Original comment by jarl.lin...@gmail.com on 15 Feb 2011 at 12:29

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for the sample.
The only difference I found in my code is that I setup thread pool right before 
starting the server:

std::size_t targetThreadCount = 1;
std::size_t maxThreadCount = 100;
std::string threadName = "RCF Server";
boost::uint32_t threadIdleTimeoutMs = 60*1000;

RCF::ThreadPoolPtr threadPoolPtr( 
    new RCF::ThreadPool(
    targetThreadCount, 
    maxThreadCount,
    threadName,
    threadIdleTimeoutMs) );
server.setThreadPool(threadPoolPtr);
server.start();

Can you please try to add this piece of code in your SslServer process and let 
me know if you can reproduce the error.
I get RCF::Exception with error code 232(The pipe is being closed.) after 
several iterations on the client side. If no thread pool is used, then I don't 
get any exceptions.

thanks.

Original comment by zoltan.b...@gmail.com on 16 Feb 2011 at 8:18

GoogleCodeExporter commented 9 years ago
Thanks, that did the trick... There was a thread safety problem in the OpenSSL 
filter, easy enough to fix. I'm attaching an updated version of 
OpenSslEncryptionFilter.cpp, that should fix the problem.

Original comment by jarl.lin...@gmail.com on 16 Feb 2011 at 9:22

Attachments:

GoogleCodeExporter commented 9 years ago
I don't think the problem is resolved yet.

I'm still getting the exception on the client side after several iterations. 
The exception is thrown with error code 109(The pipe has been ended.)

Here is the stack trace:
    KernelBase.dll!RaiseException()  + 0x54 bytes   
    [Frames below may be incorrect and/or missing, no symbols loaded for KernelBase.dll]    
    msvcr90d.dll!_CxxThrowException(void * pExceptionObject=0x002ac5e8, const _s__ThrowInfo * pThrowInfo=0x0192f464)  Line 161  C++
    RFC_PipeTestSSL.exe!util::detail::InvokeThrow<RCF::Exception>::invoke(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & context="d:\dev2008\samples\rcf-1.3\src\rcf\win32namedpipeclienttransport.cpp(300): unsigned int __thiscall RCF::Win32NamedPipeClientTransport::implRead(const class RCF::ByteBuffer &,unsigned int): : Thread-id=2376 : Timestamp(ms)=1497: : ", const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & args="", int logName=1, int logLevel=1, const char * file=0x018913e0, int line=300, const char * func=0x01891940)  Line 83    C++
    RFC_PipeTestSSL.exe!util::ThrowFunctor::~ThrowFunctor()  Line 158 + 0x51 bytes  C++
    RFC_PipeTestSSL.exe!util::VariableArgMacro<util::ThrowFunctor>::~VariableArgMacro<util::ThrowFunctor>()  Line 185 + 0x34 bytes  C++
>   RFC_PipeTestSSL.exe!RCF::Win32NamedPipeClientTransport::implRead(const 
RCF::ByteBuffer & byteBuffer={...}, unsigned int bytesRequested=2048)  Line 300 
+ 0x15e bytes   C++
    RFC_PipeTestSSL.exe!RCF::ConnectionOrientedClientTransport::read(const RCF::ByteBuffer & byteBuffer_={...}, unsigned int bytesRequested=2048)  Line 310 + 0x1f bytes    C++
    RFC_PipeTestSSL.exe!RCF::ClientFilterProxy::read(const RCF::ByteBuffer & byteBuffer={...}, unsigned int bytesRequested=2048)  Line 41 + 0x4e bytes  C++
    RFC_PipeTestSSL.exe!RCF::OpenSslEncryptionFilterImpl::transferData()  Line 524 + 0x32 bytes C++
    RFC_PipeTestSSL.exe!RCF::applyRecursionLimiter<RCF::RecursionState<int,int>,RCF::OpenSslEncryptionFilterImpl,void (__thiscall RCF::OpenSslEncryptionFilterImpl::*)(void)>(RCF::RecursionState<int,int> & state={...}, void (void)* pfn=0x013842e8, RCF::OpenSslEncryptionFilterImpl & x={...})  Line 116 + 0x8 bytes    C++
    RFC_PipeTestSSL.exe!RCF::OpenSslEncryptionFilterImpl::retryReadWrite()  Line 474 + 0x18 bytes   C++
    RFC_PipeTestSSL.exe!RCF::OpenSslEncryptionFilterImpl::readWrite()  Line 416 C++
    RFC_PipeTestSSL.exe!RCF::OpenSslEncryptionFilterImpl::write(const std::vector<RCF::ByteBuffer,std::allocator<RCF::ByteBuffer> > & byteBuffers=[0]())  Line 354  C++
    RFC_PipeTestSSL.exe!RCF::OpenSslEncryptionFilter::write(const std::vector<RCF::ByteBuffer,std::allocator<RCF::ByteBuffer> > & byteBuffers=[0]())  Line 234  C++
    RFC_PipeTestSSL.exe!RCF::ClientFilterProxy::write(const std::vector<RCF::ByteBuffer,std::allocator<RCF::ByteBuffer> > & byteBuffers=[0]())  Line 48 + 0x26 bytes    C++
    RFC_PipeTestSSL.exe!RCF::ConnectionOrientedClientTransport::issueWrite(const std::vector<RCF::ByteBuffer,std::allocator<RCF::ByteBuffer> > & byteBuffers=[0]())  Line 683 + 0x61 bytes  C++
    RFC_PipeTestSSL.exe!RCF::ConnectionOrientedClientTransport::transition()  Line 747  C++
    RFC_PipeTestSSL.exe!RCF::ConnectionOrientedClientTransport::send(RCF::I_ClientTransportCallback & clientStub={...}, const std::vector<RCF::ByteBuffer,std::allocator<RCF::ByteBuffer> > & data=[0](), unsigned int totalTimeoutMs=3600000)  Line 434    C++
    RFC_PipeTestSSL.exe!RCF::ClientStub::onConnectCompleted(bool alreadyConnected=true)  Line 310 + 0x35 bytes  C++
    RFC_PipeTestSSL.exe!RCF::ClientStub::connect()  Line 170 + 0x11 bytes   C++
    RFC_PipeTestSSL.exe!RCF::ClientStub::send()  Line 362   C++
    RFC_PipeTestSSL.exe!RCF::ClientStub::call(RCF::RemoteCallSemantics rcs=Twoway)  Line 672    C++
    RFC_PipeTestSSL.exe!RCF::FutureImpl<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >::callSync()  Line 2010   C++
    RFC_PipeTestSSL.exe!RCF::FutureImpl<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >::call()  Line 1993   C++
    RFC_PipeTestSSL.exe!RCF::FutureImpl<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >::operator std::basic_string<char,std::char_traits<char>,std::allocator<char> >()  Line 1940  C++
    RFC_PipeTestSSL.exe!main()  Line 79 + 0x3e bytes    C++
    RFC_PipeTestSSL.exe!__tmainCRTStartup()  Line 586 + 0x19 bytes  C
    RFC_PipeTestSSL.exe!mainCRTStartup()  Line 403  C

Original comment by zoltan.b...@gmail.com on 16 Feb 2011 at 10:55

GoogleCodeExporter commented 9 years ago
Have you rebuilt your server with the updated OpenSslEncryptionFilter.cpp, or 
just the client ? The problem I found was on the server-side; the client 
exception is just a downstream consequence of the server terminating the 
connection.

Can you attach to the server with a debugger, and see if any exceptions are 
being thrown?

Original comment by jarl.lin...@gmail.com on 16 Feb 2011 at 11:03

GoogleCodeExporter commented 9 years ago
Yes, I have rebuilt both client and server after updating 
OpenSslEncryptionFilter.cpp.
Server doesn't throw any exceptions while debugging, double checked this.
I only get the exception from the client while enabling thread pool on the 
server side.

thanks.

Original comment by zoltan.b...@gmail.com on 16 Feb 2011 at 11:14

GoogleCodeExporter commented 9 years ago
Hello,

Did you have a chance to reproduce the problem I'm having?
If you need more info which could help you to analyze the issue, please let me 
know.

regards.

Original comment by zoltan.b...@gmail.com on 18 Feb 2011 at 6:13

GoogleCodeExporter commented 9 years ago
Yeah I've got the problem to reproduce in my environment as well... I'll post 
an update as soon as it's resolved.

Original comment by jarl.lin...@gmail.com on 18 Feb 2011 at 7:59

GoogleCodeExporter commented 9 years ago

OK - looks like there was a problem with the earlier fix to prevent excessive 
client-side recursion. It erroneously affected the server-side code path as 
well.

It should be fixed now. See how you go with the attached code... On my machine 
the sample SSL client and server (multithreaded) now run through without 
problems.

Original comment by jarl.lin...@gmail.com on 18 Feb 2011 at 1:06

Attachments: