Skip to content

Conversation

@kouvel
Copy link
Contributor

@kouvel kouvel commented Sep 15, 2021

Hardened ThreadpoolMgr::GateThreadStart against the possibility that the observed group-local affinity mask contains set bits at positions higher than the total group-local CPU count that was captured during earlier initialization.

This fixes customer-reported crashes which have occurred on multi-group machines with heterogenous CPU counts across groups (but the same crash can probably also occur on single-group VMs if CPUs are hot-added and are then manually added to the process affinity mask).

Hardened ThreadpoolMgr::GateThreadStart against the possibility that the observed group-local affinity mask contains set bits at positions higher than the total group-local CPU count that was captured during earlier initialization.

This fixes customer-reported crashes which have occurred on multi-group machines with heterogenous CPU counts across groups (but the same crash can probably also occur on single-group VMs if CPUs are hot-added and are then manually added to the process affinity mask).
@kouvel kouvel added this to the 7.0.0 milestone Sep 15, 2021
@kouvel kouvel requested a review from ChrisAhna September 15, 2021 00:48
@kouvel kouvel self-assigned this Sep 15, 2021
@ghost
Copy link

ghost commented Sep 15, 2021

Tagging subscribers to this area: @mangod9
See info in area-owners.md if you want to be subscribed.

Issue Details

Hardened ThreadpoolMgr::GateThreadStart against the possibility that the observed group-local affinity mask contains set bits at positions higher than the total group-local CPU count that was captured during earlier initialization.

This fixes customer-reported crashes which have occurred on multi-group machines with heterogenous CPU counts across groups (but the same crash can probably also occur on single-group VMs if CPUs are hot-added and are then manually added to the process affinity mask).

Author: kouvel
Assignees: kouvel
Labels:

area-System.Threading

Milestone: 7.0.0

Copy link
Member

@ChrisAhna ChrisAhna left a comment

Choose a reason for hiding this comment

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

:shipit:

@kouvel
Copy link
Contributor Author

kouvel commented Sep 15, 2021

For some reason it still says an approving review is required even though @ChrisAhna has approved it. @mangod9 could you also approve?

@mangod9
Copy link
Member

mangod9 commented Sep 15, 2021

yeah that is weird, I do see @ChrisAhna is a member of .net platform.

@kouvel kouvel merged commit af2a809 into dotnet:main Sep 15, 2021
@kouvel
Copy link
Contributor Author

kouvel commented Sep 15, 2021

Thanks, that worked

@kouvel kouvel deleted the TpGateFix branch September 15, 2021 23:18
@ghost ghost locked as resolved and limited conversation to collaborators Nov 3, 2021
Sign up for free to 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.

3 participants