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

mapReduce segmentation fault on v3.3.9 unoptimized builds

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.3.9
    • Component/s: MapReduce, Querying
    • None
    • Query
    • ALL
    • Hide

      1. Start a 3.3.9 mongod on an empty dbpath.
      2. Run db.t.insert({a: 1})
      3. Execute: db.runCommand({mapReduce: "t", map: function() { }, reduce: function () { }, out: "a"}).
      4. Usually the server will seg fault after this step. Sometimes it is necessary to kill and restart the server, and execute step 3 again until triggering a crash.

      Show
      1. Start a 3.3.9 mongod on an empty dbpath. 2. Run db.t.insert({a: 1}) 3. Execute: db.runCommand({mapReduce: "t", map: function() { }, reduce: function () { }, out: "a"}) . 4. Usually the server will seg fault after this step. Sometimes it is necessary to kill and restart the server, and execute step 3 again until triggering a crash.

      The above steps cause a segmentation fault on 3.3.9 when running the map reduce command. I have not investigated enough to know the specific cause, but the culprit seems to be a null pointer dereference from within the js runtime.

      The segfault seems to occur most often when the map reduce command is the first query run on the collection after the server is started. Both WT and mmap are affected. This issue occurs on unoptimized builds. I encountered it on clang version 7.3.0.

        1. SERVER-25112-trace.txt
          15 kB
          David Hatch

            Assignee:
            backlog-server-query Backlog - Query Team (Inactive)
            Reporter:
            david.hatch David Hatch
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: