Skip to content

[release/10.0] Fix cgroup v2 memory max extraction#130404

Merged
JulieLeeMSFT merged 3 commits into
release/10.0from
backport/pr-130377-to-release/10.0
Jul 9, 2026
Merged

[release/10.0] Fix cgroup v2 memory max extraction#130404
JulieLeeMSFT merged 3 commits into
release/10.0from
backport/pr-130377-to-release/10.0

Conversation

@github-actions

@github-actions github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Backport of #130377 to release/10.0

/cc @janvorli

Customer Impact

This issue prevents running .NET apps (both coreclr and NativeAOT) on Linux environments where the current process is assigned to cgroup that is the root of the cgroup hierarchy for the current cgroup mount and cgroup v2 is being used on the target device. It results in a crash (access violation) during app startup.

This was discovered in Google Colab environment when attempting to run NativeAOT application in a jupyter notebook.

Regression

Testing

Verified by running a simple .NET app compiled as NativeAOT in the Google Colab environment. It crashes without this fix and works fine with it. During testing, I've added extra printf logging to the cgroup info extraction code to make sure it is doing the right thing.

Risk

Low. The fix just ensures that we exit the cgroup hierarchy scan loop when we reach the mount root and that we process the memory.max file at this folder if it exists.

janvorli added 3 commits July 9, 2026 11:54
In the edge case when the current process is assigned to the root cgroup,
the hierarchical memory limit extraction goes past the root cgroup
hierarchy mount path and the process ends up crashing.

This was discovered in google colab environment when attempting to run
NativeAOT application in a jupyter notebook

Close #130092
@janvorli janvorli requested a review from mangod9 July 9, 2026 12:14
@janvorli janvorli added this to the 10.0.x milestone Jul 9, 2026
@janvorli janvorli added the Servicing-consider Issue for next servicing release review label Jul 9, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @anicka-net, @dotnet/gc
See info in area-owners.md if you want to be subscribed.

@rbhanda rbhanda added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Jul 9, 2026
@rbhanda rbhanda modified the milestones: 10.0.x, 10.0.11 Jul 9, 2026
@JulieLeeMSFT JulieLeeMSFT merged commit 2b21f27 into release/10.0 Jul 9, 2026
124 of 127 checks passed
@JulieLeeMSFT JulieLeeMSFT deleted the backport/pr-130377-to-release/10.0 branch July 9, 2026 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-GC-coreclr Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants