Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCStress is not safe when not using per-thread allocation contexts #7670

Closed
swgillespie opened this issue Mar 20, 2017 · 2 comments
Closed

Comments

@swgillespie
Copy link
Contributor

When investigating https://github.com/dotnet/coreclr/issues/10265 I noticed that GCHeap::StressHeap does not acquire the alloc lock when allocating strings. When not using per-thread allocation contexts (e.g. Windows x86/x64 single proc scenarios), this is not safe. Another thread can be allocating through the normal allocation path while another thread is allocating through GCHeap::StressHeap, resulting in random heap corruption.

The correct fix is to acquire the global allloc lock before calling GCHeap::StressHeap when running without per-thread allocation contexts. I don't believe anyone is currently running GC stress on single-proc machines, so I imagine this is pretty low priority to fix.

@msftgits msftgits transferred this issue from dotnet/coreclr Jan 31, 2020
@msftgits msftgits added this to the Future milestone Jan 31, 2020
Copy link
Contributor

Due to lack of recent activity, this issue has been marked as a candidate for backlog cleanup. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will undo this process.

This process is part of our issue cleanup automation.

@dotnet-policy-service dotnet-policy-service bot added backlog-cleanup-candidate An inactive issue that has been marked for automated closure. no-recent-activity labels May 13, 2024
Copy link
Contributor

This issue will now be closed since it had been marked no-recent-activity but received no further activity in the past 14 days. It is still possible to reopen or comment on the issue, but please note that the issue will be locked if it remains inactive for another 30 days.

@dotnet-policy-service dotnet-policy-service bot removed this from the Future milestone May 27, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jun 27, 2024
@dotnet-policy-service dotnet-policy-service bot removed no-recent-activity backlog-cleanup-candidate An inactive issue that has been marked for automated closure. labels Jun 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants