[SERVER-4512] segmentation fault on map-reduce javascript syntax error Created: 16/Dec/11 Updated: 29/May/12 Resolved: 21/Dec/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | JavaScript, MapReduce |
| Affects Version/s: | 2.0.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | Api | Assignee: | Antoine Girbal |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | javascript, map_reduce, mapreduce, | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Ubuntu 10.04.3 LTS Linux 2.6.32-32-generic #62-Ubuntu SMP x86_64 GNU/Linux |
||
| Attachments: |
|
| Operating System: | Linux |
| Participants: |
| Description |
|
Putting the following javascript function into the scope of a map reduce call makes the mongod process to seg fault. Javascript function in the map reduce scope: function(values) { Clearly the function has a syntax error (the colon after the for loop). Mongod log is as follows (also in attach). Fri Dec 16 17:18:52 [conn103] JS Error: SyntaxError: syntax error nofile_b:2 return copy_val; Fri Dec 16 17:18:52 Got signal: 11 (Segmentation fault). Fri Dec 16 17:18:52 Backtrace: Logstream::get called in uninitialized state The same javascript syntax error does not trigger the seg fault if executed in the mongo shell. > db.eval("function testone() { values = {}; copy_val = {}; for (var k in values): copy_val[k] = values[k]; return copy_val; };") |
| Comments |
| Comment by Antoine Girbal [ 21/Dec/11 ] |
|
thanks for the report. |
| Comment by Api [ 20/Dec/11 ] |
|
The crash is triggered by requesting a Map Reduce via a Python program using the Python driver (PyMongo). I think the two bugs are related (sorry, I didn't found the duplicate since I searched for critical bugs: a server crash is regarded to be critical). Thanks. |
| Comment by Antoine Girbal [ 17/Dec/11 ] |
|
How exactly do you trigger the crash, using what client / driver? most likely this is related to |