Skip to content

[GSan] Fix race in gdc_wait handling - #11199

Merged
peterbell10 merged 2 commits into
mainfrom
pb/gdc-race
Aug 7, 2026
Merged

[GSan] Fix race in gdc_wait handling#11199
peterbell10 merged 2 commits into
mainfrom
pb/gdc-race

Conversation

@peterbell10

@peterbell10 peterbell10 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Previously it was possible for one thread to set

state->gdcWaitCalled = 0

After thread 0 had set it to acquirePrevious (which is true for no gdc).

This would lead to a spurious error:

kernel launched with programmatic dependent launch did not call gdc_wait

on kernels that aren't using pdl/gdc at all.

Fix by only doing the init on thread 0.

Previously it was possible for one thread to set
```
state->gdcWaitCalled = 0
```
After thread 0 had set it to `acquirePrevious` (which means no gdc).

This would lead to a spurious error:
```
kernel launched with programmatic dependent launch did not call gdc_wait
```
on kernels that aren't using pdl/gdc at all.

Fix by always doing the init on thread 0.
@peterbell10
peterbell10 requested a review from ptillet as a code owner August 6, 2026 20:18

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bae6de55a1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread python/triton/experimental/gsan/src/GSanLibrary.cu Outdated
@peterbell10
peterbell10 enabled auto-merge (squash) August 7, 2026 16:17
@peterbell10
peterbell10 merged commit d2c7e35 into main Aug 7, 2026
10 checks passed
@peterbell10
peterbell10 deleted the pb/gdc-race branch August 7, 2026 16:53
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