Crash in MapReduce when mapper emits value that contains recursive structure

XMLWordPrintableJSON

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

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

      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 Horowitz (Inactive)
            Reporter:
            Tommy V
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: