[release/7.0] createdump: only dump committed memory#79983
[release/7.0] createdump: only dump committed memory#79983github-actions[bot] wants to merge 4 commits intorelease/7.0-stagingfrom
Conversation
|
Tagging subscribers to this area: @tommcdon Issue DetailsBackport of #79853 to release/7.0 Customer ImpactTestingRiskIMPORTANT: 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.
|
90b2ffd to
40cb952
Compare
jeffschwMSFT
left a comment
There was a problem hiding this comment.
approved. we will take for consideration in 7.0.x
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.
40cb952 to
36b5626
Compare
|
This is still marked as |
|
I'm retargeting this PR to the new Repo maintainers will now be allowed to merge their own servicing PR as long as it meets the requirements:
The new process is described here: runtime/docs/project/library-servicing.md. The infra team will be actively monitoring servicing PRs to ensure all requirements are met and to help with any issues. Let me know if you have any questions. |
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.