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

Potential infinite loop in validate

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Storage
    • None
    • Storage Execution
    • ALL

    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.

      Attachments

        Activity

          People

            backlog-server-execution Backlog - Storage Execution Team
            tad Tad Marshall
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: