[release/6.0] Deadlock mitigation for debugging #69121
Merged
+25
−11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Customer impact
We have had multiple reports of the runtime deadlocking during debugging, e.g. #58471. Kount fixed it for 7 the "right way" with #67160, but that fix is far too broad for servicing in 6.0. This targeted fix disables code versioning (through both profiler rejit and tiered compilation) when debugging from startup. It does not change the debugger attach behavior.
We have had reports from multiple different customers about this issue, there are likely many more running in to it daily that haven't figured it out and tracked us down.
Testing
I did manual verification that the flag was set when a debugger is present at startup and is not set when a debugger attaches, plus ran the private diagnostic test suite.
Risk
The risk is low, and in case someone depends on being able to debug from startup and have code versioning active they can set the flag to disable this fix.