-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Crst ordering issue between threadpool and Process.EnableRaisingEvents under GCStress #38801
Comments
Tagging subscribers to this area: @dotnet/gc |
I can't seem to get this to reproduce locally with |
Note the failure above was Here's the latest failure (from this weekend, before #39937): |
Looks like I got a repro under gcstress=0x3c, but not 0x3 or 0xc on their own.
Just now reading through the stack to see if I can pinpoint what happened. |
Based on a quick read, it looks like this is happening because runtime/src/coreclr/src/vm/win32threadpool.cpp Lines 2244 to 2249 in 168409e
Then a GC starts after the switch to I'm not sure this has anything to do with the test, but rather that gcstress is on and |
I don't immediately see anything new that might be causing this. The reason that we are getting into this situation it seems is that when I set
it calls this code: runtime/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.cs Lines 643 to 674 in 168409e
which is what ultimately registers a wait thread. I don't think this is an issue with tracing, but rather an overlooked crst ordering problem with the GC and threadpool in |
Failed again in runtime 20210803.116 Failed test:
Error message:
|
This is a different failure than what this issue is tracking. This looks more similar to #54469. |
Failed again in: runtime-coreclr outerloop 20210901.9 Failed test:
Error message:
|
This is a different failure than what is tracked in this issue. This is an occurrence of #57461 |
@kouvel @mangod9 - I came across this while triaging. Kount I think both the code versioning lock and the ThreadpoolWaitThreads lock fall in your area if you can untangle this lock inversion. At first glance it looked like the Process.EnableRaisingEvents part is a red hering and probably any workload that used threadpool in the right way could trigger this. |
This should be fixed now in main, the native thread pool has been removed |
Thanks Kount! |
failed in job: runtime-coreclr gcstress0x3-gcstress0xc 20200705.1
Error message
The text was updated successfully, but these errors were encountered: