Mongoimport started core dumping with replica sets when we upgraded to 2.2.0.
I can reproduce it with a local three node replica set. When importing directly to PRIMARY everything works:
mongoimport -h localhost -d test -c my_collection test.json
connected to: localhost
Tue Sep 11 10:27:55 imported 1 objects
but if the set is added to the host string then mongoimport core dumps:
mongoimport -h foo/localhost -d test -c my_collection test.json
Tue Sep 11 10:21:59 starting new replica set monitor for replica set foo with seed of localhost:27017
Tue Sep 11 10:21:59 successfully connected to seed localhost:27017 for replica set foo
Tue Sep 11 10:21:59 changing hosts to
from foo/
Tue Sep 11 10:21:59 trying to add new host localhost:27017 to replica set foo
Tue Sep 11 10:21:59 successfully connected to new host localhost:27017 in replica set foo
Tue Sep 11 10:21:59 trying to add new host localhost:27018 to replica set foo
Tue Sep 11 10:21:59 successfully connected to new host localhost:27018 in replica set foo
Tue Sep 11 10:21:59 trying to add new host localhost:27019 to replica set foo
Tue Sep 11 10:21:59 successfully connected to new host localhost:27019 in replica set foo
Tue Sep 11 10:21:59 Primary for replica set foo changed to localhost:27017
Tue Sep 11 10:21:59 replica set monitor for replica set foo started, address is foo/localhost:27017,localhost:27018,localhost:27019
Tue Sep 11 10:21:59 [ReplicaSetMonitorWatcher] starting
connected to: foo/localhost
Tue Sep 11 10:21:59 imported 1 objects
Logstream::get called in uninitialized state
Tue Sep 11 10:21:59 deleting replica set monitor for: foo/localhost:27017,localhost:27018,localhost:27019
Segmentation fault
It does not matter what kind of json document is imported, the one shown here is trivial:
cat test.json
{"menu": {"value": "File"}}
I tried the exact same setup with Mongo 2.0.7 and everything works perfectly:
mongoimport -h foo/localhost -d test -c my_collection test.json
Tue Sep 11 10:33:06 starting new replica set monitor for replica set foo with seed of localhost
Tue Sep 11 10:33:06 successfully connected to seed localhost for replica set foo
Tue Sep 11 10:33:06 changing hosts to
from foo/
Tue Sep 11 10:33:06 trying to add new host localhost:27017 to replica set foo
Tue Sep 11 10:33:06 successfully connected to new host localhost:27017 in replica set foo
Tue Sep 11 10:33:06 trying to add new host localhost:27018 to replica set foo
Tue Sep 11 10:33:06 successfully connected to new host localhost:27018 in replica set foo
Tue Sep 11 10:33:06 trying to add new host localhost:27019 to replica set foo
Tue Sep 11 10:33:06 successfully connected to new host localhost:27019 in replica set foo
Tue Sep 11 10:33:06 replica set monitor for replica set foo started, address is foo/localhost:27017,localhost:27018,localhost:27019
Tue Sep 11 10:33:06 [ReplicaSetMonitorWatcher] starting
connected to: foo/localhost
imported 1 objects
- is depended on by
-
SERVER-8029 mongodump crashs on empty database
- Closed
- is duplicated by
-
SERVER-6915 Replica set connection string ("rsName/host1,host2,...") causes segfault in mongooplog
- Closed
-
SERVER-6989 mongodump segfaults when host is passed a replSet string
- Closed
-
SERVER-7744 ReplicaSetMonitor::~ReplicaSetMonitor crash
- Closed
-
SERVER-8050 mongo_dump SEG FAULT with replica set
- Closed
-
SERVER-8043 Segmentation fault on mongodump with --host and replicaset
- Closed
- related to
-
SERVER-6922 ReplicaSetMonitor should clean itself up (after stopping ReplicaSetMonitorWatcher) while program terminates
- Closed