Skip to content

task: add focused ThreadSanitizer concurrency profile - #263

Closed
MisterVVP wants to merge 1 commit into
mainfrom
dev-add-threadsanitizer-validation-profile
Closed

MisterVVP wants to merge 1 commit into
mainfrom
dev-add-threadsanitizer-validation-profile

Conversation

@MisterVVP

@MisterVVP MisterVVP commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Motivation

  • Catch SDK-owned data races in a focused, reproducible validation profile without requiring a full, expensive TSan run across all CI tests.
  • Protect concurrent HTTP/streaming/subscription/store/dispatcher code paths introduced in recent releases by adding targeted TSan coverage and making it easy to extend.

Description

  • Add a reproducible TSan runner scripts/run_thread_sanitizer.sh that configures Clang with -fsanitize=thread -fno-omit-frame-pointer, builds a focused set of test executables, and runs tests labeled tsan with fail-fast TSan options.
  • Label concurrency-sensitive tests in tests/CMakeLists.txt with gtest_discover_tests(... PROPERTIES LABELS "tsan") so the profile selects only SDK-owned synchronization paths.
  • Add a CI job in .github/workflows/ci.yml named thread-sanitizer to run the focused profile alongside existing ASan/UBSan jobs.
  • Document usage, test selection, third-party exclusion policy, and extension steps in docs/thread-sanitizer.md.
  • Fix a TSan-exposed condition-variable lifetime race by notifying while holding the completion mutex in src/http/http_client_streaming.cpp.
  • Synchronize the HTTP+JSON streaming test observer to use a single mutex for completion/error/wait predicates in tests/integration/http_json_streaming_integration_test.cpp.

@MisterVVP MisterVVP added the codex Automatic label added by codex agent. Should not be used label Oct 4, 2026 — with ChatGPT Codex Connector
@MisterVVP MisterVVP self-assigned this Oct 4, 2026
@MisterVVP MisterVVP added AI agent AI agent contribution maintenance and removed codex Automatic label added by codex agent. Should not be used labels Oct 4, 2026
@MisterVVP MisterVVP changed the title Add focused ThreadSanitizer concurrency profile maintenance: Add focused ThreadSanitizer concurrency profile Oct 4, 2026
@MisterVVP MisterVVP changed the title maintenance: Add focused ThreadSanitizer concurrency profile task: Add focused ThreadSanitizer concurrency profile Oct 4, 2026
@MisterVVP MisterVVP changed the title task: Add focused ThreadSanitizer concurrency profile task: add focused ThreadSanitizer concurrency profile Oct 4, 2026
@MisterVVP
MisterVVP marked this pull request as ready for review October 5, 2026 08:44
@MisterVVP MisterVVP closed this Oct 5, 2026
@MisterVVP
MisterVVP deleted the dev-add-threadsanitizer-validation-profile branch October 5, 2026 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI agent AI agent contribution maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Maintenance]: Add a targeted ThreadSanitizer CI profile for concurrency-sensitive code

1 participant