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

ThreadManager deadlock for task expiration

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.9.3
    • C++ - Library
    • None
    • Patch Available

    Description

      I have a TNonblockingServer running with 1 worker thread and 10 IO thread.

      If there was a big task that just finished, all pending tasks might be expired. In such case, all IO threads are waiting for maxMonitor_, but the worker won't notify. It will remove all the tasks(all of them are expired) first. And then the notify code won't be executed because tasks are empty. Deadlock occurs.

      The patch move the if-notify statement out so it will notify even if all tasks are removed for expiration.

      Attachments

        Activity

          People

            roger Roger Meier
            qiaomuf Qiao Mu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: