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

AsyncResultsMerger can block networking threads in callbacks

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical - P2
    • Resolution: Gone away
    • Affects Version/s: 3.2.20, 3.4.15
    • Fix Version/s: None
    • Component/s: Internal Code
    • Labels:
      None
    • Operating System:
      ALL

      Description

      • The AsyncResultsMerger holds a lock while it runs callbacks, and while it calls nextEvent()
      • running askForNextBatch_inlock does repl targetting
      • repl targetting can hang for up to 20 seconds

      The bad scenario is:

      • Bunch of remotes are established
      • The first host suceeds in targetting and runs
      • The second host cannot satisfy it's read pref, blocking holding a lock in nextEvent()
      • The first request comes back, blocking on the mutex waiting to call handleBatchResponse

      If you have enough of those, you saturate all the background networking threads and hang your mongos.

      This isn't a problem in 3.6 and later because targetting was moved into the ARS and SERVER-34582 fixes the problem there

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-sharding Backlog - Sharding Team
              Reporter:
              jason.carey Jason Carey
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: