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

Race conditions in clean shutdown

    • ALL

      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).

            Assignee:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Reporter:
            mathias@mongodb.com Mathias Stearn
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: