-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Fix GCStress regression #119028
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
Fix GCStress regression #119028
Conversation
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.
Pull Request Overview
This PR fixes a GCStress regression where the original version of PInvoke stub code could not be found after changes made in PR #117901. The fix compensates for the MethodDesc adjustment done for PInvoke stubs during code allocation by ensuring GC instrumentation uses the correct code version that matches the CodeHeader.
- Adds logic to detect when a PInvoke stub's MethodDesc has been adjusted during code allocation
- Retrieves the actual MethodDesc from the CodeHeader and creates the appropriate NativeCodeVersion
- Ensures GC coverage setup uses the correct code version for proper instrumentation
Context #118879 (comment) |
/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). |
Tagging subscribers to this area: @mangod9 |
GCStress is not able to find the original version of the code for PInvoke stubs after dotnet#117901. We need to compensate for the MethodDesc adjustment done for PInvoke stubs when storing the original version of the code during GC stress.
Interop marshalling of varargs needs MethodDesc calling convention to support ldftn <PInvoke method with varargs>. It is not possible to smugle the target MethodDesc* via vararg cookie in this case.
/azp run runtime-coreclr gcstress-extra, runtime-coreclr gcstress0x3-gcstress0xc |
Azure Pipelines successfully started running 2 pipeline(s). |
Co-authored-by: Aaron Robinson <[email protected]>
I have combined this PR with the change that makes GC stress faster in #119037 - to rule out timeouts. It looks like the combined change passes stress tests, except on (There is also one failure in |
Yes, there was a bug on arm32. It should be fixed by last commit. |
/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). |
stress is passing on linux-arm 🎉 |
Co-authored-by: Aaron Robinson <[email protected]>
GCStress is not able to find the original version of the code for PInvoke stubs after #117901. We need to compensate for the MethodDesc adjustment done for PInvoke stubs when storing the original version of the code during GC stress.