Async scan spins for 30 seconds after server hangup

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 1.2-beta1
    • Affects Version/s: 1.2-beta0
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Even with serverSelectionTryOnce true, if the server hangs up on an "ismaster" call, mongoc_async_run spins serverSelectionTimeoutMS (default 30 seconds) before giving up and returning to mongoc_topology_select.

      When mongoc_stream_read returns 0 it means the server has shut down the connection, but the 0 return is not properly handled so the async_cmd_t remains in the "receiving" phase. The socket appears readable so mongoc_async_run doesn't block on "poll", hence the 100% CPU spin until the timeout.

              Assignee:
              A. Jesse Jiryu Davis
              Reporter:
              A. Jesse Jiryu Davis
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: