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

Invariant failure when running captrunc against non-capped collection

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 3.1.8
    • Affects Version/s: 3.0.0-rc11
    • Component/s: Internal Code, Storage
    • Fully Compatible
    • ALL
    • Quint 9 09/18/15

      Running captrunc (an experimental/internal command) against a non-capped collection triggers an invariant failure:

      Invariant failure isCapped() src/mongo/db/catalog/collection.cpp 546
      
      #0  0x00007ffff7bcc20b in raise (sig=5) at ../nptl/sysdeps/unix/sysv/linux/pt-raise.c:37
      #1  0x00000000018f8a7e in mongo::breakpoint () at src/mongo/util/debugger.cpp:63
      #2  0x00000000018ee837 in mongo::invariantFailed (expr=0x1fbb24c "isCapped()", file=0x1fbb000 "src/mongo/db/catalog/collection.cpp", line=546)
          at src/mongo/util/assert_util.cpp:147
      #3  0x0000000001280259 in mongo::Collection::temp_cappedTruncateAfter (this=0x4dbd600, txn=0x7ffff7fcc7d0, end=..., inclusive=false) at src/mongo/db/catalog/collection.cpp:546
      #4  0x000000000131819d in mongo::CapTrunc::run (this=0x330e880, txn=0x7ffff7fcc7d0, dbname=..., cmdObj=..., errmsg=..., result=...)
          at src/mongo/db/commands/test_commands.cpp:178
      #5  0x000000000135bf6b in mongo::_execCommand (txn=0x7ffff7fcc7d0, c=0x330e880, dbname=..., cmdObj=..., queryOptions=0, errmsg=..., result=..., fromRepl=false)
          at src/mongo/db/dbcommands.cpp:1316
      #6  0x000000000135cf39 in mongo::Command::execCommand (txn=0x7ffff7fcc7d0, c=0x330e880, queryOptions=0, cmdns=0x344a414 "test.$cmd", cmdObj=..., result=..., fromRepl=false)
          at src/mongo/db/dbcommands.cpp:1532
      #7  0x000000000135d82a in mongo::_runCommands (txn=0x7ffff7fcc7d0, ns=0x344a414 "test.$cmd", _cmdobj=..., b=..., anObjBuilder=..., fromRepl=false, queryOptions=0)
          at src/mongo/db/dbcommands.cpp:1604
      #8  0x0000000001564bca in mongo::runCommands (txn=0x7ffff7fcc7d0, ns=0x344a414 "test.$cmd", jsobj=..., curop=..., b=..., anObjBuilder=..., fromRepl=false, queryOptions=0)
          at src/mongo/db/query/find.cpp:137
      #9  0x0000000001566bfc in mongo::runQuery (txn=0x7ffff7fcc7d0, m=..., q=..., nss=..., curop=..., result=..., fromDBDirectClient=false) at src/mongo/db/query/find.cpp:606
      #10 0x000000000146b542 in mongo::receivedQuery (txn=0x7ffff7fcc7d0, c=..., dbresponse=..., m=..., fromDBDirectClient=false) at src/mongo/db/instance.cpp:220
      #11 0x000000000146c6ef in mongo::assembleResponse (txn=0x7ffff7fcc7d0, m=..., dbresponse=..., remote=..., fromDBDirectClient=false) at src/mongo/db/instance.cpp:403
      #12 0x000000000115e104 in mongo::MyMessageHandler::process (this=0x310c140, m=..., port=0x31324e0, le=0x3450230) at src/mongo/db/db.cpp:206
      #13 0x0000000001916ec0 in mongo::PortMessageServer::handleIncomingMsg (arg=0x31324e0) at src/mongo/util/net/message_server_port.cpp:229
      #14 0x00007ffff7bc4182 in start_thread (arg=0x7ffff7fcd700) at pthread_create.c:312
      #15 0x00007ffff6cc500d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      

            Assignee:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Reporter:
            kamran.khan Kamran K.
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: