[SERVER-9230] v8 ObjectTracker isn't tracking uncollected objects Created: 03/Apr/13 Updated: 11/Jul/16 Resolved: 04/Apr/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | JavaScript |
| Affects Version/s: | 2.4.1 |
| Fix Version/s: | 2.4.2, 2.5.0 |
| Type: | Bug | Priority: | Blocker - P1 |
| Reporter: | Ben Becker | Assignee: | Ben Becker |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Operating System: | ALL | ||||
| Participants: | |||||
| Description |
|
ObjTracker::track() fails to insert the tracked object into the set of tracked objects. This is causing memory to leak when script execution completes but the GC doesn't run. |
| Comments |
| Comment by auto [ 04/Apr/13 ] |
|
Author: {u'date': u'2013-04-03T20:50:46Z', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}Message: |
| Comment by auto [ 03/Apr/13 ] |
|
Author: {u'date': u'2013-04-03T20:50:46Z', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}Message: |
| Comment by Ben Becker [ 03/Apr/13 ] |
|
Yes – all persistent objects point to c++ heap-allocated objects; e.g. BSONHolder, dbclientcursor, etc. For any scope which is destructed while an active reference exists to one of these handles, the GC callback will not be invoked and the object allocated on the C++ heap will never be freed. Same holds true for a scope that was terminated. |
| Comment by Eric Milkie [ 03/Apr/13 ] |
|
Could this leak be significant for some workloads? We seem to make decent use of Persistent objects in our v8 wrapper code. |