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

[debugger] Fix a step that becomes a go #110484

Merged
merged 9 commits into from
Dec 9, 2024
Merged

[debugger] Fix a step that becomes a go #110484

merged 9 commits into from
Dec 9, 2024

Conversation

thaystg
Copy link
Member

@thaystg thaystg commented Dec 6, 2024

After some tests we were able to understand that when we are stepping and the single step is enabled we can get on TriggerSingleStep in a Native code and then disable the single stepping wrongly.
This is the call stack that we see when the error happens:
image

The goal of this PR is to avoid disabling the single step when we get in this scenario.
So we added two protections on ThreadSuspend to avoid an APC when we are single stepping. And we also added a protection on controller.cpp to avoid disabling single step in this scenario.

Fixes #109785
Fixes #109812
Fixes #109885

@tommcdon tommcdon added this to the 10.0.0 milestone Dec 6, 2024
Copy link
Member

@janvorli janvorli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

Copy link
Member

@VSadov VSadov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks!

src/coreclr/vm/threadsuspend.cpp Show resolved Hide resolved
src/coreclr/vm/threadsuspend.cpp Outdated Show resolved Hide resolved
src/coreclr/debug/ee/controller.cpp Outdated Show resolved Hide resolved
@thaystg
Copy link
Member Author

thaystg commented Dec 9, 2024

The failure is not related with this PR: #110285

@thaystg
Copy link
Member Author

thaystg commented Dec 9, 2024

/backport to release/9.0-staging

Copy link
Contributor

github-actions bot commented Dec 9, 2024

Started backporting to release/9.0-staging: https://github.com/dotnet/runtime/actions/runs/12237655044

@dotnet dotnet deleted a comment from github-actions bot Dec 9, 2024
@dotnet dotnet deleted a comment from github-actions bot Dec 9, 2024
@dotnet dotnet deleted a comment from github-actions bot Dec 9, 2024
@dotnet dotnet deleted a comment from github-actions bot Dec 9, 2024
@thaystg thaystg merged commit 09eea2a into main Dec 9, 2024
88 of 90 checks passed
hez2010 pushed a commit to hez2010/runtime that referenced this pull request Dec 14, 2024
* Fixing step becomes a go

* Trying to avoid step that becomes a go

* Adding comments and more protections.

* fixing comment

* Checking if removing this comments, CI failures are gone.

* Adding part of the changes to understand the failures on CI

* Update src/coreclr/debug/ee/controller.cpp

Co-authored-by: mikelle-rogers <[email protected]>

* Fixing wrong fix.

---------

Co-authored-by: mikelle-rogers <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants