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

Restarting JournalFlusher after rollback is not thread-safe

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.9.0, 4.4.6
    • None
    • None
    • Fully Compatible
    • ALL
    • v4.4
    • Execution Team 2020-11-16, Execution Team 2020-11-30
    • 27

    Description

      In startStorageControls, we create a new instance of JournalFlusher and set it to the serviceContext. This is fine at startup time. But if startStorageControls is called during rollback, we will be destroying the existing instance of JournalFlusher which some preexisting callers of JournalFlusher::waitForJournalFlush may still have references to (via JournalFlusher::get). And so those callers could be accessing freed memory and would likely trash the memory.

      Attachments

        Activity

          People

            lingzhi.deng@mongodb.com Lingzhi Deng
            lingzhi.deng@mongodb.com Lingzhi Deng
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: