Skip to content

Fix flaky test test_many_connections in test_odbc_interaction#98362

Merged
alexey-milovidov merged 1 commit intomasterfrom
fix-test-many-connections-flaky
Mar 1, 2026
Merged

Fix flaky test test_many_connections in test_odbc_interaction#98362
alexey-milovidov merged 1 commit intomasterfrom
fix-test-many-connections-flaky

Conversation

@alexey-milovidov
Copy link
Copy Markdown
Member

Summary

  • The odbc-bridge crashes with SIGSEGV when handling 25 concurrent ODBC requests simultaneously, causing subsequent connections to get "Connection refused"
  • Use assert_eq_with_retry to retry the query, allowing startBridgeSync to detect the dead bridge and restart it on retry

CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=93983&sha=fbe65318fd2687eb5640e14df6cd5cba1455cada&name_0=PR&name_1=Integration%20tests%20%28amd_binary%2C%203%2F5%29

Closes #92521

Changelog category (leave one):

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

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

...

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

🤖 Generated with Claude Code

The `odbc-bridge` crashes with SIGSEGV when handling 25 concurrent
requests simultaneously (each UNION ALL branch opens a separate
HTTP connection to the bridge). The crash occurs in the thread pool
when `ParallelFormattingOutputFormat` tries to spawn formatting
threads for each concurrent request, causing resource exhaustion.

After the crash, remaining connections get "Connection refused"
and the query fails.

Use `assert_eq_with_retry` (already used elsewhere in this test file)
to retry the query. On retry, `startBridgeSync` detects the dead
bridge and restarts it.

Closes #92521

https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=93983&sha=fbe65318fd2687eb5640e14df6cd5cba1455cada&name_0=PR&name_1=Integration%20tests%20%28amd_binary%2C%203%2F5%29

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

clickhouse-gh bot commented Mar 1, 2026

Workflow [PR], commit [366f274]

Summary:

@clickhouse-gh clickhouse-gh bot added the pr-ci label Mar 1, 2026
@alexey-milovidov alexey-milovidov self-assigned this Mar 1, 2026
@alexey-milovidov alexey-milovidov added this pull request to the merge queue Mar 1, 2026
Merged via the queue into master with commit c29fa5c Mar 1, 2026
148 checks passed
@alexey-milovidov alexey-milovidov deleted the fix-test-many-connections-flaky branch March 1, 2026 03:50
@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Mar 1, 2026
alexey-milovidov added a commit that referenced this pull request Mar 1, 2026
…laky

Fix flaky test test_many_connections in test_odbc_interaction
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.

Flaky test: test_odbc_interaction/test.py::test_many_connections

2 participants