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

Avoid read-after-delete in ServiceExecutorSync shutdown

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.4.1, 4.7.0
    • Component/s: Internal Code
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.4, v4.2, v4.0
    • Sprint:
      Service Arch 2020-07-27
    • Linked BF Score:
      0

      Description

      The shutdown procedure of ServiceExecutorSynchronous uses two variables to communicate with executor threads: a condition variable and an atomic word.

      It is possible for the last executor thread to access the condition variable after it's destroyed, which could result in a read-after-delete failure. To prevent such failures, we should extend the lifetime of all resources (e.g., the condition variable) shared between the ServiceExecutor and the executor threads.

        Attachments

          Activity

            People

            Assignee:
            amirsaman.memaripour Amirsaman Memaripour
            Reporter:
            amirsaman.memaripour Amirsaman Memaripour
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: