Skip to content

tests: Cap oci-delta's bsdiff size in the switch-from-delta test - #2635

Merged
cgwalters merged 1 commit into
bootc-dev:mainfrom
jmarrero-forge:bot/delta-test-memory
Nov 13, 2026
Merged

cgwalters merged 1 commit into
bootc-dev:mainfrom
jmarrero-forge:bot/delta-test-memory

Conversation

@jmarrero-bot

Copy link
Copy Markdown
Contributor

plan-51-switch-from-delta can fail on composefs UKI with oci-delta create "terminated by SIGKILL" (seen on #2623). The guest kernel OOM-kills oci-delta in the 4G test VM, which has no swap: the rebuilt UKI (~122 MiB) is under oci-delta's default 192 MiB bsdiff limit, and tar-diff's bsdiff needs ~16 bytes per byte of the old file. Capping bsdiff at 64 MiB in the test makes oci-delta use rollsums for the UKI, with a delta of about the same size.

Testing, on a 16-core RHEL 10 devspace, image built like CI's fedora-44 composefs xfs systemd uki unsealed job, plan in bcvk's default 4G/2 vCPU VM:

  • In the test VM, oci-delta peaks at 2.3-2.4 GiB of anonymous memory (CI's killed process was at 3.5 GiB); with --max-bsdiff-size 64 at 100-140 MiB, in ~72 s instead of ~170 s, and the delta is 3.35 MB instead of 3.42 MB. --jobs 1 doesn't lower the peak.
  • The failure is rare on main (10/10 plan runs passed, in CI this is the only oci-delta SIGKILL in this job since 2026-10-14) because how far the Go heap overshoots depends on GC timing. With GOGC=200 in the test environment, main failed 2/2 exactly like CI and this branch passed 2/2. Even with GOGC=off oci-delta stays at 1.07 GiB with the cap.
  • This branch: plan-51-switch-from-delta passed 4/4 at 1a2fa13, which differs from the current head only in comment wording (plus 8/8 at an earlier revision, also differing only in a comment).

Measurements and run details: https://gist.github.com/jmarrero-bot/cef85960bc80160278b2440ebb86d112

Related: #2623

The Signed-off-by: Joseph Marrero Corchado <jmarrero@redhat.com> on these commits was added on jmarrero's approval of the review draft: jmarrero-forge#13 (comment)

Generated-by: https://github.com/jmarrero-bot#llms

@alexlarsson

Copy link
Copy Markdown
Contributor

This looks good to me (although the comment is perhaps overly verbose). Seems to fail in some unrelated CI thing though.

@jmarrero-bot jmarrero-bot moved this to In Review in Workstream Nov 9, 2026
On composefs UKI, plan-51-switch-from-delta can fail with oci-delta
create "terminated by SIGKILL": bsdiff on the rebuilt ~120 MiB UKI
(under the default 192 MiB cap) takes oci-delta to 2.3 GiB or more,
and the kernel OOM-kills it in the 4G test VM.

Capping bsdiff at 64 MiB sends the UKI through rollsums instead. Peak
memory drops to about 130 MiB and the delta stays about the same size,
so the test still applies a real binary delta.

Generated-by: AI
Signed-off-by: Joseph Marrero Corchado <jmarrero@redhat.com>
@jmarrero-bot
jmarrero-bot force-pushed the bot/delta-test-memory branch from 555d9c2 to 631c9fa Compare November 9, 2026 19:55
@jmarrero-bot

Copy link
Copy Markdown
Contributor Author

Shortened the comment and the commit message (631c9fa). The earlier CI failure was plan-34-user-agent's VM never coming up for SSH, unrelated; plan-51-switch-from-delta passed in that run.

@cgwalters
cgwalters merged commit 0c5dd06 into bootc-dev:main Nov 13, 2026
54 checks passed
@jmarrero-bot jmarrero-bot moved this from In Review to Done in Workstream Nov 13, 2026
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.

3 participants