[SERVER-83145] Shared buffer fragment incorrectly tracks memory usage in freeUnused() Created: 10/Nov/23 Updated: 29/Jan/24 Resolved: 25/Jan/24 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 6.0.4, 6.2.0-rc0 |
| Fix Version/s: | 7.0.6, 6.0.14, 8.0.0-rc0, 7.3.0-rc2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Shin Yee Tan | Assignee: | Louis Williams |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Assigned Teams: |
Storage Execution
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||
| Backport Requested: |
v7.3, v7.0, v6.0
|
||||||||||||||||||||
| Steps To Reproduce: | const maxMemUsageMB = 50; }, const primary = replSet.getPrimary(); ); coll.createIndex({"$**": 1}); |
||||||||||||||||||||
| Sprint: | Execution Team 2023-12-11, Execution Team 2024-01-08, Execution Team 2024-01-22, Execution Team 2024-02-05 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||||||
| Description |
|
We decrement from memUsage when we free unused buffers from _activeBuffers here. The calculation is incorrect and undercounts actual freed memory causing the memUsage stat to balloon. This can be a problem when the memusage stat grows past the in-memory limit for the sorter resulting in spilling to disk on every key added to the sorter, eventually leading to an OOM issue. |
| Comments |
| Comment by Githook User [ 29/Jan/24 ] |
|
Author: {'name': 'Louis Williams', 'email': 'louiswilliams@users.noreply.github.com', 'username': 'louiswilliams'}Message: GitOrigin-RevId: cf21f604fdeef621f7782092ad637a89e57e1549 |
| Comment by Githook User [ 26/Jan/24 ] |
|
Author: {'name': 'Louis Williams', 'email': 'louiswilliams@users.noreply.github.com', 'username': 'louiswilliams'}Message: GitOrigin-RevId: 6c4aec482bb15f917219a01aec332de557f77ac8 |
| Comment by Githook User [ 26/Jan/24 ] |
|
Author: {'name': 'Louis Williams', 'email': 'louiswilliams@users.noreply.github.com', 'username': 'louiswilliams'}Message: GitOrigin-RevId: e6685de50d2a7556e2f2f9a8c52d30145d1256c9 |
| Comment by Githook User [ 25/Jan/24 ] |
|
Author: {'name': 'Louis Williams', 'email': 'louiswilliams@users.noreply.github.com', 'username': 'louiswilliams'}Message: GitOrigin-RevId: 4ea6987aa035bbb75cf585b7390f70e5921b9ac5 |