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

Synchronize background thread in SleepInterruption dbtest

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • ALL
    • QE 2022-04-04, QE 2022-03-07, QE 2022-03-21
    • 32

      The SleepInterrupt dbtest launches a background thread to run the Javascript interpreter and then accesses the background thread's Javascript Scope object to issue an interrupt. There is a potential for a use-after-free error if the background thread exits before the parent thread has the chance to issue the interrupt.

      The long sleep in the background Javascript task should prevent this scenario, but some test failures seem to indicate that this use-after-free scenario is occurring nonetheless. It is possible that the sleep is somehow failing and returning immediately.

      Synchronizing the background thread so that it waits until it's safe to destroy its Javascript Scope will hopefully prevent this crash and instead cause the test to fail with a more useful error.

            Assignee:
            justin.seyster@mongodb.com Justin Seyster
            Reporter:
            justin.seyster@mongodb.com Justin Seyster
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: