Description of race:
- Start mongos with just a single node specified in --configdb
- ShardRegistry::init() gets called.
- ShardFactory::createShard gets called for "config" and the initial config server seed string (ref).
- The ReplicaSetMonitor for the config replica sets gets created.
- ReplicaSetMonitor (RSM) reload thread discovers the other nodes in the CSRS.
- RSM tries to update the ShardRegistry via the synchronous update hook. However, it fails to update because the "config" entry hasn't been created yet (ref).
- ShardRegistry populates the "config" shard entry (ref).