Skip to content

fix: race condition in parallel kind processing - #744

Merged
bhearsum merged 1 commit into
taskcluster:mainfrom
bhearsum:push-zynrrtworsvw
Aug 14, 2025
Merged

bhearsum merged 1 commit into
taskcluster:mainfrom
bhearsum:push-zynrrtworsvw

Conversation

@bhearsum

Copy link
Copy Markdown
Contributor

This race condition happens because all_tasks is updated in a callback, which runs asynchronously, but kinds and edges are updated in the main loop. This leads to a potential mismatch when the logic at the start of submit_ready_kinds runs: if all_tasks is updated but the other two are not, the data we feed into load_tasks will be incorrect.

This race condition happens because `all_tasks` is updated in a callback, which runs asynchronously, but `kinds` and `edges` are updated in the main loop. This leads to a potential mismatch when the logic at the start of `submit_ready_kinds` runs: if `all_tasks` is updated but the other two are not, the data we feed into `load_tasks` will be incorrect.
@bhearsum
bhearsum requested a review from a team as a code owner August 14, 2025 14:39
@bhearsum
bhearsum requested a review from jcristau August 14, 2025 14:39

@Eijebong Eijebong 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.

Something something "must be this tall to write multithreaded code"

@bhearsum

Copy link
Copy Markdown
Contributor Author

Something something "must be this tall to write multithreaded code"

Clearly I am too short!!!

@bhearsum
bhearsum merged commit 1fdbb6c into taskcluster:main Aug 14, 2025
15 of 17 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