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

Segfault in DeleteStage::work

    • Fully Compatible
    • ALL
    • QuInt A (10/12/15)

      On a recent build from master, was running 8 mongo shell instances of the following:

      function insert_benchrun() {
          docs = []
          for (var i=0; i<10000; i++)
              docs.push({x:0})
          ops = [{
              op: "insert",
              ns: "test.c",
              doc: docs,
              safe: true,
          }]
          res = benchRun({
              ops: ops,
              seconds: 10000,
              parallel: 1
          })
          printjson(res)
      }
      

      and 2 mongo shell instances each doing the following:

      function remove(t) {
          while (true) {
              printjson([t, db.c.remove({})])
          }
      }
      

      Got the following segfault. Also observed via mongostat that the inserts were succeeding but no deletes were being done.

      2015-09-19T08:29:40.077-0400 F -        [conn5] Invalid access at address: 0x104fbff4
      2015-09-19T08:29:40.103-0400 F -        [conn5] Got signal: 11 (Segmentation fault).
      
       0x123a7a2 0x12398f9 0x1239c87 0x7fd7559af340 0x7fd755672005 0x9655c8 0x965641 0xbb02cc 0xb6e056 0xd9f22d 0xd9f899 0xd9f95d 0xb2817f 0xb29230 0xb29782 0xb2c6e5 0xb44c07 0xb45a20 0xaa093d 0xc4d90e 0x945fed 0x11f755d 0x7fd7559a7182 0x7fd7556d447d
      ----- BEGIN BACKTRACE -----
      {"backtrace":[{"b":"400000","o":"E3A7A2"},{"b":"400000","o":"E398F9"},{"b":"400000","o":"E39C87"},{"b":"7FD75599F000","o":"10340"},{"b":"7FD7555DA000","o":"98005"},{"b":"400000","o":"5655C8"},{"b":"400000","o":"565641"},{"b":"400000","o":"7B02CC"},{"b":"400000","o":"76E056"},{"b":"400000","o":"99F22D"},{"b":"400000","o":"99F899"},{"b":"400000","o":"99F95D"},{"b":"400000","o":"72817F"},{"b":"400000","o":"729230"},{"b":"400000","o":"729782"},{"b":"400000","o":"72C6E5"},{"b":"400000","o":"744C07"},{"b":"400000","o":"745A20"},{"b":"400000","o":"6A093D"},{"b":"400000","o":"84D90E"},{"b":"400000","o":"545FED"},{"b":"400000","o":"DF755D"},{"b":"7FD75599F000","o":"8182"},{"b":"7FD7555DA000","o":"FA47D"}],"processInfo":{ "mongodbVersion" : "3.1.9-pre-", "gitVersion" : "e61e8a9cbd3c5c1e5a46fc74f4b5ab5ce879c115", "compiledModules" : [], "uname" : { "sysname" : "Linux", "release" : "3.13.0-32-generic", "version" : "#57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014", "machine" : "x86_64" }, "somap" : [ { "elfType" : 2, "b" : "400000", "buildId" : "F1C60041E5958103EAB8B03EA61A47F4AEE8A06D" }, { "b" : "7FFF668FE000", "elfType" : 3, "buildId" : "E464DBB7341B7B9E7874DC0619C5F429416E6AC6" }, { "b" : "7FD7565E1000", "path" : "/lib/x86_64-linux-gnu/librt.so.1", "elfType" : 3, "buildId" : "92FCF41EFE012D6186E31A59AD05BDBB487769AB" }, { "b" : "7FD7563DD000", "path" : "/lib/x86_64-linux-gnu/libdl.so.2", "elfType" : 3, "buildId" : "C1AE4CB7195D337A77A3C689051DABAA3980CA0C" }, { "b" : "7FD7560D9000", "path" : "/usr/lib/x86_64-linux-gnu/libstdc++.so.6", "elfType" : 3, "buildId" : "4BF6F7ADD8244AD86008E6BF40D90F8873892197" }, { "b" : "7FD755DD3000", "path" : "/lib/x86_64-linux-gnu/libm.so.6", "elfType" : 3, "buildId" : "1D76B71E905CB867B27CEF230FCB20F01A3178F5" }, { "b" : "7FD755BBD000", "path" : "/lib/x86_64-linux-gnu/libgcc_s.so.1", "elfType" : 3, "buildId" : "CC0D578C2E0D86237CA7B0CE8913261C506A629A" }, { "b" : "7FD75599F000", "path" : "/lib/x86_64-linux-gnu/libpthread.so.0", "elfType" : 3, "buildId" : "9318E8AF0BFBE444731BB0461202EF57F7C39542" }, { "b" : "7FD7555DA000", "path" : "/lib/x86_64-linux-gnu/libc.so.6", "elfType" : 3, "buildId" : "30C94DC66A1FE95180C3D68D2B89E576D5AE213C" }, { "b" : "7FD7567E9000", "path" : "/lib64/ld-linux-x86-64.so.2", "elfType" : 3, "buildId" : "9F00581AB3C73E3AEA35995A0C50D24D59A01D47" } ] }}
       mongod(_ZN5mongo15printStackTraceERSo+0x32) [0x123a7a2]
       mongod(+0xE398F9) [0x12398f9]
       mongod(+0xE39C87) [0x1239c87]
       libpthread.so.0(+0x10340) [0x7fd7559af340]
       libc.so.6(+0x98005) [0x7fd755672005]
       mongod(_ZNK5mongo7BSONObj4copyEv+0x38) [0x9655c8]
       mongod(_ZNK5mongo7BSONObj8getOwnedEv+0x41) [0x965641]
       mongod(_ZN5mongo16WorkingSetMember20makeObjOwnedIfNeededEv+0x3C) [0xbb02cc]
       mongod(_ZN5mongo11DeleteStage4workEPm+0x5C6) [0xb6e056]
       mongod(_ZN5mongo12PlanExecutor11getNextImplEPNS_11SnapshottedINS_7BSONObjEEEPNS_8RecordIdE+0x28D) [0xd9f22d]
       mongod(_ZN5mongo12PlanExecutor7getNextEPNS_7BSONObjEPNS_8RecordIdE+0x39) [0xd9f899]
       mongod(_ZN5mongo12PlanExecutor11executePlanEv+0x4D) [0xd9f95d]
       mongod(_ZN5mongo18WriteBatchExecutor10execRemoveERKNS_12BatchItemRefEPPNS_16WriteErrorDetailE+0x4FF) [0xb2817f]
       mongod(_ZN5mongo18WriteBatchExecutor11bulkExecuteERKNS_21BatchedCommandRequestEPSt6vectorIPNS_19BatchedUpsertDetailESaIS6_EEPS4_IPNS_16WriteErrorDetailESaISB_EE+0x120) [0xb29230]
       mongod(_ZN5mongo18WriteBatchExecutor12executeBatchERKNS_21BatchedCommandRequestEPNS_22BatchedCommandResponseE+0x1D2) [0xb29782]
       mongod(_ZN5mongo8WriteCmd3runEPNS_16OperationContextERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderE+0x235) [0xb2c6e5]
       mongod(_ZN5mongo7Command3runEPNS_16OperationContextERKNS_3rpc16RequestInterfaceEPNS3_21ReplyBuilderInterfaceE+0x277) [0xb44c07]
       mongod(_ZN5mongo7Command11execCommandEPNS_16OperationContextEPS0_RKNS_3rpc16RequestInterfaceEPNS4_21ReplyBuilderInterfaceE+0x410) [0xb45a20]
       mongod(_ZN5mongo11runCommandsEPNS_16OperationContextERKNS_3rpc16RequestInterfaceEPNS2_21ReplyBuilderInterfaceE+0x1AD) [0xaa093d]
       mongod(_ZN5mongo16assembleResponseEPNS_16OperationContextERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE+0xB8E) [0xc4d90e]
       mongod(_ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortE+0xDD) [0x945fed]
       mongod(_ZN5mongo17PortMessageServer17handleIncomingMsgEPv+0x27D) [0x11f755d]
       libpthread.so.0(+0x8182) [0x7fd7559a7182]
       libc.so.6(clone+0x6D) [0x7fd7556d447d]
      

            Assignee:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Reporter:
            bruce.lucas@mongodb.com Bruce Lucas (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: