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

Crash in MapReduce when mapper emits value that contains recursive structure

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.5.6
    • Affects Version/s: 1.4.4
    • Component/s: Querying
    • Labels:
      None
    • Environment:
      GNU/Debian, x64

      db version v1.4.4, pdfile version 4.5
      Sun Jul 18 17:28:59 git version: 9dcac11bd72c7cb34ca278313f033efcdd4908eb
    • ALL

      Whenever a MapReduce mapper emits an object that has a recursive structure, mongod crashes with a segmentation fault. For example:

      function map() {
      var x =

      {foo:1}

      ;
      x.bar = x;
      emit(this._id, x);
      }

      Removing the line "x.bar = x;" solves the issue. Although recursivity in M/R should probably be disallowed, the database should of course not crash.

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            tommyvdv Tommy V
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: