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

KeyString needs to support NUL bytes in Strings

    • Fully Compatible
    • ALL

      This bug only affects the WiredTiger storage engine.

      Invariant failure false src/mongo/db/storage/key_string.cpp 873
      
      #0  0x00007ffff7bcc20b in raise (sig=5) at ../nptl/sysdeps/unix/sysv/linux/pt-raise.c:37
      #1  0x00000000018a8c95 in mongo::breakpoint () at src/mongo/util/debugger.cpp:62
      #2  0x000000000189e1f6 in mongo::invariantFailed (expr=0x1fe8014 "false", file=0x1fe7ff0 "src/mongo/db/storage/key_string.cpp", line=873) at src/mongo/util/assert_util.cpp:147
      #3  0x0000000001694b5e in mongo::(anonymous namespace)::toBsonValue (type=255 '\377', reader=0x7ffff7fc93a0, inverted=false, stream=0x7ffff7fc93e8) at src/mongo/db/storage/key_string.cpp:873
      #4  0x0000000001694e0d in mongo::KeyString::toBson (buffer=0x3515eb8 "<a", len=8, ord=...) at src/mongo/db/storage/key_string.cpp:894
      #5  0x000000000171aaac in mongo::WiredTigerIndex::IndexCursor::getKey (this=0x46041c0) at src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp:758
      #6  0x000000000141deda in mongo::BtreeIndexCursor::getKey (this=0x3092800) at src/mongo/db/index/btree_index_cursor.cpp:91
      #7  0x000000000136f572 in mongo::IndexScan::checkEnd (this=0x4702000) at src/mongo/db/exec/index_scan.cpp:334
      #8  0x000000000136e933 in mongo::IndexScan::work (this=0x4702000, out=0x7ffff7fc9678) at src/mongo/db/exec/index_scan.cpp:161
      #9  0x000000000135979b in mongo::FetchStage::work (this=0x33bf680, out=0x7ffff7fc9720) at src/mongo/db/exec/fetch.cpp:91
      #10 0x000000000135356a in mongo::DeleteStage::work (this=0x30a2dc0, out=0x7ffff7fc97e8) at src/mongo/db/exec/delete.cpp:81
      #11 0x0000000001562d6b in mongo::PlanExecutor::getNext (this=0x33cfa90, objOut=0x7ffff7fc9880, dlOut=0x0) at src/mongo/db/query/plan_executor.cpp:305
      #12 0x00000000015632b8 in mongo::PlanExecutor::executePlan (this=0x33cfa90) at src/mongo/db/query/plan_executor.cpp:417
      #13 0x0000000001304025 in mongo::multiRemove (txn=0x7ffff7fcc7e0, removeItem=..., result=0x7ffff7fc9a80) at src/mongo/db/commands/write_commands/batch_executor.cpp:1390
      #14 0x00000000013012eb in mongo::WriteBatchExecutor::execRemove (this=0x7ffff7fcb250, removeItem=..., error=0x7ffff7fcaf10) at src/mongo/db/commands/write_commands/batch_executor.cpp:929
      #15 0x00000000013009b9 in mongo::WriteBatchExecutor::bulkExecute (this=0x7ffff7fcb250, request=..., upsertedIds=0x7ffff7fcb0f0, errors=0x7ffff7fcb0d0)
          at src/mongo/db/commands/write_commands/batch_executor.cpp:788
      #16 0x00000000012fe81f in mongo::WriteBatchExecutor::executeBatch (this=0x7ffff7fcb250, request=..., response=0x7ffff7fcb290) at src/mongo/db/commands/write_commands/batch_executor.cpp:268
      #17 0x0000000001308622 in mongo::WriteCmd::run (this=0x30b4fb0, txn=0x7ffff7fcc7e0, dbName=..., cmdObj=..., options=0, errMsg=..., result=..., fromRepl=false)
          at src/mongo/db/commands/write_commands/write_commands.cpp:144
      #18 0x0000000001323cd7 in mongo::_execCommand (txn=0x7ffff7fcc7e0, c=0x30b4fb0, dbname=..., cmdObj=..., queryOptions=0, errmsg=..., result=..., fromRepl=false)
          at src/mongo/db/dbcommands.cpp:1252
      #19 0x0000000001324c54 in mongo::Command::execCommand (txn=0x7ffff7fcc7e0, c=0x30b4fb0, queryOptions=0, cmdns=0x33c4014 "test.$cmd", cmdObj=..., result=..., fromRepl=false)
          at src/mongo/db/dbcommands.cpp:1468
      #20 0x0000000001325536 in mongo::_runCommands (txn=0x7ffff7fcc7e0, ns=0x33c4014 "test.$cmd", _cmdobj=..., b=..., anObjBuilder=..., fromRepl=false, queryOptions=0)
          at src/mongo/db/dbcommands.cpp:1543
      #21 0x000000000152761c in mongo::runCommands (txn=0x7ffff7fcc7e0, ns=0x33c4014 "test.$cmd", jsobj=..., curop=..., b=..., anObjBuilder=..., fromRepl=false, queryOptions=0)
          at src/mongo/db/query/find.cpp:135
      #22 0x00000000015293a8 in mongo::runQuery (txn=0x7ffff7fcc7e0, m=..., q=..., curop=..., result=..., fromDBDirectClient=false) at src/mongo/db/query/find.cpp:569
      #23 0x000000000142f48a in mongo::receivedQuery (txn=0x7ffff7fcc7e0, c=..., dbresponse=..., m=..., fromDBDirectClient=false) at src/mongo/db/instance.cpp:212
      #24 0x0000000001430634 in mongo::assembleResponse (txn=0x7ffff7fcc7e0, m=..., dbresponse=..., remote=..., fromDBDirectClient=false) at src/mongo/db/instance.cpp:395
      #25 0x000000000113389a in mongo::MyMessageHandler::process (this=0x3082208, m=..., port=0x30a9f70, le=0x33cecd0) at src/mongo/db/db.cpp:197
      #26 0x00000000018c68c3 in mongo::PortMessageServer::handleIncomingMsg (arg=0x30a9f70) at src/mongo/util/net/message_server_port.cpp:225
      #27 0x00007ffff7bc4182 in start_thread (arg=0x7ffff7fcd700) at pthread_create.c:312
      #28 0x00007ffff6cc4efd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      

      Version: 75ca2609712b574be3b88cd40aec2ab0d8c59d0f

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

              Created:
              Updated:
              Resolved: