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

Multiplanning together with subplanning causes server crash in mapReduce queries

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 7.0.0-rc0, 4.4.20, 5.0.16, 6.0.6, 6.3.1
    • 6.0.5, 6.3.0-rc1
    • None
    • None
    • Fully Compatible
    • ALL
    • v6.3, v6.0, v5.0, v4.4
    • QE 2023-03-06, QE 2023-03-20, QE 2023-04-03, QE 2023-04-17
    • 104

    Description

      While investigating BF-27079 I managed to recreate a server crash, which was detected while running mongosync suite.

      The issue it that multiple multiplanners are sharing the same javascript execution context while performing the subplanning. Currently the implementation is injecting the ‘emit’ function only once to the javascript environment. This is causing issues, when that multiplanner is deallocated and another multiplanner starts executing, as emit function is not reinjected, causing heap-use-after-free issue.

      Reinjecting the emit function on every evaluate call of the ExpressionInternalJsEmit will fix the issue

      Attachments

        Activity

          People

            denis.grebennicov@mongodb.com Denis Grebennicov
            denis.grebennicov@mongodb.com Denis Grebennicov
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: