[SERVER-7048] Potential infinite loop in validate Created: 16/Sep/12  Updated: 06/Dec/22  Resolved: 14/Nov/16

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

Type: Bug Priority: Major - P3
Reporter: Tad Marshall Assignee: Backlog - Storage Execution Team
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Storage Execution
Operating System: ALL
Participants:

 Description   

From code inspection:

The 'while' loop that starts at line 322 in the validateNS() routine in src/mongo/db/dbcommands_admin.cpp is not defensive against a circular reference in the 'nextDeleted' chain of deleted records. The loop does call 'killCurrentOp.checkForInterrupt()', so it will be possible to kill the validate operation, but there will be no indication of the infinite loop while it is running except that it "is taking a long time". Since validate is used when corruption is suspected, it would be better if the code could be defensive against this type of corruption. The database is read-locked while the validate command is running, so this will stop writes until the command is killed.


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