Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-55205

Running shouldStopIteration inline in AsyncTryUntilWithDelay can create deadlock

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Gone away
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Operating System:
      ALL
    • Story Points:
      4

      Description

      It's possible for the following to happen:

      1. Service acquires mutex mx and invokes some cleanup work.
      2. As part of cleanup, call setError on owned promises.
      3. AsyncTryUntilWithDelay::runImpl reaches the end of an iteration and invokes shouldStopIteration inline, but shouldStopIteration also acquires mx.
      4. We get a deadlock because the service is unable to finish the cleanup work while holding the mutex, but AsyncTryUntilWithDelay is stuck waiting on the mutex.

        Attachments

          Activity

            People

            Assignee:
            backlog-server-servicearch Backlog - Service Architecture
            Reporter:
            jason.chan Jason Chan
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: