[SERVER-25112] mapReduce segmentation fault on v3.3.9 unoptimized builds Created: 15/Jul/16  Updated: 06/Dec/22  Resolved: 19/Aug/16

Status: Closed
Project: Core Server
Component/s: MapReduce, Querying
Affects Version/s: 3.3.9
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: David Hatch Assignee: Backlog - Query Team (Inactive)
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File SERVER-25112-trace.txt    
Issue Links:
Duplicate
duplicates SERVER-23888 Unoptimized builds on OSX overflow th... Backlog
Assigned Teams:
Query
Operating System: ALL
Steps To Reproduce:

1. Start a 3.3.9 mongod on an empty dbpath.
2. Run db.t.insert({a: 1})
3. Execute: db.runCommand({mapReduce: "t", map: function() { }, reduce: function () { }, out: "a"}).
4. Usually the server will seg fault after this step. Sometimes it is necessary to kill and restart the server, and execute step 3 again until triggering a crash.

Participants:

 Description   

The above steps cause a segmentation fault on 3.3.9 when running the map reduce command. I have not investigated enough to know the specific cause, but the culprit seems to be a null pointer dereference from within the js runtime.

The segfault seems to occur most often when the map reduce command is the first query run on the collection after the server is started. Both WT and mmap are affected. This issue occurs on unoptimized builds. I encountered it on clang version 7.3.0.



 Comments   
Comment by David Hatch [ 15/Jul/16 ]

I confirmed that this cannot be reproduced with --opt=on.

Comment by David Hatch [ 15/Jul/16 ]

I've attached the trace. I think this is likely related to SERVER-23888 from the stack trace, as I've compiled with --opt=off --dbg=on. I'll double check to see if I can reproduce with optimizations on.

Comment by Andrew Morrow (Inactive) [ 15/Jul/16 ]

Does the crash come with a stack trace?

Generated at Thu Feb 08 04:08:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.