Skip to content

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

Merged
thaystg merged 9 commits into
mainfrom
dev/thays/fix_109785
Dec 9, 2024
Merged

[debugger] Fix a step that becomes a go#110484
thaystg merged 9 commits into
mainfrom
dev/thays/fix_109785

Conversation

@thaystg

@thaystgthaystg commented Dec 6, 2024

Copy link
Copy Markdown
Member

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

@tommcdontommcdon added this to the 10.0.0 milestone Dec 6, 2024

@janvorlijanvorli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thank you!

@VSadovVSadov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, Thanks!

Comment threadsrc/coreclr/vm/threadsuspend.cpp
Comment threadsrc/coreclr/vm/threadsuspend.cpp Outdated
Comment threadsrc/coreclr/debug/ee/controller.cpp Outdated
@thaystg

Copy link
Copy Markdown
MemberAuthor

The failure is not related with this PR: #110285

@thaystg

Copy link
Copy Markdown
MemberAuthor

/backport to release/9.0-staging

@github-actions

Copy link
Copy Markdown
Contributor

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

@dotnetdotnet deleted a comment from github-actionsBotDec 9, 2024
@dotnetdotnet deleted a comment from github-actionsBotDec 9, 2024
@dotnetdotnet deleted a comment from github-actionsBotDec 9, 2024
@dotnetdotnet deleted a comment from github-actionsBotDec 9, 2024
@thaystg
thaystg merged commit 09eea2a into mainDec 9, 2024
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 <45022607+mikelle-rogers@users.noreply.github.com>
* Fixing wrong fix.
---------
Co-authored-by: mikelle-rogers <45022607+mikelle-rogers@users.noreply.github.com>
@jkotas
jkotas deleted the dev/thays/fix_109785 branch December 29, 2024 15:51
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Jan 29, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Step Over sometimes executes a lot more than one statement foreach will jump to other code in dotnet9 Step becomes a "go" in .NET 9

5 participants

@thaystg@VSadov@janvorli@tommcdon@mikelle-rogers