[SERVER-6937] Ensure system.profile collection is capped Created: 05/Sep/12  Updated: 21/Dec/12  Resolved: 03/Dec/12

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 2.0.6
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Ben Becker Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

CentOS 6.2, likely all


Issue Links:
Duplicate
duplicates SERVER-7816 The system.profile collection should ... Closed
duplicates SERVER-3744 --profile should create system.profil... Closed
Related
Operating System: ALL
Participants:

 Description   

When logging to the system.profile collection, we seem to reuse the fast_oplog_insert() method, which assumes the profile will be capped. If you create an uncapped profile frist, the call to alloc() can return an empty DiskLoc and result in an unusable database. Calls to show dbs, show collections, etc. will fail for the entire database. The following message will be constantly repeated:

Tue Sep  4 18:48:32 [conn2314]  catalog.catalog Assertion failure !loc.isNull() db/pdfile.cpp 1886
0x57a8a6 0x5853eb 0x8a67f6 0x77a0fe 0x88e17c 0xaa0bc8 0x6389f7 0x3fc70077f1 0x3fc6ce5ccd 
 /var/lib/mongo/bin/mongod(_ZN5mongo12sayDbContextEPKc+0x96) [0x57a8a6]
 /var/lib/mongo/bin/mongod(_ZN5mongo8assertedEPKcS1_j+0xfb) [0x5853eb]
 /var/lib/mongo/bin/mongod(_ZN5mongo11DataFileMgr17fast_oplog_insertEPNS_16NamespaceDetailsEPKci+0x376) [0x8a67f6]
 /var/lib/mongo/bin/mongod(_ZN5mongo7profileERKNS_6ClientERNS_5CurOpE+0xc1e) [0x77a0fe]
 /var/lib/mongo/bin/mongod(_ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE+0x9fc) [0x88e17c]
 /var/lib/mongo/bin/mongod(_ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortEPNS_9LastErrorE+0x78) [0xaa0bc8]
 /var/lib/mongo/bin/mongod(_ZN5mongo3pms9threadRunEPNS_13MessagingPortE+0x287) [0x6389f7]
 /lib64/libpthread.so.0() [0x3fc70077f1]
 /lib64/libc.so.6(clone+0x6d) [0x3fc6ce5ccd]


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