[SERVER-45177] Not-equal ($ne) in query for mapReduce causes segmentation fault Created: 16/Dec/19 Updated: 29/Oct/23 Resolved: 21/Dec/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | MapReduce |
| Affects Version/s: | 4.2.2 |
| Fix Version/s: | 4.2.3 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Pavel Belev | Assignee: | Charlie Swanson |
| Resolution: | Fixed | Votes: | 2 |
| Labels: | qopt-team | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||||||||||
| Steps To Reproduce: |
Mongo shell repo steps with results:
Backtrace:
|
||||||||||||||||||||||||||||||||
| Sprint: | Query 2019-12-30 | ||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||||||||||||||||||
| Description |
|
When using mapReduce with a query with $ne in it the server crashes with segmentation fault.
|
| Comments |
| Comment by Githook User [ 20/Dec/19 ] | |||||||||||||||||||||||||||||||||||||||||||
|
Author: {'name': 'Charlie Swanson', 'email': 'charlie.swanson@mongodb.com', 'username': 'cswanson310'}Message: | |||||||||||||||||||||||||||||||||||||||||||
| Comment by Charlie Swanson [ 20/Dec/19 ] | |||||||||||||||||||||||||||||||||||||||||||
| Comment by Charlie Swanson [ 19/Dec/19 ] | |||||||||||||||||||||||||||||||||||||||||||
|
Surprisingly, it looks like this was caused by this commit from
Given that, I think this patch will fix this issue, but it's worth looking into the history of getChildVector() and see whether we could improve this dangerous API.
Leaving this in 'Needs Scheduling' so we can find someone who's free to investigate further. | |||||||||||||||||||||||||||||||||||||||||||
| Comment by Carl Champain (Inactive) [ 19/Dec/19 ] | |||||||||||||||||||||||||||||||||||||||||||
|
I'm passing this ticket along to the Query team for further investigation. Please keep watching it for updates. Thanks again for pointing this out, | |||||||||||||||||||||||||||||||||||||||||||
| Comment by Pavel Belev [ 18/Dec/19 ] | |||||||||||||||||||||||||||||||||||||||||||
|
Thank you Carl. I have attached the log file. It is from a clean Mongo 4.2.2, with the commands I pointed in the description ran in the mongo shell only.
| |||||||||||||||||||||||||||||||||||||||||||
| Comment by Carl Champain (Inactive) [ 18/Dec/19 ] | |||||||||||||||||||||||||||||||||||||||||||
|
Hi pavel.belev@practicedent.com, Thanks for the report. Kind regards,
| |||||||||||||||||||||||||||||||||||||||||||
| Comment by Pavel Belev [ 16/Dec/19 ] | |||||||||||||||||||||||||||||||||||||||||||
|
For some reason the repo steps got merged in a single line. Adding them here as normal text and not as code:
|