Skip to content

Update AMQP-CPP submodule - #130541

Merged
tavplubix merged 2 commits into
masterfrom
amqpcpp-limit-field-nesting-depth
Nov 12, 2026
Merged

tavplubix merged 2 commits into
masterfrom
amqpcpp-limit-field-nesting-depth

Conversation

@tavplubix

@tavplubix tavplubix commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Update AMQP-CPP to limit the nesting depth of decoded field tables and to stop treating basic.nack as a synchronous frame, which made acknowledgements after a basic.nack never be sent.

Related: ClickHouse/AMQP-CPP#11
Related: ClickHouse/AMQP-CPP#9
Related: #76163
Related: #124655

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

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

Fixed the RabbitMQ table engine not sending acknowledgements after a message was nacked. Improved validation of messages received by the RabbitMQ table engine.

🤖 Generated with Claude Code


Workflow [PR]
Sync PR [sync-upstream/pr/130541]

Version info

  • Merged into: 26.11.1.2112-master (included in 26.11 and later)

@tavplubix
tavplubix marked this pull request as draft November 10, 2026 16:29
@clickhouse-gh

clickhouse-gh Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [8d85c7f]

Summary: ❌

job_name test_name status info comment
Finish Workflow FAIL
python3 ./ci/jobs/scripts/workflow_hooks/new_tests_check.py FAIL

AI Review

Summary

Updates AMQP-CPP from 4fccd7f to 5f4c447, bounding recursive field-table/array decoding and allowing frames after basic.nack to be sent. Both existing regression-coverage findings remain unresolved at 8d85c7f44a34004b50d2a5251aaa2c935d074772. No additional inline findings were identified; existing threads were left unchanged without duplicate comments.

Findings

⚠️ Majors

  • contrib/AMQP-CPP:1 — The decoder's stack-safety limit has no regression coverage. Neither this PR nor the pinned dependency adds a test for Field::decode rejecting excessive table or array nesting. The existing hostile-broker fixture sends an empty Connection.Start properties table, so it never exercises the guard. Add focused coverage for table, array, and mixed nesting at and beyond the supported boundary, plus a valid decode on the same thread after rejection to verify the thread_local counter is restored. This is the unchanged existing finding.

  • contrib/AMQP-CPP:1 — The acknowledgement fix can regress without failing the current test. test_rabbitmq_default_mode_nack_on_parse_error still stops waiting after one dead letter (tests/integration/test_storage_rabbitmq/test.py:3840–3847) and then checks only inserted rows. The old dependency sends the first negative acknowledgement and can insert later rows while their acknowledgements remain queued, satisfying both assertions. Require a second dead letter on the same channel or verify a subsequent acknowledgement at the broker, with failure on the old pin and success on the new one. The small test change in the still-open Make test_rabbitmq_default_mode_nack_on_parse_error detect a consumer channel wedged by basic.nack #130649 supplies the former assertion and could be incorporated here or landed together. This is the unchanged existing finding.

Tests
  • ⚠️ The Praktika reports report no failed tests, but the integration bug-fix validation reports contain no test results and this PR changes no tests. The focused regressions above are still needed to distinguish the fixed behavior from the old pin. No local build or tests were run during this review.
Final Verdict

Status: ⚠️ Request changes. Add durable regression coverage for the nesting guard and for frames sent after the first negative acknowledgement; reuse the existing fixtures or dependency tests.

@clickhouse-gh clickhouse-gh Bot added pr-bugfix Pull request with bugfix, not backported by default submodule changed At least one submodule changed in this PR. labels Nov 10, 2026
@tavplubix
tavplubix force-pushed the amqpcpp-limit-field-nesting-depth branch from 15cec81 to ca20fbb Compare November 10, 2026 16:35
@tavplubix
tavplubix marked this pull request as ready for review November 10, 2026 16:37
Comment thread contrib/AMQP-CPP Resolved
@clickhouse-gh clickhouse-gh Bot added the comp-external-dependencies Third-party deps updates in contrib/, vendored code, and platform base libraries. label Nov 10, 2026
@clickhouse-gh

