Skip to content

Fix race condition in ProfileTiming iteration/action timeout tracking#740

Merged
nmalkapuram merged 2 commits into
microsoft:mainfrom
rhch1309:users/rchaturvedi/fixProfileTimingRace
Jul 2, 2026
Merged

Fix race condition in ProfileTiming iteration/action timeout tracking#740
nmalkapuram merged 2 commits into
microsoft:mainfrom
rhch1309:users/rchaturvedi/fixProfileTimingRace

Conversation

@rhch1309

@rhch1309 rhch1309 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

MonitorTimeoutAsync subscribed to the IterationEnd/ActionEnd events inside the background Task.Run body. When the profile action loop runs very quickly (e.g. a minimal execution interval), the first iteration(s)/action(s) could complete before the subscription was registered, causing an extra iteration/action to run beyond the requested count and intermittently failing ProfileExecutorHandlesExecutionTimingInstructionsCorrectly_ExplicitNumberIterationsScenario. Subscribe to the events synchronously before starting the background task, and correctly unsubscribe from ActionEnd (was IterationEnd) in the IndividualAction path. Bump version to 3.3.16.

Rohit Chaturvedi added 2 commits July 2, 2026 15:08
MonitorTimeoutAsync subscribed to the IterationEnd/ActionEnd events inside the background Task.Run body. When the profile action loop runs very quickly (e.g. a minimal execution interval), the first iteration(s)/action(s) could complete before the subscription was registered, causing an extra iteration/action to run beyond the requested count and intermittently failing ProfileExecutorHandlesExecutionTimingInstructionsCorrectly_ExplicitNumberIterationsScenario. Subscribe to the events synchronously before starting the background task, and correctly unsubscribe from ActionEnd (was IterationEnd) in the IndividualAction path. Bump version to 3.3.16.
@nmalkapuram nmalkapuram merged commit b182353 into microsoft:main Jul 2, 2026
5 checks passed
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.

2 participants