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

Race conditions in clean shutdown

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.7.5
    • Component/s: Stability
    • Operating System:
      ALL

      Description

      inShutdown() becomes true rather late in the shutdown procedure. Among potentially other issues, it comes after we close our listening sockets which can trigger fatal assertion 16727.
      As an example search for "Fatal Assertion 16727" in http://buildlogs.mongodb.org/mci_0.9_windows-64-debug/builds/66149/test/aggregation_0/testshard1.js

      I think inShutdown must become true before we begin any shutdown-related activities. This may require decoupling it from the numExitCalls counter.

      There's also a race condition with the listener thread exiting before the _exit call from a previous exitClean call completing, which causes the server to exit with return code 48 (EXIT_NET_ERROR).

        Attachments

          Activity

            People

            Assignee:
            kaloian.manassiev Kaloian Manassiev
            Reporter:
            redbeard0531 Mathias Stearn
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: