You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creating a dump against some kernel implementations is committing empty pages with the page probing technique we currently use during memory enumeration. This change uses the pagemap API's in the /proc system if it's available along with the maps api to decide what pages contain relevant information. This results in smaller dumps and no increase in resident memory usage.
Customers have reported memory doubling in processes they dump. This is fatal environments such as K8s and cgroups hosting, where the process of collecting a dump often results of a OOM kill. This makes crash and ad-hoc diagnostics harder than needs be.
Testing
TBD
Risk
Low - fallback to prior code paths is enabled. Also, it's possible to explicitly disable the new behavior by setting the env var DOTNET_DbgDisablePagemapUse to 1.
IMPORTANT: Is this backport for a servicing release? If so and this change touches code that ships in a NuGet package, please make certain that you have added any necessary package authoring and gotten it explicitly reviewed.
Dumping memory regions as they are listed in /proc/pid/maps
results in increase of RAM usage of the target application
on some Linux kernels.
This change uses /proc/pid/pagemap to check if the page is committed
before adding it to the regions list. As the file is not available on
kernels 4.0 and 4.1 without elevated permissions there's a fallback to
previous behavior.
ghost
locked as resolved and limited conversation to collaborators
May 19, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #79853 to release/7.0, issue #71472
Creating a dump against some kernel implementations is committing empty pages with the page probing technique we currently use during memory enumeration. This change uses the
pagemapAPI's in the/procsystem if it's available along with themapsapi to decide what pages contain relevant information. This results in smaller dumps and no increase in resident memory usage./cc @hoyosjs@ezsilmar
Customer Impact
Customers have reported memory doubling in processes they dump. This is fatal environments such as K8s and cgroups hosting, where the process of collecting a dump often results of a OOM kill. This makes crash and ad-hoc diagnostics harder than needs be.
Testing
TBD
Risk
Low - fallback to prior code paths is enabled. Also, it's possible to explicitly disable the new behavior by setting the env var
DOTNET_DbgDisablePagemapUseto 1.