[SERVER-17402] Invariant failure when running captrunc against non-capped collection Created: 27/Feb/15  Updated: 19/Sep/15  Resolved: 02/Sep/15

Status: Closed
Project: Core Server
Component/s: Internal Code, Storage
Affects Version/s: 3.0.0-rc11
Fix Version/s: 3.1.8

Type: Bug Priority: Minor - P4
Reporter: Kamran K. Assignee: Max Hirschhorn
Resolution: Done Votes: 1
Labels: 28qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Quint 9 09/18/15
Participants:

 Description   

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



 Comments   
Comment by Githook User [ 02/Sep/15 ]

Author:

{u'username': u'visemet', u'name': u'Max Hirschhorn', u'email': u'max.hirschhorn@mongodb.com'}

Message: SERVER-17402 Return error if captrunc run on a non-capped collection.
Branch: master
https://github.com/mongodb/mongo/commit/db99dd778a2fd4e2ea6bbeec2164f1d14b894c27

Comment by Jonathan Abrahams [ 27/Feb/15 ]

Seems also invalid parameters trigger this failure

Generated at Thu Feb 08 03:44:19 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.