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

Disable extra threads for JSRuntimes

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 3.2.0-rc5
    • 3.2.0-rc6
    • JavaScript
    • None
    • Fully Compatible
    • ALL
    • Platform D (12/11/15)

    Description

      When extra threads are enabled in spidermonkey, objects with finalizers cannot be run from garbage collection threads. This prevents any of our native types from reaping in hot loops in js (at idle the main thread may decide to gc).

      By invoking js::DisableExtraThreads() we can prevent all of the various helper threads from getting spun up. This means compilation, gc, etc. are all run from the runtime they're invoke in, rather than a helper. Unfortunately js::DisableExtraThreads is in vm/Runtime.h, a non-public header. We can simply forward declare it ourselves.

      This appears to fix the memory leaks we see in SERVER-21709

      Attachments

        Issue Links

          Activity

            People

              jason.carey@mongodb.com Jason Carey
              jason.carey@mongodb.com Jason Carey
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: