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

Invariant failure with QueryOption_AwaitData

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.2.13
    • Affects Version/s: 3.2.12
    • Component/s: None
    • Environment:
      centos 6.3, mongod 3.2.10
    • Fully Compatible
    • ALL
    • Hide

      (1) 3.2.10 mongod and replica mode
      (2) I run a query with option only QueryOption_AwaitData without QueryOption_CursorTailable, such as

      cursor = src_conn_->query(src_ns, opt_.filter.snapshot(), 0, 0, NULL,
                                       mongo::QueryOption_AwaitData | mongo::QueryOption_SlaveOk | mongo::QueryOption_NoCursorTimeout);
      

      then I run cursor->more(), such as:

      while (cursor->more()) {
          ......
      }
      

      (3) Then mongod crashes

      Show
      (1) 3.2.10 mongod and replica mode (2) I run a query with option only QueryOption_AwaitData without QueryOption_CursorTailable, such as cursor = src_conn_->query(src_ns, opt_.filter.snapshot(), 0, 0, NULL , mongo::QueryOption_AwaitData | mongo::QueryOption_SlaveOk | mongo::QueryOption_NoCursorTimeout); then I run cursor->more() , such as: while (cursor->more()) { ...... } (3) Then mongod crashes
    • Query 2017-04-17, Query 2017-05-08

      With 3.2.10 mongod and replica mode:
      I run a query with option only QueryOption_AwaitData without QueryOption_CursorTailable, such as

      cursor = src_conn_->query(src_ns, opt_.filter.snapshot(), 0, 0, NULL,
                                       mongo::QueryOption_AwaitData | mongo::QueryOption_SlaveOk | mongo::QueryOption_NoCursorTimeout);
      

      then I run cursor->more(), such as:

      while (cursor->more()) {
          ......
      }
      

      Then mongod crashes:

      2017-04-12T18:02:44.953+0800 I -        [conn2304] Invariant failure ctx->getCollection()->isCapped() src/mongo/db/query/find.cpp 374
      2017-04-12T18:02:44.953+0800 I -        [conn2304]
      
      ***aborting after invariant() failure
      
      
      2017-04-12T18:02:44.956+0800 F -        [conn2304] Got signal: 6 (Aborted).
      
       0x12ed782 0x12ec6b9 0x12ecec2 0x7f3dcd910710 0x7f3dcd59f925 0x7f3dcd5a1105 0x128072b 0xdb564c 0xc8e7b9 0xc94265 0x95f1ec 0x12a8025 0x7f3dcd9089d1 0x7f3dcd655b6d
      ----- BEGIN BACKTRACE -----
      {"backtrace":[{"b":"400000","o":"EED782","s":"_ZN5mongo15printStackTraceERSo"},{"b":"400000","o":"EEC6B9"},{"b":"400000","o":"EECEC2"},{"b":"7F3DCD901000","o":"F710"},{"b":"7F3DCD56D000","o":"32925","s":"gsignal"},{"b":"7F3DCD56D000","o":"34105","s":"abort"},{"b":"400000","o":"E8072B","s":"_ZN5mongo15invariantFailedEPKcS1_j"},{"b":"400000","o":"9B564C","s":"_ZN5mongo7getMoreEPNS_16OperationContextEPKcixPbS4_"},{"b":"400000","o":"88E7B9","s":"_ZN5mongo15receivedGetMoreEPNS_16OperationContextERNS_10DbResponseERNS_7MessageERNS_5CurOpE"},{"b":"400000","o":"894265","s":"_ZN5mongo16assembleResponseEPNS_16OperationContextERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE"},{"b":"400000","o":"55F1EC","s":"_ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortE"},{"b":"400000","o":"EA8025","s":"_ZN5mongo17PortMessageServer17handleIncomingMsgEPv"},{"b":"7F3DCD901000","o":"79D1"},{"b":"7F3DCD56D000","o":"E8B6D","s":"clone"}],"processInfo":{ "mongodbVersion" : "3.2.10", "gitVersion" : "nogitversion", "compiledModules" : [], "uname" : { "sysname" : "Linux", "release" : "3.10.0-123.6.el6.ksyun.x86_64", "version" : "#1 SMP Tue Mar 29 16:43:28 CST 2016", "machine" : "x86_64" }, "somap" : [ { "elfType" : 2, "b" : "400000" }, { "b" : "7FFF020FE000", "elfType" : 3, "buildId" : "4BA45FD65AD5CEA636B3FCFFA4C06AB086B09778" }, { "b" : "7F3DCE4C5000", "path" : "/lib64/librt.so.1", "elfType" : 3, "buildId" : "B26528BF6C0636AC1CAE5AC50BDBC07E60851DF4" }, { "b" : "7F3DCE2C1000", "path" : "/lib64/libdl.so.2", "elfType" : 3, "buildId" : "AFC7448F2F2F6ED4E5BC82B1BD8A7320B84A9D48" }, { "b" : "7F3DCDFB8000", "path" : "/usr/lib64/libstdc++.so.6", "elfType" : 3 }, { "b" : "7F3DCDD34000", "path" : "/lib64/libm.so.6", "elfType" : 3, "buildId" : "98B028A725D6E93253F25DF00B794DFAA66A3145" }, { "b" : "7F3DCDB1E000", "path" : "/lib64/libgcc_s.so.1", "elfType" : 3, "buildId" : "A44499D29B114A5366CD72DD4883958495AC1C1D" }, { "b" : "7F3DCD901000", "path" : "/lib64/libpthread.so.0", "elfType" : 3, "buildId" : "1BB4E10307D6B94223749CFDF2AD14C365972C60" }, { "b" : "7F3DCD56D000", "path" : "/lib64/libc.so.6", "elfType" : 3, "buildId" : "F1A1C0575F0EC141A157E5DFA4525E70BD27B62E" }, { "b" : "7F3DCE6CD000", "path" : "/lib64/ld-linux-x86-64.so.2", "elfType" : 3, "buildId" : "57BF668F99B7F5917B8D55FBB645173C9A644575" } ] }}
       mongod(_ZN5mongo15printStackTraceERSo+0x32) [0x12ed782]
       mongod(+0xEEC6B9) [0x12ec6b9]
       mongod(+0xEECEC2) [0x12ecec2]
       libpthread.so.0(+0xF710) [0x7f3dcd910710]
       libc.so.6(gsignal+0x35) [0x7f3dcd59f925]
       libc.so.6(abort+0x175) [0x7f3dcd5a1105]
       mongod(_ZN5mongo15invariantFailedEPKcS1_j+0xCB) [0x128072b]
       mongod(_ZN5mongo7getMoreEPNS_16OperationContextEPKcixPbS4_+0x13CC) [0xdb564c]
       mongod(_ZN5mongo15receivedGetMoreEPNS_16OperationContextERNS_10DbResponseERNS_7MessageERNS_5CurOpE+0x1A9) [0xc8e7b9]
       mongod(_ZN5mongo16assembleResponseEPNS_16OperationContextERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE+0xE35) [0xc94265]
       mongod(_ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortE+0xEC) [0x95f1ec]
       mongod(_ZN5mongo17PortMessageServer17handleIncomingMsgEPv+0x325) [0x12a8025]
       libpthread.so.0(+0x79D1) [0x7f3dcd9089d1]
       libc.so.6(clone+0x6D) [0x7f3dcd655b6d]
      -----  END BACKTRACE  -----
      

            Assignee:
            nicholas.zolnierz@mongodb.com Nicholas Zolnierz
            Reporter:
            aaron_french Aaron French
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: