[SERVER-50072] Check _isWindows() when initializing MongoRunner.EXIT_ABORT Created: 03/Aug/20  Updated: 29/Oct/23  Resolved: 21/Sep/20

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.8.0, 4.4.2, 4.2.11

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

Issue Links:
Backports
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4, v4.2
Sprint: Repl 2020-09-07, Repl 2020-09-21, Repl 2020-10-05
Participants:

 Description   

std::abort() on Windows returns a different exit code than other platforms, and so when we expect a process to be aborted, we first consult _isWindows before passing in the expected exit code (Either MongoRunner.EXIT_ABORT or MongoRunner.EXIT_ABRUPT). Here is an example of this in the test oplog_replay_on_startup_with_bad_op.js

Instead, we should check _isWindows when MongoRunner.EXIT_ABORT is initialized in servers.js similarly to how MongoRunner.SIGKILL is initialized here.

 



 Comments   
Comment by Githook User [ 07/Oct/20 ]

Author:

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

Message: SERVER-50072 Check _isWindows() when initializing MongoRunner.EXIT_ABORT

(cherry picked from commit 8797f3b34d6602db8b44f93e345cec38058508e5)
Branch: v4.2
https://github.com/mongodb/mongo/commit/872b733e4bfebd4572ed18992fe7649f9250ad9f

Comment by Githook User [ 07/Oct/20 ]

Author:

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

Message: SERVER-50072 Check _isWindows() when initializing MongoRunner.EXIT_ABORT

(cherry picked from commit 8797f3b34d6602db8b44f93e345cec38058508e5)
Branch: v4.4
https://github.com/mongodb/mongo/commit/0ca89040b7f18e58a508dbff407b954ed0045499

Comment by Githook User [ 21/Sep/20 ]

Author:

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

Message: SERVER-50072 Check _isWindows() when initializing MongoRunner.EXIT_ABORT
Branch: master
https://github.com/mongodb/mongo/commit/8797f3b34d6602db8b44f93e345cec38058508e5

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