Menu

#52 Fixed concurrency bug WinNT

server
open
bug (54)
5
2003-01-23
2002-09-30
No

There was a bug in ES++ 0.6.1 where two or
more concurrent requests would crash the
HTTP SOAP server (I am using Windows NT).

I fixed this by moving the members m_transport,
m_response, m_request, m_writer, m_parser,
and m_respname out of the definition of
SOAPServerDispatch and into the body of
SOAPServerDispatch::Handle(SOAPServerTransport&
trans).
I also had to pass m_transport, m_response and
m_writer
to SOAPServerDispatch::WriteFault().

This seems to do the job!

Discussion

  • David Crowley

    David Crowley - 2003-01-23
    • assigned_to: nobody --> dcrowley
     
  • Geurt Wisselink

    Geurt Wisselink - 2003-02-13

    Logged In: YES
    user_id=309972

    I experienced the same thing.
    And it is caused by multiple threads accessing the same
    SOAPServerDispatch instance. SOAPServerDispatch owns a the
    following objects: a pointer to transport, response, request and
    writer.

    What happens is that the response object is being reset by the
    first client thread, while the second client thread is filling it in.

    The whole thing can be solved by having local instances for all
    four (also the transport pointer, since it can be overwritten) inside
    the handle method, and pass three of them as parameters to
    WriteFault.

    The second solution is less nice, it requires a mutex.

    I implemented thsi solution is easysoap 0.3 and it worked
    perfectly.

     

Log in to post a comment.

MongoDB Logo MongoDB