...
Running PyMongo's test suite, on the branch where I'm implementing sessions, I crashed a standalone mongod running with auth. 2017-09-17T10:44:54.724-0400 F - [conn384] Invariant failure ccPin == ErrorCodes::QueryPlanKilled src/mongo/db/query/find.cpp 330 mongod(_ZN5mongo15invariantFailedEPKcS1_j+0x2E6) [0x10f4c1666] mongod(_ZN5mongo7getMoreEPNS_16OperationContextEPKcixPbS4_+0x18E2) [0x10e49fd52] mongod(_ZN5mongo23ServiceEntryPointMongod13handleRequestEPNS_16OperationContextERKNS_7MessageE+0x1528) [0x10e179378] mongod(_ZN5mongo19ServiceStateMachine15_processMessageERNS0_11ThreadGuardE+0x18A) [0x10e186a8a] mongod(_ZN5mongo19ServiceStateMachine15_runNextInGuardERNS0_11ThreadGuardE+0x175) [0x10e185f45] mongod(_ZN5mongo19ServiceStateMachine7runNextEv+0x38) [0x10e1868b8] mongod(_ZNSt3__110__function6__funcIZN5mongo21ServiceEntryPointImpl12startSessionENS_10shared_ptrINS2_9transport7SessionEEEE3$_1NS_9allocatorIS8 Log attached. I think that PyMongo was executing some part of this test: def test_aggregate_raw(self): c = self.db.test c.drop() docs = [{'_id': i, 'x': 3.0 * i} for i in range(10)] c.insert_many(docs) batches = list(c.aggregate_raw_batches([{'$sort': {'_id': 1}}])) self.assertEqual(1, len(batches)) self.assertEqual(docs, decode_all(batches[0])) PyMongo's aggregate_raw_batches method sets the initial batch size to 0 with the "aggregate" command, then issues a "getMore".
xgen-internal-githook commented on Wed, 20 Sep 2017 16:27:57 +0000: Author: {'email': 'jcarey@argv.me', 'name': 'Jason Carey', 'username': 'hanumantmk'} Message: SERVER-31117 pin can return unauthorized Being too specific about pinCursor error code returns causes an unauthorized legacy getMore to invariant. Branch: master https://github.com/mongodb/mongo/commit/dc84bdb8db1446d21fde5e59cf7b0df1149871ac jesse commented on Tue, 19 Sep 2017 15:06:34 +0000: Based on mira.carey@mongodb.com's diagnosis in SERVER-31120, my PyMongo code was probably sending a different lsid with getMore than with aggregate. jesse commented on Sun, 17 Sep 2017 16:15:01 +0000: Reproduced here too with a patch build of PyMongo: https://evergreen.mongodb.com/task/mongo_python_driver_tests_windows_vs2015_python_version__auth_ssl~auth_ssl_windows_vs2015_python_version~3.6_test_latest_standalone_patch_200b699ba553979afa543e33eefc44276a532477_59be8ccf2fbabe322000001f_17_09_17_14_55_12
Click on a version to see all relevant bugs
MongoDB Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.