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

Restarting JournalFlusher after rollback is not thread-safe

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.9.0, 4.4.6
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.4
    • Sprint:
      Execution Team 2020-11-16, Execution Team 2020-11-30
    • Linked BF Score:
      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

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

              Dates

              Created:
              Updated:
              Resolved: