[SERVER-14338] mongod/s should refuse to overwrite pidfiles belonging to a running process Created: 23/Jun/14  Updated: 09/Sep/14  Resolved: 09/Sep/14

Status: Closed
Project: Core Server
Component/s: Admin
Affects Version/s: 2.6.0
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Pat Gunn Assignee: Matt Kangas
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-7240 pidfile appears to be overwritten eve... Closed
Related
Steps To Reproduce:

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.

Participants:

 Description   

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)


Generated at Thu Feb 08 03:34:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.