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

Embedded periodic jobs can access runner after destruction

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Execution Team 2023-03-06

      PeriodicRunnerEmbedded::PeriodicJobImpl holds a pointer to PeriodicRunnerEmbedded, and when the job is stopped it uses that pointer to take the mutex of the runner. This can be an issue because the periodic runner lives in the service context while the periodic job anchors often live in decorations on the service context; thus in these cases the periodic runner will be destructed before the job anchor. Then when the job anchor is destructed and attempts to stop, it will try to access the already-freed runner.

            Assignee:
            gregory.noma@mongodb.com Gregory Noma
            Reporter:
            gregory.noma@mongodb.com Gregory Noma
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: