Skip to content

Fix pre-existing CI breakage: UB free, deprecated API, unpullable docker images - #117

Merged
gbrgr merged 3 commits into
mainfrom
gb/fix-arrow-batch-inner-ub-free
Oct 15, 2026
Merged

gbrgr merged 3 commits into
mainfrom
gb/fix-arrow-batch-inner-ub-free

Conversation

@gbrgr

@gbrgr gbrgr commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Three unrelated CI/correctness fixes, split out of #116 so that PR stays focused on assert_requirements:

  • UB fix: nested_pipeline.rs's oversized_batch_does_not_deadlock_byte_sem test freed batch.batch.rust_ptr by casting it to *mut Vec<u8>, but record_batch_to_c_ffi allocates it as Box<ArrowBatchInner> (two Arrow FFI structs) -- see iceberg_arrow_batch_free in table.rs, which does the correct cast. Dropping it as the wrong type is undefined behavior. This was latent: CI's floating stable toolchain moved from rustc 1.98.1 (last known-good run, 2026-09-16) to 1.99.0 (2026-09-28), which added a stricter allocator precondition check that now catches it as a SIGABRT ("NonNull::new_unchecked requires that the pointer is non-null"). Not triggered by any functional change -- any PR running CI today would hit it.
  • Deprecated API: pipeline_stats.rs used AtomicU64::fetch_update, deprecated in favor of try_update; under -D warnings this now fails the build.
  • Unpullable docker images: quay.io/minio/minio/quay.io/minio/mc are no longer pullable (MinIO discontinued prebuilt community images), failing setup_bucket with "unauthorized" on every PR's test-julia-* jobs. Builds them locally instead, from MinIO's last published binary release (mirrors the same fix already applied in raicode's own iceberg docker-compose stack).

Test plan

  • cargo test in iceberg_rust_ffi -- 40 passed, 0 failed, including oversized_batch_does_not_deadlock_byte_sem
  • docker compose up -d minio setup_bucket polaris init table-creation brings up the full stack locally; table-creation completes successfully

🤖 Generated with Claude Code

gbrgr and others added 3 commits October 14, 2026 14:49
oversized_batch_does_not_deadlock_byte_sem freed batch.batch.rust_ptr
by casting it to *mut Vec<u8>, but record_batch_to_c_ffi allocates it
as Box<ArrowBatchInner> (two Arrow FFI structs) -- see
iceberg_arrow_batch_free, which does the correct cast a few hundred
lines away in table.rs. Dropping it as the wrong type is undefined
behavior: it deallocates with a layout that doesn't match the real
allocation.

This was latent -- rustc 1.98.1 (CI's last known-good run) didn't
catch it, but rustc 1.99.0 (CI's floating `stable` toolchain today)
added a stricter allocator precondition check that now aborts on it
with "NonNull::new_unchecked requires that the pointer is non-null".
Not triggered by any functional change; any PR running CI today would
hit it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
check-version-bump requires a version bump whenever iceberg_rust_ffi's
own source changes. Also replaces fetch_update with try_update in
pipeline_stats.rs (unrelated to this PR's own changes, but the CI
toolchain now deprecates it under -D warnings, breaking clippy/build
for every PR against this repo).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
quay.io/minio/minio and quay.io/minio/mc (like their Docker Hub
equivalents) are no longer pullable -- MinIO discontinued prebuilt
community images -- which was failing setup_bucket with "unauthorized:
access to the requested resource is not authorized" on every PR's
test-julia jobs, unrelated to anything in this PR's own diff.

Mirrors the same fix already applied in raicode's docker/iceberg
compose stack: build minio and mc locally from MinIO's last published
binary release (fetched from GitHub Releases, checksum-verified)
instead of pulling a registry image.

Verified locally: `docker compose up -d minio setup_bucket polaris
init table-creation` brings up the full stack and table-creation
completes successfully.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@gbrgr
gbrgr merged commit e15d59d into main Oct 15, 2026
6 checks passed
@gbrgr
gbrgr deleted the gb/fix-arrow-batch-inner-ub-free branch October 15, 2026 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants