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

mongod/s should refuse to overwrite pidfiles belonging to a running process

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.6.0
    • Component/s: Admin
    • Labels:
      None
    • Hide

      1) Manually start a mongos/d with a named pidfile
      2) Try to manually start another mongos/d using the same named pidfile
      3) The second instance inserts its own pid into the pidfile, and if it's asked to use the same port as the first mongos/d, it dies, leaving a stale pidfile and a dangling server.

      Show
      1) Manually start a mongos/d with a named pidfile 2) Try to manually start another mongos/d using the same named pidfile 3) The second instance inserts its own pid into the pidfile, and if it's asked to use the same port as the first mongos/d, it dies, leaving a stale pidfile and a dangling server.

      When mongod/s starts up, if it is told to use a pidfile, it will overwrite that pidfile, even if that pidfile belongs to another mongod/s process that is currently running.

      It should check to see if the pid in the pidfile is active and refuse to start if it is given a pidfile that corresponds to a running process.

      (This was found on MongoDB 2.6.1 on Linux and is believed to be present on 2.6.3 ; found as part of an investigation of an issue on the MMS cloud servers)

            Assignee:
            matt.kangas Matt Kangas
            Reporter:
            pgunn Pat Gunn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: