[SERVER-9117] Mongo segfault on mapreduce - repeatable every time Created: 25/Mar/13 Updated: 10/Dec/14 Resolved: 29/Mar/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | MapReduce |
| Affects Version/s: | 2.4.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Ian Patton | Assignee: | Ben Becker |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
osx |
||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Steps To Reproduce: | 1 map=function(){ ] }); ; 12 }); ); |
||||||||
| Participants: | |||||||||
| Description |
|
I have a mapreduce job that causes a segfault every time it runs. The map seems to work fine, but the reduce causes the following error, which then corrupts the database files
|
| Comments |
| Comment by Ben Becker [ 29/Mar/13 ] | ||||||||||||||||||||||||||||
|
Hi Ian, I believe the cause of this issue was v8 running out of memory, which can result in a segfault (see Would you be able to test this on version 2.4.2 when it is released? If so, please reopen this ticket and let us know. Thanks, | ||||||||||||||||||||||||||||
| Comment by Ben Becker [ 25/Mar/13 ] | ||||||||||||||||||||||||||||
|
Hi Ian, Which field did you have to clone, exactly? The source_id from the reduce function's 'values' argument? When you weren't cloning the object, how did the corruption manifest itself? Thanks, | ||||||||||||||||||||||||||||
| Comment by Ian Patton [ 25/Mar/13 ] | ||||||||||||||||||||||||||||
|
cloning the hash does indeed fix the problem. Maybe you guys should add a safeguard against crashing the mongod, but otherwise this was a typical javascript issue. Ian | ||||||||||||||||||||||||||||
| Comment by Ben Becker [ 25/Mar/13 ] | ||||||||||||||||||||||||||||
|
Hi Ian, Thanks for the report; I'm looking into this now. What are the symptoms of database file corruption that you found? Thanks, | ||||||||||||||||||||||||||||
| Comment by Ian Patton [ 25/Mar/13 ] | ||||||||||||||||||||||||||||
|
I think I just needed to clone the hash instead of pushing a reference to it. I will see if that resolves the issue and follow up. | ||||||||||||||||||||||||||||
| Comment by Ian Patton [ 25/Mar/13 ] | ||||||||||||||||||||||||||||
|
From the log:
|