Skip to content

Force-migrate fibers under ThreadSanitizer#82

Closed
mstetsyuk wants to merge 1 commit into
mainfrom
migrate-fibers-under-TSan
Closed

Force-migrate fibers under ThreadSanitizer#82
mstetsyuk wants to merge 1 commit into
mainfrom
migrate-fibers-under-TSan

Conversation

@mstetsyuk

Copy link
Copy Markdown
Member

Using STL synchronisation primitives like std::mutex should be thread-affine. If a user calls std::mutex::lock, then yield, then resume, then std::mutex::unlock, it's a bug because the fiber could migrate to another thread. But in my experience, it's quite hard to hit that bug in CI. To make it much simpler, I suggest we always add the fiber to the global ready queue under TSan.

@mstetsyuk mstetsyuk requested a review from vadimskipin June 19, 2026 17:17
@mstetsyuk mstetsyuk force-pushed the migrate-fibers-under-TSan branch from 59860d6 to bc538e5 Compare June 19, 2026 22:14
@mstetsyuk mstetsyuk closed this Jun 19, 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.

1 participant