-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Make GC stress usable with Libraries tests #103738
Conversation
Tagging subscribers to this area: @mangod9 |
71b0141
to
a05d762
Compare
/azp run runtime-coreclr gcstress-extra, runtime-coreclr gcstress0x3-gcstress0xc |
Azure Pipelines successfully started running 2 pipeline(s). |
/azp run runtime-coreclr gcstress-extra, runtime-coreclr gcstress0x3-gcstress0xc |
Azure Pipelines successfully started running 2 pipeline(s). |
/azp run runtime-coreclr gcstress-extra, runtime-coreclr gcstress0x3-gcstress0xc |
Azure Pipelines successfully started running 2 pipeline(s). |
/azp run runtime-coreclr gcstress-extra, runtime-coreclr gcstress0x3-gcstress0xc |
Azure Pipelines successfully started running 2 pipeline(s). |
// Under GC stress the finalizer queue may never go empty as frequent | ||
// GCs will keep filling up the queue with items. | ||
// We will disable GC stress to make sure the current thread is not permanently blocked on that. | ||
GCStressPolicy::InhibitHolder iholder; |
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.
InhibitHolder increments global counter without using Interlocked. We may want to fix to avoid race conditions that can make this inhibit holder ineffective intermittently and cause hangs.
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.
I did not realize that. This is dangerous and may be already causing some rare failures in stress.
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!
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
//---------------------------------------------------- | ||
|
||
DWORD status = hEventFinalizerDone->Wait(INFINITE,TRUE); | ||
_ASSERTE(status == WAIT_OBJECT_0); |
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.
This place does not complain about unused local.
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.
I am not sure I have seen before that this can break the build.
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.
Maybe the other case is included somewhere that is built with more strict rules.
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.
My guess is that this does not complain because DWORD
is typedef, so it is a potentially complex type where the local variable may be impactful ... until some compiler decides to warn for this case too.
I would not hurt to change this one to the make-compiler-happy pattern.
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.
We may have quite a few of these. Fixed this one.
Thanks!!! |
Fixes: #101150
Also useful to investigate failures like: #102919