-
Type: Bug
-
Resolution: Done
-
Priority: Critical - P2
-
Affects Version/s: 2.0.2, 2.0.4
-
Component/s: Internal Client
-
None
-
Environment:CentOS 6
server 2.0.4
C++ client 2.0.2-pre
-
Linux
I was testing stability of my client which used mongo server and client was crashed in mongo C++ client driver at moment of shutdowing primary mongo server.
This crash is reproduced every time. See guide below
Here is stack trace of crash:
#0 0x0830d98d in mongo::DBClientCursor::peekError(mongo::BSONObj*) ()
#1 0x08313f6b in mongo::DBClientReplicaSet::checkSlaveQueryResult(std::auto_ptr<mongo::DBClientCursor>) ()
#2 0x08313a3c in mongo::DBClientReplicaSet::query(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, mongo::Query, int, int, mongo::BSONObj const*, int, int) ()
Guide to reproduce this:
Make replicaSet configuration like this:
PRIMARY> rs.conf()
{
"_id" : "wop_test",
"version" : 15,
"members" : [
,
,
{ "_id" : 2, "host" : "10.68.11.138:27018", "votes" : 0, "priority" : 0 } ]
}
Shutdown server #1 and #2 (which have no votes)
Then shutdown last standing primary #0 and immediately make request from client.
If request will be doing a few seconds after shutdowning #0, client will be handle it correct (throw exception)
May be it because I use old C++ client 2.0.2-pre with server 2.0.4 ?