Skip to content

Fix flaky test_storage_iceberg_disks: skip S3 disk startup access check - #110592

Merged
alexey-milovidov merged 1 commit into
ClickHouse:masterfrom
groeneai:groeneai/fix-iceberg-disks-s3-access-check-timeout
Jul 16, 2026
Merged

alexey-milovidov merged 1 commit into
ClickHouse:masterfrom
groeneai:groeneai/fix-iceberg-disks-s3-access-check-timeout

Conversation

@groeneai

@groeneai groeneai commented Jul 15, 2026 •

Copy link
Copy Markdown
Collaborator

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):

...

Description

Fix the recurring shard-wide test_storage_iceberg_disks/test.py failure where all 18 module tests ERROR with Timed out while waiting for instance 'node2' ... to start (whole cluster fixture never comes up).

Root cause, from the node2 server log of the failing run (PR #110078, Integration tests (amd_asan_ubsan, db disk, old analyzer, 1/6)): node2 crashed during startup while loading metadata. Its disk_s3_common startup access check (IDisk::startup -> checkAccess, a WRITE probe) got a transient 403 AccessDenied from MinIO ("time skew ... Attempting to adjust the signer" under concurrent container startup). That access-check failure is fatal during metadata load, so the server aborted ("Caught exception while loading metadata ... While checking access for disk disk_s3_common") and its TCP port never opened. cluster.start() then timed out waiting for node2, ERRORing all 18 tests. node1 and node3 (which did not hit the 403) started normally, so this is not a shard-wide OOM/slow-start.

Fix: add skip_access_check to the S3 disks (disk_s3_common, disk_s3_with_cache). This matches test_storage_delta_disks, which already sets skip_access_check on all of its disks. The startup access probe is not what these tests exercise.

Recurrence (CIDB, 30d): the identical exactly-18-tests pattern hit unrelated PRs (#104809 on the same shard on 2026-07-08, #108035, #107566) and master (2026-06-15), with no open tracking issue.

Reported by @alexey-milovidov on #110078 (unrelated to that PR's native ORC reader change).

Version info

  • Merged into: 26.7.1.1003 (included in 26.7 and later)

node2 crashed on startup while loading metadata: the disk_s3_common
startup access check (IDisk::startup -> checkAccess) got a transient
403 AccessDenied from MinIO (SigV4 time-skew under concurrent container
startup), which is fatal during metadata load, so the server aborted
and its TCP port never opened. cluster.start() then timed out waiting
for node2 and all 18 module tests ERRORed with 'Timed out while waiting
for instance node2 to start'. node1/node3 (no 403) started fine, so it
is not shard-wide OOM.

Add skip_access_check to the S3 disks (disk_s3_common, disk_s3_with_cache),
matching test_storage_delta_disks which already skips the access check on
all its disks. The access check is not what these tests exercise.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@groeneai

Copy link
Copy Markdown
Collaborator Author
Pre-PR validation gate (click to expand)
# Question Answer
a Deterministic repro? Root cause is deterministic from the CI log, not a probabilistic guess: node2's server log shows the startup disk_s3_common access check hit a 403 and the server aborted loading metadata. The 403 itself is a transient MinIO/SigV4 condition; the fix removes the fatal dependency on it entirely (the access probe is disabled), so the crash path cannot occur.
b Root cause explained? IDisk::startup runs checkAccess (a WRITE probe) unless skip_access_check is set. Under concurrent container startup MinIO returned 403 AccessDenied (SigV4 "time skew") on node2's disk_s3_common probe. That failure is fatal during metadata load -> server aborts -> TCP port never opens -> cluster.start() times out on node2 -> all 18 module tests ERROR. node1/node3 (no 403) started fine, ruling out shard-wide OOM.
c Fix matches root cause? Yes. skip_access_check=true on the S3 disks makes IDisk::startup skip exactly the checkAccess probe (src/Disks/IDisk.cpp:223) that produced the fatal "While checking access for disk disk_s3_common" (IDisk.cpp:307). It removes the failing dependency, not a symptom.
d Test intent preserved / new tests added? Preserved. The tests exercise Iceberg reads over local/s3/azure disks; the disk startup access probe is not part of what they verify. test_storage_delta_disks already skips the access check on all its disks, so this aligns the two sibling tests.
e Both directions demonstrated? Failing direction: node2 server log of the failing run shows the abort. Fixed direction: with the probe disabled, node2's startup no longer performs the WRITE that 403'd, so metadata load cannot abort on it. This is a test-config change, not a code-path change.
f Fix is general across code paths? Applied to both S3 disks (disk_s3_common and the disk_s3_with_cache cache disk over it). Azure disks already carry skip_access_check. Local disk has no remote probe.
g Fix generalizes across inputs? N/A (integration test config fix, not a code bug).
h Backward compatible? N/A (test-only config change; no product behavior change).
i Invariants and contracts preserved? N/A (test-only config change).

Session id: cron:clickhouse-worker-slot-0:20260715-162800

@groeneai

Copy link
Copy Markdown
Collaborator Author

cc @scanhex12 - could you review this? It adds skip_access_check to the S3 disks in test_storage_iceberg_disks so a transient MinIO 403 on the disk startup access probe no longer aborts a node and times out the whole cluster fixture (all 18 tests ERRORing). Mirrors test_storage_delta_disks, which already skips the check.

@PedroTadim PedroTadim added the can be tested Allows running workflows for external contributors label Jul 15, 2026
@clickhouse-gh

clickhouse-gh Bot commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [aac9fbc]

Summary: ✅


AI Review

Summary

This PR adds skip_access_check to the S3-backed disks in tests/integration/test_storage_iceberg_disks/test.py, matching the existing delta integration setup. The change removes the startup-only IDisk::checkAccess write/read/unlink probe that can abort node startup before the tests begin, while the suite still exercises real S3-backed reads and INSERT paths afterward, so I do not see a correctness gap in the current diff.

Final Verdict

Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Jul 15, 2026
@groeneai

Copy link
Copy Markdown
Collaborator Author

CI finish ledger — aac9fbc

CI is finished and fully green: Finish Workflow pass, Mergeable Check pass, 0 failed tests (43 pass / 131 skipping; the test-only integration-config change skips most build/test jobs). No failures to own.

Session id: cron:our-pr-ci-monitor:20260715-233000

@alexey-milovidov alexey-milovidov self-assigned this Jul 16, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Jul 16, 2026
@alexey-milovidov

Copy link
Copy Markdown
Member

Interesting, why does Minio behave like that? Looks like some inconsistency.

Merged via the queue into ClickHouse:master with commit 56282c0 Jul 16, 2026
176 checks passed
@robot-clickhouse robot-clickhouse added the pr-synced-to-cloud The PR is synced to the cloud repo label Jul 16, 2026
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
…rg-disks-s3-access-check-timeout

Fix flaky test_storage_iceberg_disks: skip S3 disk startup access check
awitten1 pushed a commit to awitten1/ClickHouse that referenced this pull request Oct 10, 2026
Both servers of the module (`instance` and `instance_local_metadata`, the
second added in 88a9fbd) load `configs/backups.xml` and run the
`IDisk::startup` access check of `backup_disk_s3_plain` (PUT, GET, DELETE of
`clickhouse_access_check_<uuid>`) at the same time, in the same fresh MinIO
prefix `root/data/disks/disk_s3_plain/` that holds nothing but the two
probes.

MinIO's DELETE removes the object directory and then every now-empty parent
(`cmd/xl-storage.go`, `deleteFile`), while the other server's PUT creates the
same parents in `RenameData -> renameAll -> reliableRename ->
reliableMkdirAll` (`cmd/os-reliable.go`). When a parent is removed between
its EEXIST and the child's mkdir, `os.Mkdir` returns an ENOENT PathError,
and `renameAll` classifies it with `isSysErrPathNotFound` (non-Windows branch
is `pathErr.Err == ENOENT`, `cmd/xl-storage-errors.go`) as
`errFileAccessDenied`, i.e. `403 AccessDenied`, even for the root user. The
code is unchanged in the latest pgsty/silo release.

In the failing job (PR ClickHouse#123069, amd_llvm_coverage 6/8) the denied PUT was
sent at 14:11:26.619465 and failed at .624049, 0.47 ms after `instance`'s
DELETE of its own probe completed (.622793-.623583); the server exited and
all 14 tests failed in `start_cluster`. Two clients doing the same
PUT/GET/DELETE against the same MinIO image locally got 7 and 13
AccessDenied PUTs in two 120 s runs with an empty prefix, and 0 of 49876
with one extra object keeping the prefix non-empty.

With `skip_access_check` neither server writes to MinIO at startup; the
disk is still used by every BACKUP/RESTORE in the module. Same remedy as
ClickHouse#110300 and ClickHouse#110592.

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

can be tested Allows running workflows for external contributors 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.

4 participants