clickhouse-gh Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing 8d85c7f44 with master b666e1ef2 (stripped binary size, per-symbol sizes and ThinLTO time; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes

programs/clickhouse-stripped: smaller than the master baseline by the known offset between the two builds, so the difference is not shown. A delta that differs from the offset by more than 50% of it is shown, in either direction.

The official master build is compiled with -g and a pull request build is not, and XRay counts debug instructions towards its instrumentation threshold, so master instruments thousands of functions more and its binary is ~0.4% larger no matter what the pull request does.

Slowest function optimization changes (ThinLTO)

Median per-function time ratio to the master baseline: programs/clickhouse ×0.61, programs/clickhouse-keeper ×0.67 (each binary is linked separately, on a different machine and with different build flags); deltas below are relative to it.

Binary Function Master PR Δ vs median
programs/clickhouse DB::registerFunctionConversion(DB::FunctionFactory&) 5.8 s 13.7 s +10.2 s (+287%)
programs/clickhouse _ZN6detail10static_forITk7is_enumN2DB23AttributeUnderlyingTypeEZNS1_29callOnDictionaryAttributeType… 3.3 s 7.3 s +5.3 s (+262%)
Compile time of recompiled translation units

15 translation units recompiled, 11 s compile time in total, 15 of them have a recent master baseline.

Job report

@comino

comino commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

@tavplubix since this moves the pin anyway: could ClickHouse/AMQP-CPP#9 go in with it? It is a one-line fix: BasicNackFrame lacks its synchronous() override, so after a basic.nack every later ack is queued and never sent (#76163). It merges cleanly onto the fork's master, and #124655 waits for it.

@tavplubix tavplubix added the pr-must-backport Pull request should be backported intentionally. Use this label with great care! label Nov 11, 2026
Comment thread contrib/AMQP-CPP Resolved
@tavplubix
tavplubix added this pull request to the merge queue Nov 12, 2026
Merged via the queue into master with commit 1486918 Nov 12, 2026
399 of 402 checks passed
@tavplubix
tavplubix deleted the amqpcpp-limit-field-nesting-depth branch November 12, 2026 18:06
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-synced-to-cloud The PR is synced to the cloud repo label Nov 12, 2026
@robot-ch-test-poll robot-ch-test-poll added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label Nov 12, 2026
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Nov 12, 2026
clickhouse-gh Bot added a commit that referenced this pull request Nov 12, 2026
Backport #130541 to 26.8: Update `AMQP-CPP` submodule
clickhouse-gh Bot added a commit that referenced this pull request Nov 12, 2026
Backport #130541 to 26.9: Update `AMQP-CPP` submodule
clickhouse-gh Bot added a commit that referenced this pull request Nov 12, 2026
Backport #130541 to 26.10: Update `AMQP-CPP` submodule
groeneai pushed a commit to groeneai/ClickHouse that referenced this pull request Nov 12, 2026
groeneai pushed a commit to groeneai/ClickHouse that referenced this pull request Nov 12, 2026
groeneai pushed a commit to groeneai/ClickHouse that referenced this pull request Nov 12, 2026
leshikus pushed a commit that referenced this pull request Nov 13, 2026
leshikus pushed a commit that referenced this pull request Nov 13, 2026
leshikus pushed a commit that referenced this pull request Nov 13, 2026
groeneai added a commit to groeneai/ClickHouse that referenced this pull request Nov 22, 2026
…d it

ClickHouse#130541 moved contrib/AMQP-CPP to 5f4c447 on master (commit 8d85c7f), the
same commit this PR moved it to, so the basic.nack fix no longer needs this
PR. Set the gitlink back to the value of this branch's merge base (4fccd7f):
the PR then changes only test_rabbitmq_default_mode_nack_on_parse_error, and
merging it keeps master's 5f4c447.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-external-dependencies Third-party deps updates in contrib/, vendored code, and platform base libraries. pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-bugfix Pull request with bugfix, not backported by default pr-must-backport Pull request should be backported intentionally. Use this label with great care! pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR pr-synced-to-cloud The PR is synced to the cloud repo submodule changed At least one submodule changed in this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants