[SERVER-1435] Crash in MapReduce when mapper emits value that contains recursive structure Created: 18/Jul/10  Updated: 12/Jul/16  Resolved: 18/Jul/10

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: 1.4.4
Fix Version/s: 1.5.6

Type: Bug Priority: Major - P3
Reporter: Tommy V Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

GNU/Debian, x64

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


Operating System: ALL
Participants:

 Description   

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.



 Comments   
Comment by Eliot Horowitz (Inactive) [ 18/Jul/10 ]

Not planning on backportsing since a bit of a complex fix and its only on bad user data

Generated at Thu Feb 08 02:57:00 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.