Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-5480

TThreadPoolAsyncServer using TFramedTransport mistakenly drops client

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Patch Available
    • Patch

    Description

      TThreadPoolAsyncServer using TFramedTransport silently drops a client service using oneway methods when the second message is bigger than the first one.

      I have an application implementing a one way service, depending on it's state. I created a TThreadpoolAsync server using the netstd 0.15 version, and I noticed that after a point, the notifications stopped coming, but there was no error on either side. The methods all worked individually, but some did not work after others.

      Eliminating all possible causes on my side, I debugged the source code, and discovered that a transport exception was thrown from TEndpointTransport when a message size was bigger than the proceeding one, because TFramedTransport.ReadFrameAsync was not resetting the message size when it was done reading it, thus causing TEndpointTransport.UpdateKnownMessageSize to throw the exception. The server interpreted the exception as if the client had disconnected, so it silently ignored it.

       

      I've attached a patch that corrects this behaviour

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            jensg Jens Geyer
            io Ioannis Efthymiou
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 40m
                40m

                Slack

                  Issue deployment