Set readMode=commands and resmoke jstests/sharding/zero_shard_version.js
another way to reproduce is to run in mongo shell
var st = new ShardingTest({ shards: 2, mongos: 4 });
st.stopBalancer();
var testDB_s0 = st.s.getDB('test');
testDB_s0.adminCommand({ enableSharding: 'test' });
testDB_s0.adminCommand({ movePrimary: 'test', to: 'shard0001' });
testDB_s0.adminCommand({ shardCollection: 'test.user', key: { x: 1 }});
var testDB_s1 = st.s1.getDB('test');
testDB_s1.user.insert({ x: 1 });
testDB_s1.adminCommand({ moveChunk: 'test.user', find: { x: 0 }, to: 'shard0000' });
testDB_s0.user.findOne({ x: 1 });
testDB_s1.user.drop();
testDB_s1.user.insert({ x: 10 });
testDB_s0.user.findOne({ x: 10 });
The last statement will produce an assert
Description
ClusterFind::runQuery cant not detect if a collection became unsharded and throws a 10181 assert