Skip to content

Cherry pick #121454 to 26.9: Skip the RSS-based half of the external DISTINCT memory test under ASan - #129481

Merged
PedroTadim merged 4 commits into
backport/26.9/121454from
cherrypick/26.9/121454
Nov 5, 2026
Merged

PedroTadim merged 4 commits into
backport/26.9/121454from
cherrypick/26.9/121454

Conversation

@robot-clickhouse-ci-2

Copy link
Copy Markdown
Contributor

Original pull-request #121454

Do not merge this PR manually

This pull-request is a first step of an automated backporting.
It contains changes similar to calling git cherry-pick locally.
If you intend to continue backporting the changes, then resolve all conflicts if any.
Otherwise, if you do not want to backport them, then just close this pull-request.

The check results does not matter at this step - you can safely ignore them.

Before you resolve anything

Conflicts are often caused by a prerequisite change that has not been backported yet, rather than by a real divergence. The bot re-tries this cherry-pick against the release branch on every run, so if that is the case here it will merge itself as soon as the prerequisite lands, and you will see a comment saying so. Manual resolution is only needed while the conflict persists.

Troubleshooting

If the conflicts were resolved in a wrong way

If this cherry-pick PR is completely screwed by a wrong conflicts resolution, and you want to recreate it:

  • delete the pr-cherrypick label from the PR
  • delete this branch from the repository

You also need to check the Original pull-request for pr-backports-created label, and delete if it's presented there

The PR source

The PR is created in the CI job

alexey-milovidov and others added 3 commits September 21, 2026 22:53
`test_max_bytes_ratio_before_external_distinct[server]` fails on `Integration tests
(amd_asan_ubsan, db disk, 1/8)` in about half of the runs that carry #121096: 16 failures
against 17 passes since it merged on 2026-09-21, 4 of them on `master`. The `[user]`
parameter passed 33 out of 33 over the same window.

It is the spilling half that fails, and it is rejected on RSS rather than on tracked
memory: `(total) memory limit exceeded: would use 2.65 GiB (attempt to allocate chunk of
64.50 MiB), current RSS: 3.95 GiB, maximum: 4.00 GiB`. `max_server_memory_usage` is
enforced against RSS, and an Address Sanitizer build's RSS carries redzones and
quarantined chunks that the memory tracker never sees - 1.3 GiB of them here.

The query itself behaves as designed. With `max_bytes_ratio_before_external_distinct =
0.3` against the node's 4 GiB it spills at 1.2 GiB, and the final merge then holds 54
suppression runs of 16 MiB, 4 ordinary runs read back in 64.50 MiB blocks and a 15 chunk
in-memory tail open at once, so it needs roughly twice the spill threshold. That leaves
about 1.3 GiB of the node spare, which is exactly what the sanitizer overhead consumes.
Raising the limit does not buy margin, because the unspilled peak has to stay above it,
and #121096 already sized the workload to the harness's 600 second per-query cap.

The `[user]` parameter is unaffected by construction, because
`max_memory_usage_for_user` counts tracked bytes rather than RSS, so only the `[server]`
parameter is skipped and only on an Address Sanitizer build. Both parameters keep running
on `arm_binary` and on `amd_llvm_coverage`, where neither has failed.

Report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?REF=master&sha=e033cea645358fa98672769636b5c979d8adcd26&name_0=MasterCI&name_1=Integration%20tests%20%28amd_asan_ubsan%2C%20db%20disk%2C%201%2F8%29
Related: #121096
…l-distinct-memory-limit-asan

# Conflicts:
#	tests/integration/test_max_bytes_ratio_before_external_order_group_by_for_server/test.py
…t-memory-limit-asan

Skip the RSS-based half of the external DISTINCT memory test under ASan
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only! do not test disable testing on pull request labels Nov 5, 2026
…ypick/26.9/121454

# Conflicts:
#	tests/integration/test_max_bytes_ratio_before_external_order_group_by_for_server/test.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not test disable testing on pull request pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants