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

Restarting JournalFlusher after rollback is not thread-safe

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.9.0, 4.4.6
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • v4.4
    • Execution Team 2020-11-16, Execution Team 2020-11-30
    • 27

      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.

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

              Created:
              Updated:
              Resolved: