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

Invariant failure: out-of-order index keys with v0 WiredTiger index

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Minor Change
    • Operating System:
      ALL
    • Steps To Reproduce:
      Hide

      var t = db.wt_v0;
      t.drop();
       
      t.insert({a: {b: 1}});
      t.insert({a: {a: 1}});
      t.ensureIndex({a: 1}, {v: 0}); // v:0 is required

      Show
      var t = db.wt_v0; t.drop();   t.insert({a: {b: 1}}); t.insert({a: {a: 1}}); t.ensureIndex({a: 1}, {v: 0}); // v:0 is required

      Description

      This bug only seems to affect v:0 indexes with WiredTiger (which may not be a sensible combination).

      2015-01-16T00:05:25.113-0500 E STORAGE  [conn1] WiredTiger (22) [1421384725:113676][9472:0x7ffff7fcc700], file:index-4-6490722470707178545.wt, cursor.insert: bulk-load presented with out-of-order keys: F\1ea\00+\02\00\04\00\10 compares smaller than previously inserted key F\1eb\00+\02\00\04\00\08: Invalid argument
      2015-01-16T00:05:25.113-0500 I -        [conn1] Invariant failure: _cursor->insert(_cursor) resulted in status BadValue 22: Invalid argument at src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp 451
       
      #0  0x00007ffff7bcc20b in raise (sig=5) at ../nptl/sysdeps/unix/sysv/linux/pt-raise.c:37
      #1  0x00000000018bbc89 in mongo::breakpoint () at src/mongo/util/debugger.cpp:63
      #2  0x00000000018b132e in mongo::invariantOKFailed (expr=0x2014c07 "_cursor->insert(_cursor)", status=..., file=0x2014a28 "src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp", line=451)
          at src/mongo/util/assert_util.cpp:157
      #3  0x000000000172b8e4 in mongo::WiredTigerIndex::StandardBulkBuilder::addKey (this=0x34f2100, key=..., loc=...) at src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp:451
      #4  0x0000000001414a6b in mongo::BtreeBasedBulkAccessMethod::commit (this=0x3457900, dupsToDrop=0x0, mayInterrupt=true, dupsAllowed=true) at src/mongo/db/index/btree_based_bulk_access_method.cpp:156
      #5  0x00000000014131ad in mongo::BtreeBasedAccessMethod::commitBulk (this=0x34f23a0, bulkRaw=0x3457900, mayInterrupt=true, dupsAllowed=true, dupsToDrop=0x0)
          at src/mongo/db/index/btree_based_access_method.cpp:323
      #6  0x000000000127ca2e in mongo::MultiIndexBlock::doneInserting (this=0x7ffff7fca290, dupsOut=0x0) at src/mongo/db/catalog/index_create.cpp:304
      #7  0x000000000127c5a0 in mongo::MultiIndexBlock::insertAllDocumentsInCollection (this=0x7ffff7fca290, dupsOut=0x0) at src/mongo/db/catalog/index_create.cpp:271
      #8  0x00000000012a58e1 in mongo::CmdCreateIndex::run (this=0x2861160 <mongo::cmdCreateIndex>, txn=0x7ffff7fcb7e0, dbname=..., cmdObj=..., options=0, errmsg=..., result=..., fromRepl=false)
          at src/mongo/db/commands/create_indexes.cpp:200
      #9  0x000000000132ddd3 in mongo::_execCommand (txn=0x7ffff7fcb7e0, c=0x2861160 <mongo::cmdCreateIndex>, dbname=..., cmdObj=..., queryOptions=0, errmsg=..., result=..., fromRepl=false)
          at src/mongo/db/dbcommands.cpp:1267
      #10 0x000000000132ed50 in mongo::Command::execCommand (txn=0x7ffff7fcb7e0, c=0x2861160 <mongo::cmdCreateIndex>, queryOptions=0, cmdns=0x33f0014 "test.$cmd", cmdObj=..., result=..., fromRepl=false)
          at src/mongo/db/dbcommands.cpp:1483
      #11 0x000000000132f632 in mongo::_runCommands (txn=0x7ffff7fcb7e0, ns=0x33f0014 "test.$cmd", _cmdobj=..., b=..., anObjBuilder=..., fromRepl=false, queryOptions=0) at src/mongo/db/dbcommands.cpp:1558
      #12 0x0000000001531c82 in mongo::runCommands (txn=0x7ffff7fcb7e0, ns=0x33f0014 "test.$cmd", jsobj=..., curop=..., b=..., anObjBuilder=..., fromRepl=false, queryOptions=0) at src/mongo/db/query/find.cpp:137
      #13 0x0000000001533caa in mongo::runQuery (txn=0x7ffff7fcb7e0, m=..., q=..., nss=..., curop=..., result=..., fromDBDirectClient=false) at src/mongo/db/query/find.cpp:606
      #14 0x0000000001438e20 in mongo::receivedQuery (txn=0x7ffff7fcb7e0, c=..., dbresponse=..., m=..., fromDBDirectClient=false) at src/mongo/db/instance.cpp:220
      #15 0x0000000001439fca in mongo::assembleResponse (txn=0x7ffff7fcb7e0, m=..., dbresponse=..., remote=..., fromDBDirectClient=false) at src/mongo/db/instance.cpp:403
      #16 0x0000000001137704 in mongo::MyMessageHandler::process (this=0x30ae180, m=..., port=0x30d5ed0, le=0x33f6cd0) at src/mongo/db/db.cpp:206
      #17 0x00000000018d98b7 in mongo::PortMessageServer::handleIncomingMsg (arg=0x30d5ed0) at src/mongo/util/net/message_server_port.cpp:227
      #18 0x00007ffff7bc4182 in start_thread (arg=0x7ffff7fcc700) at pthread_create.c:312
      #19 0x00007ffff6cc500d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      


      Version: bcf19d4af076b5ce

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              daniel.alabi@10gen.com Daniel Alabi
              Reporter:
              kamran.khan Kamran K.
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: