[SERVER-27395] $bucketAuto aggregation with $addToSet output accumulator crashes mongod Created: 13/Dec/16 Updated: 27/Dec/16 Resolved: 16/Dec/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | 3.4.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Blocker - P1 |
| Reporter: | Tim Vaillancourt | Assignee: | David Storch |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||
| Backport Requested: |
v3.4
|
||||||||||||||||||||
| Steps To Reproduce: | Scripts attached in the attached tar.gz file, including an already-crashed mongod dbpath (data/*) and log (mongod.log). Steps: |
||||||||||||||||||||
| Sprint: | Query 2017-01-23 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
When using $bucketAuto with an $addToSet accumulator within the 'output' document can crash mongod. An example query that can crash mongod:
This query is probably silly/not-useful because I think specifying no 'output' field would return a similar result (this was just me playing around), but I thought the mongod crash was unexpected. When mongod crashes, the following is logged before a backtrace:
|
| Comments |
| Comment by David Storch [ 16/Dec/16 ] | ||||||||||
|
This has been fixed by https://github.com/mongodb/mongo/commit/37e720678f6e468726c6cc775a5dc898d080f0f3 under | ||||||||||
| Comment by David Storch [ 13/Dec/16 ] | ||||||||||
|
This will be fixed by work that is currently in code review under | ||||||||||
| Comment by David Storch [ 13/Dec/16 ] | ||||||||||
|
Thanks for the detailed report tim@elementspace.com. I can reproduce as you describe. We're looking into it now. | ||||||||||
| Comment by Tim Vaillancourt [ 13/Dec/16 ] | ||||||||||
|
One missing detail I should mention: I did not see this issue with other accumulators such as $push. This works, for example:
|