Skip to content

Enumerate assignable ThreadPool work queues#5867

Merged
hoyosjs merged 1 commit into
dotnet:mainfrom
leculver:leculver/fix-threadpool-assignable-workitems
Jun 9, 2026
Merged

Enumerate assignable ThreadPool work queues#5867
hoyosjs merged 1 commit into
dotnet:mainfrom
leculver:leculver/fix-threadpool-assignable-workitems

Conversation

@leculver

@leculver leculver commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Update ThreadPoolCommand to use _assignableWorkItemQueues, the original _assignableWorkItems actually never existed...

Update ThreadPoolCommand to read current runtime assignable work item queues, include low-priority global work items, and cap assignable queue traversal for corrupt dumps.

Runtime history shows _assignableWorkItems never existed; the current SOS-dependent field is _assignableWorkItemQueues, introduced by dotnet/runtime#69386.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 9, 2026 00:53
@leculver leculver requested a review from a team as a code owner June 9, 2026 00:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates ThreadPoolCommand’s managed work-item enumeration to use the ThreadPoolWorkQueue field _assignableWorkItemQueues (since _assignableWorkItems never existed) and expands enumeration to include lowPriorityWorkItems, improving coverage of queued work items across runtime versions.

Changes:

  • Add enumeration of lowPriorityWorkItems from ThreadPoolWorkQueue.
  • Replace the nonexistent _assignableWorkItems path with enumeration of _assignableWorkItemQueues (array of queues), with a capped traversal limit.
Show a summary per file
File Description
src/Microsoft.Diagnostics.ExtensionCommands/ThreadPoolCommand.cs Updates work-item enumeration to include low-priority and assignable work-item queues.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Comment thread src/Microsoft.Diagnostics.ExtensionCommands/ThreadPoolCommand.cs
@hoyosjs hoyosjs merged commit d9243b8 into dotnet:main Jun 9, 2026
15 of 18 checks passed
@leculver leculver deleted the leculver/fix-threadpool-assignable-workitems branch June 9, 2026 20:32
@hoyosjs hoyosjs mentioned this pull request Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants