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

Invariant failure when applying zero-length DamageEvent during $unset

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 2.8.0-rc0
    • 2.7.4, 2.7.5, 2.7.6
    • Storage
    • ALL

    Description

      This bug only affects versions 2.7.4+.

      Backtrace from master (5e97d1e18637):

      2014-09-07T15:11:40.333-0400 I -        [conn1] Invariant failure len > 0 src/mongo/db/storage/mmap_v1/dur_recovery_unit.cpp 163
       
      Program received signal SIGTRAP, Trace/breakpoint trap.
      [Switching to Thread 0x7ffff7fcd700 (LWP 16562)]
      0x00007ffff7bcc20b in raise (sig=5) at ../nptl/sysdeps/unix/sysv/linux/pt-raise.c:37
      37	../nptl/sysdeps/unix/sysv/linux/pt-raise.c: No such file or directory.
      (gdb) bt
      #0  0x00007ffff7bcc20b in raise (sig=5) at ../nptl/sysdeps/unix/sysv/linux/pt-raise.c:37
      #1  0x00000000017d6008 in mongo::mongo_breakpoint () at src/mongo/util/debug_util.cpp:58
      #2  0x00000000017cc80a in mongo::breakpoint () at src/mongo/util/debug_util.h:73
      #3  0x00000000017cb67c in mongo::invariantFailed (msg=0x1e3507d "len > 0", file=0x1e34f70 "src/mongo/db/storage/mmap_v1/dur_recovery_unit.cpp", line=163) at src/mongo/util/assert_util.cpp:142
      #4  0x000000000163eb4e in mongo::DurRecoveryUnit::writingPtr (this=0x2e939a0, data=0x7fffde0fe0df, len=0) at src/mongo/db/storage/mmap_v1/dur_recovery_unit.cpp:163
      #5  0x000000000165678f in mongo::RecordStoreV1Base::updateWithDamages (this=0x3689510, txn=0x7ffff7fccab0, loc=..., damageSource=0x2e8de00 "\b", damages=...)
          at src/mongo/db/storage/mmap_v1/record_store_v1_base.cpp:352
      #6  0x00000000011be29c in mongo::Collection::updateDocumentWithDamages (this=0x3598c40, txn=0x7ffff7fccab0, loc=..., damangeSource=0x2e8de00 "\b", damages=...) at src/mongo/db/catalog/collection.cpp:418
      #7  0x0000000001303f77 in mongo::UpdateStage::transformAndUpdate (this=0x33cd200, oldObj=..., loc=...) at src/mongo/db/exec/update.cpp:500
      #8  0x00000000013053ab in mongo::UpdateStage::work (this=0x33cd200, out=0x7ffff7fcac38) at src/mongo/db/exec/update.cpp:751
      #9  0x00000000014bdfd2 in mongo::PlanExecutor::executePlan (this=0x357e440) at src/mongo/db/query/plan_executor.cpp:216
      #10 0x00000000013e82bd in mongo::update (db=0x2ec0e20, request=..., opDebug=0x570e270, driver=0x7ffff7fcaff0, cq=0x36c5640) at src/mongo/db/ops/update.cpp:131
      #11 0x00000000013ec015 in mongo::UpdateExecutor::execute (this=0x7ffff7fcafe0, db=0x2ec0e20) at src/mongo/db/ops/update_executor.cpp:71
      #12 0x000000000126809d in mongo::multiUpdate (txn=0x7ffff7fccab0, updateItem=..., result=0x7ffff7fcb110) at src/mongo/db/commands/write_commands/batch_executor.cpp:1129
      #13 0x0000000001266952 in mongo::WriteBatchExecutor::execUpdate (this=0x7ffff7fcb530, updateItem=..., upsertedId=0x7ffff7fcb1a0, error=0x7ffff7fcb178)
          at src/mongo/db/commands/write_commands/batch_executor.cpp:858
      #14 0x000000000126631a in mongo::WriteBatchExecutor::bulkExecute (this=0x7ffff7fcb530, request=..., upsertedIds=0x7ffff7fcb3e0, errors=0x7ffff7fcb3c0)
          at src/mongo/db/commands/write_commands/batch_executor.cpp:739
      #15 0x0000000001264023 in mongo::WriteBatchExecutor::executeBatch (this=0x7ffff7fcb530, request=..., response=0x7ffff7fcb560) at src/mongo/db/commands/write_commands/batch_executor.cpp:249
      #16 0x000000000126c87a in mongo::WriteCmd::run (this=0x358a300, txn=0x7ffff7fccab0, dbName=..., cmdObj=..., options=0, errMsg=..., result=..., fromRepl=false)
          at src/mongo/db/commands/write_commands/write_commands.cpp:135
      #17 0x000000000128469f in mongo::_execCommand (txn=0x7ffff7fccab0, c=0x358a300, dbname=..., cmdObj=..., queryOptions=0, errmsg=..., result=..., fromRepl=false) at src/mongo/db/dbcommands.cpp:1168
      #18 0x000000000128563c in mongo::Command::execCommand (txn=0x7ffff7fccab0, c=0x358a300, queryOptions=0, cmdns=0x35c5814 "test.$cmd", cmdObj=..., result=..., fromRepl=false)
          at src/mongo/db/dbcommands.cpp:1380
      #19 0x0000000001285f1e in mongo::_runCommands (txn=0x7ffff7fccab0, ns=0x35c5814 "test.$cmd", _cmdobj=..., b=..., anObjBuilder=..., fromRepl=false, queryOptions=0) at src/mongo/db/dbcommands.cpp:1452
      #20 0x000000000149b7d6 in mongo::runCommands (txn=0x7ffff7fccab0, ns=0x35c5814 "test.$cmd", jsobj=..., curop=..., b=..., anObjBuilder=..., fromRepl=false, queryOptions=0)
          at src/mongo/db/query/new_find.cpp:123
      #21 0x000000000149d0ce in mongo::newRunQuery (txn=0x7ffff7fccab0, m=..., q=..., curop=..., result=...) at src/mongo/db/query/new_find.cpp:464
      #22 0x00000000013868f6 in mongo::receivedQuery (txn=0x7ffff7fccab0, c=..., dbresponse=..., m=...) at src/mongo/db/instance.cpp:262
      #23 0x0000000001387a1d in mongo::assembleResponse (txn=0x7ffff7fccab0, m=..., dbresponse=..., remote=...) at src/mongo/db/instance.cpp:436
      #24 0x00000000010adb3a in mongo::MyMessageHandler::process (this=0x2e761b0, m=..., port=0x2e948f0, le=0x2e93b30) at src/mongo/db/db.cpp:196
      #25 0x00000000017f2315 in mongo::PortMessageServer::handleIncomingMsg (arg=0x2e86660) at src/mongo/util/net/message_server_port.cpp:227
      #26 0x00007ffff7bc4182 in start_thread (arg=0x7ffff7fcd700) at pthread_create.c:312
      #27 0x00007ffff6cc4fbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

      Attachments

        Activity

          People

            mathias@mongodb.com Mathias Stearn
            kamran.khan Kamran K.
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: