[SERVER-7061] mongos can use invalid ptr to master conn when setShardVersion fails Created: 18/Sep/12  Updated: 11/Jul/16  Resolved: 18/Sep/12

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 2.2.0
Fix Version/s: 2.2.1, 2.3.0

Type: Bug Priority: Major - P3
Reporter: Greg Studer Assignee: Randolph Tan
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Duplicate
is duplicated by SERVER-7093 Mongos crashed because of "got not ma... Closed
is duplicated by SERVER-6539 Mongos crashed because of mongod cann... Closed
is duplicated by SERVER-7029 Mongos crash on replica set failover Closed
is duplicated by SERVER-7564 mongos crash (segfault) under load Closed
is duplicated by SERVER-7043 mongos crashes on shard failover duri... Closed
is duplicated by SERVER-8074 mongos segfault on replica set member... Closed
Related
Operating System: ALL
Participants:

 Description   

Mongos can crash if an error occurs with a replica set while trying to set the shard version - because checkShardVersion uses the legacy masterConn() call, it retains a pointer to the now-invalid connection.

Potential fix is to retry not with the same connection but with the replica set connection object.



 Comments   
Comment by auto [ 18/Sep/12 ]

Author:

{u'date': u'2012-09-18T13:23:32-07:00', u'email': u'randolph@10gen.com', u'name': u'Randolph Tan'}

Message: SERVER-7061 mongos can use invalid ptr to master conn when setShardVersion fails
Branch: v2.2
https://github.com/mongodb/mongo/commit/5cc8a693a48f3885df6e77f5ce0f2abf0789d499

Comment by auto [ 18/Sep/12 ]

Author:

{u'date': u'2012-09-18T13:23:32-07:00', u'email': u'randolph@10gen.com', u'name': u'Randolph Tan'}

Message: SERVER-7061 mongos can use invalid ptr to master conn when setShardVersion fails
Branch: master
https://github.com/mongodb/mongo/commit/4559b1cfd80b5dc043435cec9959f113f4bb6560

Generated at Thu Feb 08 03:13:31 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.