[SERVER-30971] Use of "scope" field in mapReduce triggers BSONObj ownership error Created: 06/Sep/17 Updated: 30/Oct/23 Resolved: 07/Sep/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | JavaScript |
| Affects Version/s: | 3.4.8 |
| Fix Version/s: | 3.2.17, 3.4.9, 3.5.13 |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | Spencer Jackson | Assignee: | Spencer Jackson |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | RF | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Operating System: | ALL | ||||||||||||
| Backport Requested: |
v3.4, v3.2
|
||||||||||||
| Sprint: | Platforms 2017-09-11 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
"scope" allows a user to provide a map of global variables to expose to all JS functions ran during a mapReduce job. However, we do not take an owned copy of the map from the command. If scope contains an object, this triggers the memory protection mechanisms added in
|
| Comments |
| Comment by Spencer Jackson [ 11/Feb/19 ] |
|
Hello grabekm90, can you please create a new SERVER ticket describing the issue that you've encountered? When you file this, it would also be very helpful if you could include the MapReduce that you are performing. Thanks! |
| Comment by Mateusz Grabowski [ 07/Feb/19 ] |
|
Mongo: 3.4.19 Pymongo 3.4 Still the same problem: {{OperationFailure: command SON([('mapreduce', u'regon_wrap'), ('map', Code('\n function() {... }\n ', {'userPk': 1873, 'selectedParts': {'a': False, 'e': False, 'i': True, 'n': True, 'p': False, 's': False, 'w': False}})), ... ]) on namespace regon_cloud_db.$cmd failed: MR parallel processing failed: { ok: 0.0, errmsg: "Attempt to bind an unowned BSON Object to a JS scope marked as requiring ownership", code: 2, codeName: "BadValue", $gleStats: { lastOpTime: { ts: Timestamp 1549520696000|1, t: 1 }, electionId: ObjectId('7fffffff0000000000000001') } So should I downgrade to mongo 3.4.8 to avoid this problem? |
| Comment by Githook User [ 20/Sep/17 ] |
|
Author: {'email': 'spencer.jackson@mongodb.com', 'name': 'Spencer Jackson', 'username': 'spencerjackson'}Message: (cherry picked from commit f668265318237dc75708a20254e695869487d884) |
| Comment by Githook User [ 07/Sep/17 ] |
|
Author: {'username': 'spencerjackson', 'name': 'Spencer Jackson', 'email': 'spencer.jackson@mongodb.com'}Message: (cherry picked from commit f668265318237dc75708a20254e695869487d884) |
| Comment by Githook User [ 07/Sep/17 ] |
|
Author: {'username': 'spencerjackson', 'name': 'Spencer Jackson', 'email': 'spencer.jackson@mongodb.com'}Message: |