[SERVER-10554] memory leak in MutableDocument::setNestedField Created: 16/Aug/13 Updated: 11/Jul/16 Resolved: 19/Aug/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | 2.4.5 |
| Fix Version/s: | 2.4.7, 2.5.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Alexander Komyagin | Assignee: | Mathias Stearn |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Win2008R2 |
||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Description |
|
Issue Status as of October 23rd, 2013 ISSUE SUMMARY USER IMPACT
It is present in versions of MongoDB prior to and including v2.4.6. SOLUTION WORKAROUNDS PATCHES Original DescriptionAggregation queries are causing memory leak on primary. Detected by comparing umdh memory dumps before and after running aggregation. There are two cases in the current codebase that can cause this leak: 1) Accessing nested fields in the original document fetched from the collection. This leads to a leak of a few hundred bytes per aggregation command. The amount of memory leaked in this case does not depend on the amount of data processed in the aggregation. If the nested fields are only used by a $match expression but not any other pipeline stages, this leak does not apply. 2) Using a $geoNear pipeline stage and using distanceField or includeLocs to inject information into a nested field. This results in a leak of a few hundred bytes per documented returned from geoNear. |
| Comments |
| Comment by auto [ 23/Aug/13 ] |
|
Author: {u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}Message: Add check to prevent future memory leaks like |
| Comment by auto [ 23/Aug/13 ] |
|
Author: {u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}Message: The issue was that empty documents are represented as a NULL pointer and |
| Comment by auto [ 19/Aug/13 ] |
|
Author: {u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}Message: Add check to prevent future memory leaks like |
| Comment by auto [ 19/Aug/13 ] |
|
Author: {u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}Message: The issue was that empty documents are represented as a NULL pointer and |