-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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: Remove special handing for call to CORINFO_HELP_STOP_FOR_GC #38317
Conversation
We shouldn't need this anymore as the case it protects against should be covered by the new check added in dotnet#38246.
@jkotas PTAL. Will add on some GC stress legs if this looks good. cc @BruceForstall in case you're interested. Ran this locally on the test from #37236 and let it run through a few thousand iterations with no failures. GC counts looking comparable to before as well. |
src/coreclr/src/vm/gccover.cpp
Outdated
// 6) Now, thread T can modify the stack (ex: RedirectionFrame setup) while the GC thread is scanning it. | ||
// | ||
// This race is now mitigated below. Where we won't initiate a stress mode GC | ||
// for a thread in cooperative mode with an active ICF, if g_TtrapReturningThreads is true. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// for a thread in cooperative mode with an active ICF, if g_TtrapReturningThreads is true. | |
// for a thread in cooperative mode with an active ICF, if g_TrapReturningThreads is true. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
The
and the lower-most critical section looks like it has been freed
main thread is trying to exit
I suspect this change has altered thread timing and exposed a shutdown race in the test case. It runs fine locally. @AaronRobinsonMSFT does this seem plausible? |
@AndyAyersMS Sigh... The short answer is "yes" this is a shut down race using the STL. The Feel free to update the test use of runtime/src/coreclr/tests/src/Interop/COM/NativeClients/Events/EventTests.cpp Lines 24 to 26 in eb30d2a
|
Thanks Aaron. There are some timeouts in Linux testing across arm, arm32, and x64. For the arm and arm64 cases there's now one extra stress interrupt in the pinvoke path -- would not surprise me if these interrupts are more costly on linux vs windows. Still it seems a bit hard to believe this relatively small number of extra interrupts (that do not induce gcs) could dramatically impact timing. For x64 it seems unlikely the new suppression logic is more costly than the old, so not sure what's up there either. I am going to see if can get a handle on slowdown in GC stress with this change. |
/cc @janvorli |
arm32 gcstress timeouts look similar to the ones we've seen past runs, eg https://dev.azure.com/dnceng/public/_build/results?buildId=659155&view=ms.vss-test-web.build-test-results-tab Note w/o stress some of these test finish in ~5 seconds. Timeout is set to 1 hour. @BruceForstall is this a known issue? |
Yes, there are lots of GCStress=3 arm32 timeouts. There probably isn't a current issue; I was planning to open one when the rest of the noise is eliminated. There is also #38230 for Linux arm32 failures. |
Ok, I'm going to merge this. @BruceForstall keep this one in mind if you see any regressions in next weekend's GC stress runs. |
:mips-interest |
We shouldn't need this anymore as the case it protects against should be
covered by the new check added in #38246.