Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-57642

Invariant Failure on src/mongo/db/query/plan_yield_policy.cpp 75 | Aborting

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.2.16, 4.4.8, 5.0.2, 4.0.27, 5.1.0-rc0
    • Affects Version/s: 4.2.14, 4.4.6, 4.0.25, 5.0.0-rc8
    • Component/s: None
    • None
    • Fully Compatible
    • v5.0, v4.4, v4.2, v4.0
    • Query Execution 2021-07-12, Query Execution 2021-07-26
    • 84

      We are having this issue on MongoDB 4.2.14 after firing an application doing several tasks on the BD.
      The service after stopping could only be restored (started), if we stop the application otherwise mongod processso keeps crashing with same error.

      2021-06-11T11:36:49.564+0100 F  -        [conn29537] Invariant failure !_planYielding->getOpCtx()->lockState()->inAWriteUnitOfWork() src/mongo/db/query/plan_yield_policy.cpp 75
      2021-06-11T11:36:49.564+0100 F  -        [conn29537] \n\n***aborting after invariant() failure\n\n
      2021-06-11T11:36:49.610+0100 F  -        [conn29537] Got signal: 6 (Aborted).
       0x5562fc0c1361 0x5562fc0c098c 0x5562fc0c0a16 0x7fbe126bb630 0x7fbe12314387 0x7fbe12315a78 0x5562fa4cb78b 0x5562fa362e6e 0x5562fafbc776 0x5562fafbcf7d 0x5562faf9dfe6 0x5562faf9e3a4 0x5562fb9ced97 0x5562fb9cf247 0x5562fb9b7396 0x5562fb9f64bd 0x5562faf74535 0x5562faf743a6 0x5562faf74ae8 0x5562fafbc7e0 0x5562fafbcf7d 0x5562fac92214 0x5562fac96fbf 0x5562fac8a2cf 0x5562fa958caa 0x5562fa959f95 0x5562fa95bf14 0x5562fa95cc7a 0x5562fa94970c 0x5562fa9567ac 0x5562fa953b4f 0x5562fa95571c 0x5562fb7d6d02 0x5562fa950bad 0x5562fa9523ab 0x5562fa952e46 0x5562fa953aab 0x5562fa95571c 0x5562fb7d716b 0x5562fbe31d05 0x5562fbe31d64 0x7fbe126b3ea5 0x7fbe123dc96d
      ----- BEGIN BACKTRACE -----
      {"backtrace":[{"b":"5562F97AD000","o":"2914361","s":"_ZN5mongo15printStackTraceERSo"},{"b":"5562F97AD000","o":"291398C"},{"b":"5562F97AD000","o":"2913A16"},{"b":"7FBE126AC000","o":"F630"},{"b":"7FBE122DE000","o":"36387","s":"gsignal"},{"b":"7FBE122DE000","o":"37A78","s":"abort"},{"b":"5562F97AD000","o":"D1E78B","s":"_ZN5mongo12verifyFailedEPKcS1_j"},{"b":"5562F97AD000","o":"BB5E6E"},{"b":"5562F97AD000","o":"180F776","s":"_ZN5mongo16PlanExecutorImpl12_getNextImplEPNS_11SnapshottedINS_7BSONObjEEEPNS_8RecordIdE"},{"b":"5562F97AD000","o":"180FF7D","s":"_ZN5mongo16PlanExecutorImpl7getNextEPNS_7BSONObjEPNS_8RecordIdE"},{"b":"5562F97AD000","o":"17F0FE6","s":"_ZN5mongo20DocumentSourceCursor9loadBatchEv"},{"b":"5562F97AD000","o":"17F13A4","s":"_ZN5mongo20DocumentSourceCursor7getNextEv"},{"b":"5562F97AD000","o":"2221D97","s":"_ZN5mongo36DocumentSourceSampleFromRandomCursor27getNextNonDuplicateDocumentEv"},{"b":"5562F97AD000","o":"2222247","s":"_ZN5mongo36DocumentSourceSampleFromRandomCursor7getNextEv"},{"b":"5562F97AD000","o":"220A396","s":"_ZN5mongo19DocumentSourceMatch7getNextEv"},{"b":"5562F97AD000","o":"22494BD","s":"_ZN5mongo8Pipeline7getNextEv"},{"b":"5562F97AD000","o":"17C7535","s":"_ZN5mongo18PipelineProxyStage11getNextBsonEv"},{"b":"5562F97AD000","o":"17C73A6","s":"_ZN5mongo18PipelineProxyStage6doWorkEPm"},{"b":"5562F97AD000","o":"17C7AE8","s":"_ZN5mongo9PlanStage4workEPm"},{"b":"5562F97AD000","o":"180F7E0","s":"_ZN5mongo16PlanExecutorImpl12_getNextImplEPNS_11SnapshottedINS_7BSONObjEEEPNS_8RecordIdE"},{"b":"5562F97AD000","o":"180FF7D","s":"_ZN5mongo16PlanExecutorImpl7getNextEPNS_7BSONObjEPNS_8RecordIdE"},{"b":"5562F97AD000","o":"14E5214"},{"b":"5562F97AD000","o":"14E9FBF","s":"_ZN5mongo12runAggregateEPNS_16OperationContextERKNS_15NamespaceStringERKNS_18AggregationRequestERKNS_7BSONObjERKSt6vectorINS_9PrivilegeESaISC_EEPNS_3rpc21ReplyBuilderInterfaceE"},{"b":"5562F97AD000","o":"14DD2CF"},{"b":"5562F97AD000","o":"11ABCAA"},{"b":"5562F97AD000","o":"11ACF95"},{"b":"5562F97AD000","o":"11AEF14"},{"b":"5562F97AD000","o":"11AFC7A","s":"_ZN5mongo23ServiceEntryPointCommon13handleRequestEPNS_16OperationContextERKNS_7MessageERKNS0_5HooksE"},{"b":"5562F97AD000","o":"119C70C","s":"_ZN5mongo23ServiceEntryPointMongod13handleRequestEPNS_16OperationContextERKNS_7MessageE"},{"b":"5562F97AD000","o":"11A97AC","s":"_ZN5mongo19ServiceStateMachine15_processMessageENS0_11ThreadGuardE"},{"b":"5562F97AD000","o":"11A6B4F","s":"_ZN5mongo19ServiceStateMachine15_runNextInGuardENS0_11ThreadGuardE"},{"b":"5562F97AD000","o":"11A871C"},{"b":"5562F97AD000","o":"2029D02","s":"_ZN5mongo9transport26ServiceExecutorSynchronous8scheduleESt8functionIFvvEENS0_15ServiceExecutor13ScheduleFlagsENS0_23ServiceExecutorTaskNameE"},{"b":"5562F97AD000","o":"11A3BAD","s":"_ZN5mongo19ServiceStateMachine22_scheduleNextWithGuardENS0_11ThreadGuardENS_9transport15ServiceExecutor13ScheduleFlagsENS2_23ServiceExecutorTaskNameENS0_9OwnershipE"},{"b":"5562F97AD000","o":"11A53AB","s":"_ZN5mongo19ServiceStateMachine15_sourceCallbackENS_6StatusE"},{"b":"5562F97AD000","o":"11A5E46","s":"_ZN5mongo19ServiceStateMachine14_sourceMessageENS0_11ThreadGuardE"},{"b":"5562F97AD000","o":"11A6AAB","s":"_ZN5mongo19ServiceStateMachine15_runNextInGuardENS0_11ThreadGuardE"},{"b":"5562F97AD000","o":"11A871C"},{"b":"5562F97AD000","o":"202A16B"},{"b":"5562F97AD000","o":"2684D05"},{"b":"5562F97AD000","o":"2684D64"},{"b":"7FBE126AC000","o":"7EA5"},{"b":"7FBE122DE000","o":"FE96D","s":"clone"}],"processInfo":{ "mongodbVersion" : "4.2.11", "gitVersion" : "ea38428f0c6742c7c2c7f677e73d79e17a2aab96", "compiledModules" : [], "uname" : { "sysname" : "Linux", "release" : "3.10.0-1062.12.1.el7.x86_64", "version" : "#1 SMP Tue Feb 4 23:02:59 UTC 2020", "machine" : "x86_64" }, "somap" : [ { "b" : "5562F97AD000", "elfType" : 3, "buildId" : "5630DD35AEAAF9DD47E830FA1CB312954AEBF72C" }, { "b" : "7FFE9E227000", "elfType" : 3, "buildId" : "4AF65CC22641CA1EF6020AAC0B8769BA121B370E" }, { "b" : "7FBE13ADB000", "path" : "/lib64/libcurl.so.4", "elfType" : 3, "buildId" : "AA185EEE9B8EE0BCE652F7A6E9AAD07B1B3808C4" }, { "b" : "7FBE138C1000", "path" : "/lib64/libresolv.so.2", "elfType" : 3, "buildId" : "C3B2DD93CD59A17EA97148EC98C2667ADB9987A3" }, { "b" : "7FBE1345E000", "path" : "/lib64/libcrypto.so.10", "elfType" : 3, "buildId" : "4CF1939F660008CFA869D8364651F31AACD2C1C4" }, { "b" : "7FBE131EC000", "path" : "/lib64/libssl.so.10", "elfType" : 3, "buildId" : "3B305C3BA17FE394862E749763F2956C9C890C2E" }, { "b" : "7FBE12FE8000", "path" : "/lib64/libdl.so.2", "elfType" : 3, "buildId" : "F2C36986E11A291A0D4BCB3A81632B24AE2359EA" }, { "b" : "7FBE12DE0000", "path" : "/lib64/librt.so.1", "elfType" : 3, "buildId" : "CCD4BE566DD5A8FC7FA62B224C14B698F51B0D0D" }, { "b" : "7FBE12ADE000", "path" : "/lib64/libm.so.6", "elfType" : 3, "buildId" : "085D924F5D23B9F15A8AD28B7231EE93C09E13F1" }, { "b" : "7FBE128C8000", "path" : "/lib64/libgcc_s.so.1", "elfType" : 3, "buildId" : "EDF51350C7F71496149D064AA8B1441F786DF88A" }, { "b" : "7FBE126AC000", "path" : "/lib64/libpthread.so.0", "elfType" : 3, "buildId" : "2B482B3BAE79DEF4E5BC9791BC6BBDAE0E93E359" }, { "b" : "7FBE122DE000", "path" : "/lib64/libc.so.6", "elfType" : 3, "buildId" : "F9FAFDE281E0E0E2AF45911AD0FA115B64C2CEA8" }, { "b" : "7FBE13D45000", "path" : "/lib64/ld-linux-x86-64.so.2", "elfType" : 3, "buildId" : "F661F01D5570D658EF1EE970FE90D894B636F15A" }, { "b" : "7FBE120AB000", "path" : "/lib64/libidn.so.11", "elfType" : 3, "buildId" : "2B77BBEFFF65E94F3E0B71A4E89BEB68C4B476C5" }, { "b" : "7FBE11E7E000", "path" : "/lib64/libssh2.so.1", "elfType" : 3, "buildId" : "CB0BD6C014F41EC926FAC41322C82FF4A5EB88B9" }, { "b" : "7FBE11C21000", "path" : "/lib64/libssl3.so", "elfType" : 3, "buildId" : "AAEB3A8C75F24B6EF9E965F4C7B41F1D10E4A1E3" }, { "b" : "7FBE119F9000", "path" : "/lib64/libsmime3.so", "elfType" : 3, "buildId" : "CED43363B6A38A426D2A5EEECC7A267DD7BFBD60" }, { "b" : "7FBE116C5000", "path" : "/lib64/libnss3.so", "elfType" : 3, "buildId" : "8EBF98BF33F01E42E4388F6E256B56D1325A54EA" }, { "b" : "7FBE11495000", "path" : "/lib64/libnssutil3.so", "elfType" : 3, "buildId" : "A61604F9C4E3F975A0A1742174F08D6ECF987A63" }, { "b" : "7FBE11291000", "path" : "/lib64/libplds4.so", "elfType" : 3, "buildId" : "E761D8698407F6521F26F579D61D5EC8F7EF04A9" }, { "b" : "7FBE1108C000", "path" : "/lib64/libplc4.so", "elfType" : 3, "buildId" : "41E234507D6BB1E4FE56A078127D36C1963460CC" }, { "b" : "7FBE10E4E000", "path" : "/lib64/libnspr4.so", "elfType" : 3, "buildId" : "051956498509E67F79215B76781C1AA0504EB5D5" }, { "b" : "7FBE10C01000", "path" : "/lib64/libgssapi_krb5.so.2", "elfType" : 3, "buildId" : "0CAEC124D97114DA40DDEB0FED1FAD5D14C3D626" }, { "b" : "7FBE10918000", "path" : "/lib64/libkrb5.so.3", "elfType" : 3, "buildId" : "4EBF28968DA5784ED6606BFF7C1915C50AC24502" }, { "b" : "7FBE106E5000", "path" : "/lib64/libk5crypto.so.3", "elfType" : 3, "buildId" : "5FF9D1075A8D5D62F77F5CE56C935FCD92C62EFA" }, { "b" : "7FBE104E1000", "path" : "/lib64/libcom_err.so.2", "elfType" : 3, "buildId" : "2ADDB65846A50CE45F0C9B62EA35DDA62C6AD7A2" }, { "b" : "7FBE102D2000", "path" : "/lib64/liblber-2.4.so.2", "elfType" : 3, "buildId" : "8804516A3226CFB54589FEC0E27D89C93DAF92FF" }, { "b" : "7FBE1007D000", "path" : "/lib64/libldap-2.4.so.2", "elfType" : 3, "buildId" : "C9414F20B30965A695CA00FCD957D286B6DBCA94" }, { "b" : "7FBE0FE67000", "path" : "/lib64/libz.so.1", "elfType" : 3, "buildId" : "B9D5F73428BD6AD68C96986B57BEA3B7CEDB9745" }, { "b" : "7FBE0FC57000", "path" : "/lib64/libkrb5support.so.0", "elfType" : 3, "buildId" : "779381063DAECC27E8480C8F79F0651162586478" }, { "b" : "7FBE0FA53000", "path" : "/lib64/libkeyutils.so.1", "elfType" : 3, "buildId" : "2E01D5AC08C1280D013AAB96B292AC58BC30A263" }, { "b" : "7FBE0F836000", "path" : "/lib64/libsasl2.so.3", "elfType" : 3, "buildId" : "E2F2017F821DD1B9D307DA1A9B8014F2941AEB7B" }, { "b" : "7FBE0F60F000", "path" : "/lib64/libselinux.so.1", "elfType" : 3, "buildId" : "903A0BD0BFB4FEE8C284F41BEB9773DED94CBC52" }, { "b" : "7FBE0F3D8000", "path" : "/lib64/libcrypt.so.1", "elfType" : 3, "buildId" : "164A07A654E3B6AA09A43BF9ACE3728AB02BD0D7" }, { "b" : "7FBE0F176000", "path" : "/lib64/libpcre.so.1", "elfType" : 3, "buildId" : "9CA3D11F018BEEB719CDB34BE800BF1641350D0A" }, { "b" : "7FBE0EF73000", "path" : "/lib64/libfreebl3.so", "elfType" : 3, "buildId" : "020C788B41DCC71AEE66B822D7670BC4347DA006" } ] }}
       mongod(_ZN5mongo15printStackTraceERSo+0x41) [0x5562fc0c1361]
       mongod(+0x291398C) [0x5562fc0c098c]
       mongod(+0x2913A16) [0x5562fc0c0a16]
       libpthread.so.0(+0xF630) [0x7fbe126bb630]
       libc.so.6(gsignal+0x37) [0x7fbe12314387]
       libc.so.6(abort+0x148) [0x7fbe12315a78]
       mongod(_ZN5mongo12verifyFailedEPKcS1_j+0x0) [0x5562fa4cb78b]
       mongod(+0xBB5E6E) [0x5562fa362e6e]
       mongod(_ZN5mongo16PlanExecutorImpl12_getNextImplEPNS_11SnapshottedINS_7BSONObjEEEPNS_8RecordIdE+0x1C6) [0x5562fafbc776]
       mongod(_ZN5mongo16PlanExecutorImpl7getNextEPNS_7BSONObjEPNS_8RecordIdE+0x4D) [0x5562fafbcf7d]
       mongod(_ZN5mongo20DocumentSourceCursor9loadBatchEv+0x2E6) [0x5562faf9dfe6]
       mongod(_ZN5mongo20DocumentSourceCursor7getNextEv+0xB4) [0x5562faf9e3a4]
       mongod(_ZN5mongo36DocumentSourceSampleFromRandomCursor27getNextNonDuplicateDocumentEv+0x67) [0x5562fb9ced97]
       mongod(_ZN5mongo36DocumentSourceSampleFromRandomCursor7getNextEv+0x87) [0x5562fb9cf247]
       mongod(_ZN5mongo19DocumentSourceMatch7getNextEv+0x56) [0x5562fb9b7396]
       mongod(_ZN5mongo8Pipeline7getNextEv+0x3D) [0x5562fb9f64bd]
       mongod(_ZN5mongo18PipelineProxyStage11getNextBsonEv+0x35) [0x5562faf74535]
       mongod(_ZN5mongo18PipelineProxyStage6doWorkEPm+0x46) [0x5562faf743a6]
       mongod(_ZN5mongo9PlanStage4workEPm+0x68) [0x5562faf74ae8]
       mongod(_ZN5mongo16PlanExecutorImpl12_getNextImplEPNS_11SnapshottedINS_7BSONObjEEEPNS_8RecordIdE+0x230) [0x5562fafbc7e0]
       mongod(_ZN5mongo16PlanExecutorImpl7getNextEPNS_7BSONObjEPNS_8RecordIdE+0x4D) [0x5562fafbcf7d]
       mongod(+0x14E5214) [0x5562fac92214]
       mongod(_ZN5mongo12runAggregateEPNS_16OperationContextERKNS_15NamespaceStringERKNS_18AggregationRequestERKNS_7BSONObjERKSt6vectorINS_9PrivilegeESaISC_EEPNS_3rpc21ReplyBuilderInterfaceE+0x275F) [0x5562fac96fbf]
       mongod(+0x14DD2CF) [0x5562fac8a2cf]
       mongod(+0x11ABCAA) [0x5562fa958caa]
       mongod(+0x11ACF95) [0x5562fa959f95]
       mongod(+0x11AEF14) [0x5562fa95bf14]
       mongod(_ZN5mongo23ServiceEntryPointCommon13handleRequestEPNS_16OperationContextERKNS_7MessageERKNS0_5HooksE+0x42A) [0x5562fa95cc7a]
       mongod(_ZN5mongo23ServiceEntryPointMongod13handleRequestEPNS_16OperationContextERKNS_7MessageE+0x3C) [0x5562fa94970c]
       mongod(_ZN5mongo19ServiceStateMachine15_processMessageENS0_11ThreadGuardE+0xEC) [0x5562fa9567ac]
       mongod(_ZN5mongo19ServiceStateMachine15_runNextInGuardENS0_11ThreadGuardE+0x17F) [0x5562fa953b4f]
       mongod(+0x11A871C) [0x5562fa95571c]
       mongod(_ZN5mongo9transport26ServiceExecutorSynchronous8scheduleESt8functionIFvvEENS0_15ServiceExecutor13ScheduleFlagsENS0_23ServiceExecutorTaskNameE+0x182) [0x5562fb7d6d02]
       mongod(_ZN5mongo19ServiceStateMachine22_scheduleNextWithGuardENS0_11ThreadGuardENS_9transport15ServiceExecutor13ScheduleFlagsENS2_23ServiceExecutorTaskNameENS0_9OwnershipE+0x10D) [0x5562fa950bad]
       mongod(_ZN5mongo19ServiceStateMachine15_sourceCallbackENS_6StatusE+0x6DB) [0x5562fa9523ab]
       mongod(_ZN5mongo19ServiceStateMachine14_sourceMessageENS0_11ThreadGuardE+0x316) [0x5562fa952e46]
       mongod(_ZN5mongo19ServiceStateMachine15_runNextInGuardENS0_11ThreadGuardE+0xDB) [0x5562fa953aab]
       mongod(+0x11A871C) [0x5562fa95571c]
       mongod(+0x202A16B) [0x5562fb7d716b]
       mongod(+0x2684D05) [0x5562fbe31d05]
       mongod(+0x2684D64) [0x5562fbe31d64]
       libpthread.so.0(+0x7EA5) [0x7fbe126b3ea5]
       libc.so.6(clone+0x6D) [0x7fbe123dc96d]
      -----  END BACKTRACE  -----_
      

            Assignee:
            mihai.andrei@mongodb.com Mihai Andrei
            Reporter:
            paulo.pereira@cmas-systems.com Paulo Pereira
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: