[SERVER-48206] ReplSetTest#stopSet() no longer detects if a mongod process has crashed unexpectedly Created: 13/May/20  Updated: 29/Oct/23  Resolved: 03/Aug/20

Status: Closed
Project: Core Server
Component/s: Replication, Testing Infrastructure
Affects Version/s: None
Fix Version/s: 4.7.0

Type: Bug Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Ali Mir
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
is caused by SERVER-39172 Shut down mongod nodes in parallel in... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 2020-06-15, Repl 2020-07-13, Repl 2020-07-27, Repl 2020-08-10
Participants:

 Description   

The changes from a417e97 as part of SERVER-39172 made it so MongoRunner.stopMongod() skips calling wait_for_pid() in shell_utils_launcher.cpp. It is then the responsibility of ReplSetTest#stopSet() to actually wait for the mongod processes to finish terminating. However, it doesn't do anything with the returned exitCode other than logging its value.

ReplSetTest#stopSet() should throw a JavaScript exception in a similar fashion to MongoRunner.stopMongod().

// If we are not waiting for shutdown, then there is no exit code to check.
if (!waitpid) {
    return 0;
}
if (allowedExitCode !== returnCode) {
    throw new MongoRunner.StopError(returnCode);
} else if (returnCode !== MongoRunner.EXIT_CLEAN) {
    print("MongoDB process on port " + port + " intentionally exited with error code ",
          returnCode);
}



 Comments   
Comment by Githook User [ 03/Aug/20 ]

Author:

{'name': 'Ali Mir', 'email': 'ali.mir@mongodb.com', 'username': 'ali-mir'}

Message: SERVER-48206 Check process exit codes when stopping nodes in replsettest.js
Branch: master
https://github.com/mongodb/mongo/commit/77e2cd03f0c8768dd7e21ac9c3f831c7f74a1749

Generated at Thu Feb 08 05:16:27 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.