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

Do not crash if parent goes missing after fork

    • Type: Icon: Bug Bug
    • Resolution: Incomplete
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Internal Code
    • Labels:
      None
    • Service Arch
    • ALL
    • Hide

      Start a mongod with --fork and induce a long startup time (e.g., WiredTiger or mmap with a lot of journal recovery work to do, or many collections to open and inspect, etc.). Kill the parent process prior to the fork completing, and note that the child mongod will abort with the above message.

      Show
      Start a mongod with --fork and induce a long startup time (e.g., WiredTiger or mmap with a lot of journal recovery work to do, or many collections to open and inspect, etc.). Kill the parent process prior to the fork completing, and note that the child mongod will abort with the above message.

      If the parent process goes away before the child has a chance to complete initialization, the mongod process will shut down when it tries to send signal USR2 to the parent, indicating that startup is complete. (function signalForkSuccess()).
      It also dies with an unfriendly message:

      2016-10-05T09:22:25.215+0000 I -        [initandlisten] Assertion failure kill(serverGlobalParams.leaderProc.toNative(), 12) == 0 src/mongo/db/initialize_server_global_state.cpp 95
      

      I see no reason to crash if the parent process is missing. Instead, I think we should just log a warning and continue starting up.

            Assignee:
            backlog-server-servicearch [DO NOT USE] Backlog - Service Architecture
            Reporter:
            milkie@mongodb.com Eric Milkie
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: