Skip to content

Existing test fails under ThreadSanitizer, add CI to show it - #1

Closed
anderewrey wants to merge 2 commits into
masterfrom
claude/new-session-2vvsb5
Closed

anderewrey wants to merge 2 commits into
masterfrom
claude/new-session-2vvsb5

Conversation

@anderewrey

Copy link
Copy Markdown
Owner

Adds a GCC, Clang and TSan workflow. Under TSan, EventLoopBasicTest
reports a data race: the scheduler thread's push races the loop's
empty() check. EVENTLOOP_BUILD_TESTS builds the tests without the
coverage flags.

Adds a GCC, Clang and TSan workflow. Under TSan, EventLoopBasicTest
reports a data race: the scheduler thread's push races the loop's
empty() check. EVENTLOOP_BUILD_TESTS builds the tests without the
coverage flags.
TriggerEvent() pushes onto the queue without the loop's mutex while the
loop reads and pops it under that mutex. TSan reports it when an event
comes from another thread, and a push landing between the loop's
predicate check and its wait loses the wakeup. The schedule and the
shutdown flags have the same problem. Push and schedule under the
loops' mutexes, release the lock while handlers run, and make the
shutdown flags atomic, set under the mutexes.
@anderewrey anderewrey closed this Sep 29, 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