Retry poll on EINTR in the vendored nats-io client - #120202
Conversation
`natsSock_WaitReady` treated a `poll` interrupted by a signal (`EINTR`) as a socket error, so a connection attempt of a `NATS` table failed spuriously with `Cannot connect to Nats last error: (unix/sock.c:56): poll error: 4` whenever the query profiler signalled the connecting thread. With `nats_startup_connect_tries = 1` in the credentials-rotation tests this made `CREATE TABLE` fail at random. The fix (ClickHouse/nats.c@b88704df) waits again for the rest of the deadline. The bump also brings the two fork changes already merged there: the libuv attach ordering and the JetStream fetch lock-order backport. Failure: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=119848&sha=ce21881b746a07dc79574410b18f5c5b57e38551&name_0=PR&name_1=Integration%20tests%20(amd_asan_ubsan,%20db%20disk,%204/8) PR: #119848 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Workflow [PR], commit [5f9101d] Summary: ❌
AI ReviewSummaryThis PR bumps Final Verdict
LLVM Coverage ReportMeasured on commit 5f9101d.
Changed lines: Uncovered code analysis did not run: No coverable C/C++ source files changed (contrib/ is excluded from coverage). Newly covered: +184 lines in 50 files (-99 lines lost coverage) · Details |
|
Backporting to fix CI |
|
🕵 Merged master (the branch was 2021 commits behind) and pushed Adopted the AI review: the category is now Both reds on
|
|
Verified the bump and measured what it is worth, since a gitlink bump shows nothing in the diff. The fix works, measured. I built the vendored client twice, at master's pointer
That is the CI string byte for byte, reproduced at master's pointer and gone at yours, with the deadline intact (the loop recomputes What it costs today. The The bump carries three fixes. Ordering. #119507 moves the submodule to the Its own CI on
Two ways out, your call:
|
Backport #120202 to 26.9: Retry `poll` on `EINTR` in the vendored `nats-io` client
Backport #120202 to 26.3: Retry `poll` on `EINTR` in the vendored `nats-io` client
Backport #120202 to 26.7: Retry `poll` on `EINTR` in the vendored `nats-io` client
Backport #120202 to 26.8: Retry `poll` on `EINTR` in the vendored `nats-io` client
…ndored `nats-io` client
…ndored `nats-io` client
…ndored `nats-io` client
Closes: #120201
Related: #119867
Related: #119848
natsSock_WaitReadyin the vendorednats-ioclient treated apollinterrupted by a signal (EINTR) as a socket error. The query profiler signals every thread, so a connection attempt of aNATStable failed at random withCannot connect to Nats last error: (unix/sock.c:56): poll error: 4. The credentials-rotation integration tests usenats_startup_connect_tries = 1, so the one interruptedpollfailed theirCREATE TABLE(6 times on master and unrelated PRs since 2026-09-14).The fix in the fork (ClickHouse/nats.c@b88704df,
src/unix/sock.c) waits again for whatever is left of the deadline. The submodule bump also brings the two fork changes already merged there, which #119867 bumps to: the libuv attach ordering and the JetStream fetch lock-order backport.Example failure: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=119848&sha=ce21881b746a07dc79574410b18f5c5b57e38551&name_0=PR&name_1=Integration%20tests%20(amd_asan_ubsan,%20db%20disk,%204/8)
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fix spurious
NATSconnection failures when the vendorednats-ioclient getsEINTRwhile waiting for a socket, and include the upstream JetStream pull-subscription deadlock fix in the vendored client.🤖 Generated with Claude Code
Version info
26.10.1.384-master(included in26.10and later)26.9.2.2,26.8.11.10,26.7.14.12,26.3.33.127