[SERVER-27626] Segfault when using $bucketAuto with $min in output Created: 10/Jan/17  Updated: 10/Jan/17  Resolved: 10/Jan/17

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: 3.4.1
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Allison Reinheimer Moore Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File companies.json     Text File mongod.log    
Issue Links:
Duplicate
duplicates SERVER-25535 Remove injectExpressionContext() meth... Closed
Operating System: ALL
Steps To Reproduce:

1. Import companies.json (attached) to MongoDB 3.4.1 using mongoimport, as in the following:

mongoimport -d startsup -c companies ~/Downloads/companies.json

2. Run the following aggregation operation:

use startsup
db.companies.aggregate( [
   {'$match': { 'number_of_employees' : {'$type': 'int'} }},
   {'$bucketAuto': {
            'groupBy': '$number_of_employees',
            'buckets': 3,
            'granularity': '1-2-5',
            'output': { 'value': {$min: '$number_of_employees'} }
            }}])

3. Check the log to see that your mongod has segfaulted and shut itself down.

Participants:

 Description   

When I run the agg operation in the steps to reproduce, I get a segfault that kills my 3.4.1 mongod (this also happens on 3.4.0, unsurprisingly). This happens with the $min and $max accumulator expression; $stdDevPop and $stdDevSamp did not cause a segfault. I didn't try the other accumulator expressions.

I've attached my fairly verbose log output for the backtrace.



 Comments   
Comment by Allison Reinheimer Moore [ 10/Jan/17 ]

Curses, my jira fu was insufficient to find the dupe. Thanks!

Comment by David Storch [ 10/Jan/17 ]

This is a duplicate of SERVER-25535, which will be fixed in 3.4.2.

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