-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 3.7.4
-
Component/s: Replication
-
None
-
Fully Compatible
-
ALL
-
Repl 2018-05-07
This is triggered by an FCV check in Session::_beginOrContinueTxn()
- Starting a new mongod with the --replSet option
- Prior to running rs.initiate() running the following in the mongo shell:
const session = db.getMongo().startSession({}) session.startTransaction({readConcern: {level: "snapshot"}}) const sessionDB = session.getDatabase("test"); assert.commandWorked(sessionDB.runCommand({find: "test"}));
This is the log output generated with stack trace:
2018-04-17T12:56:40.175-0400 I NETWORK [initandlisten] waiting for connections on port 27017 2018-04-17T12:56:44.818-0400 I NETWORK [listener] connection accepted from 127.0.0.1:55310 #1 (1 connection now open) 2018-04-17T12:56:44.819-0400 I NETWORK [conn1] received client metadata from 127.0.0.1:55310 conn1: { application: { name: "MongoDB Shell" }, driver: { name: "MongoDB Internal Client", version: "0.0.0" }, os: { type: "Linux", name: "Ubuntu", architecture: "x86_64", version: "16.04" } } 2018-04-17T12:56:53.325-0400 F - [conn1] Invariant failure isVersionInitialized() src/mongo/db/server_options.h 207 2018-04-17T12:56:53.325-0400 F - [conn1] ***aborting after invariant() failure 2018-04-17T12:56:53.360-0400 F - [conn1] Got signal: 6 (Aborted). 0x558666117201 0x558666116419 0x5586661168fd 0x7fcdab090390 0x7fcdaacea428 0x7fcdaacec02a 0x55866480029e 0x558665755528 0x558665755950 0x5586657594f8 0x5586648a5825 0x5586648a95a7 0x5586648aa4ee 0x55866489861a 0x5586648a328a 0x55866489e047 0x5586648a1761 0x558665b83c62 0x55866489c30f 0x55866489f3f5 0x55866489d80f 0x55866489e0cd 0x5586648a1761 0x558665b841c5 0x55866605d2d4 0x7fcdab0866ba 0x7fcdaadbc41d ----- BEGIN BACKTRACE ----- {"backtrace":[{"b":"558663EB0000","o":"2267201","s":"_ZN5mongo15printStackTraceERSo"},{"b":"558663EB0000","o":"2266419"},{"b":"558663EB0000","o":"22668FD"},{"b":"7FCDAB07F000","o":"11390"},{"b":"7FCDAACB5000","o":"35428","s":"gsignal"},{"b":"7FCDAACB5000","o":"3702A","s":"abort"},{"b":"558663EB0000","o":"95029E","s":"_ZN5mongo22invariantFailedWithMsgEPKcS1_S1_j"},{"b":"558663EB0000","o":"18A5528","s":"_ZN5mongo7Session19_beginOrContinueTxnENS_8WithLockEPNS_16OperationContextElN5boost8optionalIbEES6_Pb"},{"b":"558663EB0000","o":"18A5950","s":"_ZN5mongo7Session18beginOrContinueTxnEPNS_16OperationContextElN5boost8optionalIbEES5_"},{"b":"558663EB0000","o":"18A94F8","s":"_ZN5mongo23OperationContextSessionC2EPNS_16OperationContextEbN5boost8optionalIbEES5_"},{"b":"558663EB0000","o":"9F5825"},{"b":"558663EB0000","o":"9F95A7"},{"b":"558663EB0000","o":"9FA4EE","s":"_ZN5mongo23ServiceEntryPointCommon13handleRequestEPNS_16OperationContextERKNS_7MessageERKNS0_5HooksE"},{"b":"558663EB0000","o":"9E861A","s":"_ZN5mongo23ServiceEntryPointMongod13handleRequestEPNS_16OperationContextERKNS_7MessageE"},{"b":"558663EB0000","o":"9F328A","s":"_ZN5mongo19ServiceStateMachine15_processMessageENS0_11ThreadGuardE"},{"b":"558663EB0000","o":"9EE047","s":"_ZN5mongo19ServiceStateMachine15_runNextInGuardENS0_11ThreadGuardE"},{"b":"558663EB0000","o":"9F1761"},{"b":"558663EB0000","o":"1CD3C62","s":"_ZN5mongo9transport26ServiceExecutorSynchronous8scheduleESt8functionIFvvEENS0_15ServiceExecutor13ScheduleFlagsENS0_23ServiceExecutorTaskNameE"},{"b":"558663EB0000","o":"9EC30F","s":"_ZN5mongo19ServiceStateMachine22_scheduleNextWithGuardENS0_11ThreadGuardENS_9transport15ServiceExecutor13ScheduleFlagsENS2_23ServiceExecutorTaskNameENS0_9OwnershipE"},{"b":"558663EB0000","o":"9EF3F5","s":"_ZN5mongo19ServiceStateMachine15_sourceCallbackENS_6StatusE"},{"b":"558663EB0000","o":"9ED80F","s":"_ZN5mongo19ServiceStateMachine14_sourceMessageENS0_11ThreadGuardE"},{"b":"558663EB0000","o":"9EE0CD","s":"_ZN5mongo19ServiceStateMachine15_runNextInGuardENS0_11ThreadGuardE"},{"b":"558663EB0000","o":"9F1761"},{"b":"558663EB0000","o":"1CD41C5"},{"b":"558663EB0000","o":"21AD2D4"},{"b":"7FCDAB07F000","o":"76BA"},{"b":"7FCDAACB5000","o":"10741D","s":"clone"}],"processInfo":{ "mongodbVersion" : "0.0.0", "gitVersion" : "unknown", "compiledModules" : [ "ninja" ], "uname" : { "sysname" : "Linux", "release" : "4.4.0-104-generic", "version" : "#127-Ubuntu SMP Mon Dec 11 12:16:42 UTC 2017", "machine" : "x86_64" }, "somap" : [ { "b" : "558663EB0000", "elfType" : 3, "buildId" : "0A2B19A5FE5FF77700BECF4E708A5D6B0D4B53B9" }, { "b" : "7FFC102A0000", "elfType" : 3, "buildId" : "BF4B5E36B7E2464DCF29A888C247A27A3FF2BC5C" }, { "b" : "7FCDABF49000", "path" : "/lib/x86_64-linux-gnu/libresolv.so.2", "elfType" : 3, "buildId" : "6EF73266978476EF9F2FD2CF31E57F4597CB74F8" }, { "b" : "7FCDABD41000", "path" : "/lib/x86_64-linux-gnu/librt.so.1", "elfType" : 3, "buildId" : "89C34D7A182387D76D5CDA1F7718F5D58824DFB3" }, { "b" : "7FCDABB3D000", "path" : "/lib/x86_64-linux-gnu/libdl.so.2", "elfType" : 3, "buildId" : "8CC8D0D119B142D839800BFF71FB71E73AEA7BD4" }, { "b" : "7FCDAB7BB000", "path" : "/usr/lib/x86_64-linux-gnu/libstdc++.so.6", "elfType" : 3, "buildId" : "CB93C881929B523C01ACEF171B52D5261F026029" }, { "b" : "7FCDAB4B2000", "path" : "/lib/x86_64-linux-gnu/libm.so.6", "elfType" : 3, "buildId" : "DFB85DE42DAFFD09640C8FE377D572DE3E168920" }, { "b" : "7FCDAB29C000", "path" : "/lib/x86_64-linux-gnu/libgcc_s.so.1", "elfType" : 3, "buildId" : "68220AE2C65D65C1B6AAA12FA6765A6EC2F5F434" }, { "b" : "7FCDAB07F000", "path" : "/lib/x86_64-linux-gnu/libpthread.so.0", "elfType" : 3, "buildId" : "CE17E023542265FC11D9BC8F534BB4F070493D30" }, { "b" : "7FCDAACB5000", "path" : "/lib/x86_64-linux-gnu/libc.so.6", "elfType" : 3, "buildId" : "B5381A457906D279073822A5CEB24C4BFEF94DDB" }, { "b" : "7FCDAC164000", "path" : "/lib64/ld-linux-x86-64.so.2", "elfType" : 3, "buildId" : "5D7B6259552275A3C17BD4C3FD05F5A6BF40CAA5" } ] }} mongod(_ZN5mongo15printStackTraceERSo+0x41) [0x558666117201] mongod(+0x2266419) [0x558666116419] mongod(+0x22668FD) [0x5586661168fd] libpthread.so.0(+0x11390) [0x7fcdab090390] libc.so.6(gsignal+0x38) [0x7fcdaacea428] libc.so.6(abort+0x16A) [0x7fcdaacec02a] mongod(_ZN5mongo22invariantFailedWithMsgEPKcS1_S1_j+0x0) [0x55866480029e] mongod(_ZN5mongo7Session19_beginOrContinueTxnENS_8WithLockEPNS_16OperationContextElN5boost8optionalIbEES6_Pb+0x348) [0x558665755528] mongod(_ZN5mongo7Session18beginOrContinueTxnEPNS_16OperationContextElN5boost8optionalIbEES5_+0xF0) [0x558665755950] mongod(_ZN5mongo23OperationContextSessionC2EPNS_16OperationContextEbN5boost8optionalIbEES5_+0x388) [0x5586657594f8] mongod(+0x9F5825) [0x5586648a5825] mongod(+0x9F95A7) [0x5586648a95a7] mongod(_ZN5mongo23ServiceEntryPointCommon13handleRequestEPNS_16OperationContextERKNS_7MessageERKNS0_5HooksE+0x31E) [0x5586648aa4ee] mongod(_ZN5mongo23ServiceEntryPointMongod13handleRequestEPNS_16OperationContextERKNS_7MessageE+0x3A) [0x55866489861a] mongod(_ZN5mongo19ServiceStateMachine15_processMessageENS0_11ThreadGuardE+0xBA) [0x5586648a328a] mongod(_ZN5mongo19ServiceStateMachine15_runNextInGuardENS0_11ThreadGuardE+0x97) [0x55866489e047] mongod(+0x9F1761) [0x5586648a1761] mongod(_ZN5mongo9transport26ServiceExecutorSynchronous8scheduleESt8functionIFvvEENS0_15ServiceExecutor13ScheduleFlagsENS0_23ServiceExecutorTaskNameE+0x1A2) [0x558665b83c62] mongod(_ZN5mongo19ServiceStateMachine22_scheduleNextWithGuardENS0_11ThreadGuardENS_9transport15ServiceExecutor13ScheduleFlagsENS2_23ServiceExecutorTaskNameENS0_9OwnershipE+0x15F) [0x55866489c30f] mongod(_ZN5mongo19ServiceStateMachine15_sourceCallbackENS_6StatusE+0xAF5) [0x55866489f3f5] mongod(_ZN5mongo19ServiceStateMachine14_sourceMessageENS0_11ThreadGuardE+0x30F) [0x55866489d80f] mongod(_ZN5mongo19ServiceStateMachine15_runNextInGuardENS0_11ThreadGuardE+0x11D) [0x55866489e0cd] mongod(+0x9F1761) [0x5586648a1761] mongod(+0x1CD41C5) [0x558665b841c5] mongod(+0x21AD2D4) [0x55866605d2d4] libpthread.so.0(+0x76BA) [0x7fcdab0866ba] libc.so.6(clone+0x6D) [0x7fcdaadbc41d] ----- END BACKTRACE ----- Aborted