-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 4.0.3, 4.1.3
-
Component/s: Networking
-
Fully Compatible
-
ALL
-
v4.0
-
-
Service Arch 2018-12-17, Service Arch 2018-12-31, Service Arch 2019-01-14
The null pointer dereference: https://github.com/mongodb/mongo/blob/dc9e1ee045af74c74360ffce2bec88868b08e1dc/src/mongo/executor/network_interface_tl.cpp#L133-L134
Also consider changing this test to examine the error code on a repair run:
https://github.com/mongodb/mongo/blob/abb1b353648260175c3dfe02ac8ae54c083956f7/jstests/multiVersion/downgrade_to_36_only_with_recovered_data.js#L72-L76
This patch would have surfaced the problem sooner, though I don't think anyone would reasonably pass in --bind_ip with --repair:
diff --git a/jstests/multiVersion/downgrade_to_36_only_with_recovered_data.js b/jstests/multiVersion/downgrade_to_36_only_with_recovered_data.js index 87e816f629..99fadbd7ab 100644 --- a/jstests/multiVersion/downgrade_to_36_only_with_recovered_data.js +++ b/jstests/multiVersion/downgrade_to_36_only_with_recovered_data.js @@ -25,6 +25,9 @@ const name = "rs"; let conn = MongoRunner.runMongod( {binVersion: "latest", shardsvr: "", replSet: name, syncdelay: "600"}); + let dbpath = conn.dbpath; + let port = conn.port; + printjson({"DBPath": dbpath, "Port": port}); assert.neq(conn, null, "mongod was unable to start up"); @@ -71,10 +74,17 @@ MongoRunner.stopMongod(conn); jsTestLog("Running repair. The process will automatically exit when complete."); - options.shardsvr = undefined; - options.replSet = undefined; - options.repair = ''; - MongoRunner.runMongod(options); + // options.shardsvr = undefined; + // options.replSet = undefined; + // options.repair = ''; + // MongoRunner.runMongod(options); + + // Fake a port because `runMongoProgram` thinks that is required. + // --bind_ip 0.0.0.0 is necessary to reproduce crash + assert.eq( + 0, + runMongoProgram( + "mongod", "--repair", "--dbpath", dbpath, "--port", port, "--bind_ip", "0.0.0.0")); jsTestLog("Restarting after repair with replication."); options.shardsvr = '';
- is caused by
-
SERVER-28990 when started with --repair mongod should not try to bind to a port
- Closed
- is depended on by
-
SERVER-38714 Standalone replica set nodes with unfinished indexes should drop them on --repair
- Closed
- is duplicated by
-
SERVER-39389 --repair crash mongod when repair work almost done
- Closed
- is related to
-
SERVER-38683 Restarting mongod with --repair and unfinished indexes causes it to crash
- Closed