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

Self-deadlock when cancelling networking sessions

    XMLWordPrintableJSON

Details

    • Fully Compatible
    • ALL
    • Service arch 2020-04-20
    • 32

    Description

      cancelSession erases the TransportSession under the Baton's mutex.  If that session has an outstanding Promise, however, it will try to break that promise, which in turn schedules the corresponding Future to run (and resolve with a BrokenPromise error).  But scheduling the Future to run requires locking the Baton's mutex.  This results in deadlock.

      Instead of destroying the TransportSession under the Baton's mutex, we should move the TransportSession out of the Baton's _sessions map under the mutex, the release the mutex before actually destroying the TransportSession.

      Attachments

        Activity

          People

            ben.caimano@mongodb.com Benjamin Caimano (Inactive)
            spencer@mongodb.com Spencer Brody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: