Skip to content

Fix flaky test 02916_glogal_in_cancel under TSan#96579

Merged
alexey-milovidov merged 2 commits intomasterfrom
fix-02916-glogal-in-cancel-tsan
Feb 10, 2026
Merged

Fix flaky test 02916_glogal_in_cancel under TSan#96579
alexey-milovidov merged 2 commits intomasterfrom
fix-02916-glogal-in-cancel-tsan

Conversation

@alexey-milovidov
Copy link
Copy Markdown
Member

The test uses remote('127.0.0.{3|2}', ...) with max_execution_time = 0.5. Under TSan, the 0.5s timeout fires during table structure resolution (which requires network connections to remote shards), causing NO_REMOTE_SHARD_AVAILABLE instead of a graceful timeout.

Added a local shard in getStructureOfRemoteTable, allowing instant structure resolution without network calls. The test still exercises GLOBAL IN cancellation with a distributed query.

https://s3.amazonaws.com/clickhouse-test-reports/json.html?REF=master&sha=f9e36b04ffb08eee40c70de6b8be57d77bb88338&name_0=MasterCI&name_1=Stateless%20tests%20%28amd_tsan%2C%20parallel%2C%202%2F2%29

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

alexey-milovidov and others added 2 commits February 10, 2026 17:36
The test uses `remote('127.0.0.{3|2}', ...)` with `max_execution_time = 0.5`.
Under TSan, the 0.5s timeout fires during table structure resolution
(which requires network connections to remote shards), causing
`NO_REMOTE_SHARD_AVAILABLE` instead of a graceful timeout.

Change to `127.0.0.{1|2}` so that `127.0.0.1` is detected as a local
shard in `getStructureOfRemoteTable`, allowing instant structure
resolution without network calls. The test still exercises GLOBAL IN
cancellation with a distributed query.

https://s3.amazonaws.com/clickhouse-test-reports/json.html?REF=master&sha=f9e36b04ffb08eee40c70de6b8be57d77bb88338&name_0=MasterCI&name_1=Stateless%20tests%20%28amd_tsan%2C%20parallel%2C%202%2F2%29

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…enario

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh Bot commented Feb 10, 2026

Workflow [PR], commit [b7f47fc]

Summary:

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Feb 10, 2026
Copy link
Copy Markdown
Member

@nickitat nickitat left a comment

Choose a reason for hiding this comment

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

127.0.0.{3|2} are local addresses too. Sounds like either something is wrong in the explanation or we don't correctly recognise all loopback addresses as such.

@nickitat nickitat self-assigned this Feb 10, 2026
@alexey-milovidov
Copy link
Copy Markdown
Member Author

@nickitat, yes, we only recognize 127.0.0.1 as local. This is used in a few other tests.

@alexey-milovidov alexey-milovidov merged commit a0855a0 into master Feb 10, 2026
262 of 264 checks passed
@alexey-milovidov alexey-milovidov deleted the fix-02916-glogal-in-cancel-tsan branch February 10, 2026 23:12
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-synced-to-cloud The PR is synced to the cloud repo label Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-ci pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants