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

Clients blocked indefinitely when a java.lang.Error is thrown

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 0.5, 0.9.1, 0.9.2
    • 0.9.3
    • Java - Library
    • None
    • Patch Available
    • Patch

    Description

      When a java.lang.Exception is thrown in a thrift server method, client connections get closed properly. Please see the clean up code below.

      https://github.com/apache/thrift/blob/master/lib/java/src/org/apache/thrift/server/TThreadPoolServer.java#L300

      But if a java.lang.Error is thrown, that block of clean up code won't be executed and thus client connections may block indefinitely. I think the clean up code should be move to a finally block.

      A pull request has been sent to Github:
      https://github.com/apache/thrift/pull/618

      Attachments

        Activity

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

          People

            huahang Huahang Liu
            huahang Huahang Liu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment