Skip to content

Conversation

@viktorika
Copy link

1.Running TSAN on my M3 computer reports a data race. I believe there are some memory ordering issues with thief_block_, tail_, and steal_tail_.
2.There is an extremely small chance that elements within a certain block might be skipped and never executed. The reason is that the steal function uses steal_tail to determine whether it is complete or empty, but steal_tail == block_size might indicate that the current block has already been taken over.

std::uint64_t spos = steal_head_.load(stdexec::__std::memory_order_acquire);

Using steal_head for checking can avoid this issue.

@copy-pr-bot
Copy link

copy-pr-bot bot commented Jan 11, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@ericniebler
Copy link
Collaborator

/ok to test f964a97

@viktorika viktorika mentioned this pull request Jan 12, 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.

2 participants