You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ostree-ext: Failed assertion in Chunking::process_mapping #1885
When rechunking certain images using rpm-ostree compose build-chunked-oci, an assertion in ostree_ext::chunking::Chunking::process_mapping fails, causing a panic. Here are two image builds where this happens:
This only happens with certain images, not with all images, and I'm unsure what exactly triggers it. However, it seems to have something to do with basing the layer plan on a previous build manifest, as this bug was not occurring with the same images when the previous build manifest was not being taken into account. (If someone could figure out a more minimal reproduction of this bug, that would be great.)
Another data point, with two distinct assertions from the same image.
rpm-ostree compose build-chunked-oci --bootc --max-layers 127 --format-version 2 with --previous-build, rpm-ostree 2026.2 (Fedora 44, ostree-ext 0.15.3), Fedora-based bootc image of about 19.5 GB rootfs (Bluefin DX derivative, ~2360 packages):
prior build = the previous chunked image from the registry: assertion left == right failed, 2290 != 2501 (the after_processing_pkgs_len == before_processing_pkgs_len check in basic_packing_with_prior_build)
prior build = the output of the very same run (re-chunking its own result): assertion left == right failed, 1734 != 0 (assert_eq!(self.remainder.content.len(), 0) in Chunking::process_mapping)
Both reproduce locally on the rootfs, not only in CI. Without --previous-build the same image chunks fine every time; the cost is that consecutive weekly builds share only 69 of 128 layers (about 2.8 GB of 6.2 GB), which is what users see as a near-full re-download on every update. Happy to run a patched build against this image if a fix needs a reproducer.
@daniel-g-carrasco At this point I'd recommend using Chunkah instead of build-chunked-oci for rechunking; Chunkah is actively maintained, runs much faster, and generally seems to give at least as good results (in terms of update sizes) as build-chunked-oci with --previous-build.
Thanks, that is useful to know. We stayed on build-chunked-oci because it is what the image ships and what Bazzite uses; I will run chunkah on the same image and compare the delta between two consecutive builds against the 69/128 layers we get today, and report the numbers here.
Measured, as promised. Same image, same base, two builds about 21 hours apart (a few commits of ours plus one day of Fedora/COPR churn), chunked both ways:
chunker
layers shared between the two builds
bytes shared
image size
rpm-ostree build-chunked-oci (no --previous-build, because of this issue)
84 of 128
4071 MiB of 6234 (65%)
6234 MiB
chunkah v0.6.0 (--max-layers 127, rpmdb components, no update-interval hints)
106 of 127
4764 MiB of 6377 (74%)
6377 MiB
So for a daily update chunkah downloads about 1.6 GB against 2.2 GB, with an image 143 MiB larger, out of the box and without per-package interval hints. The chunking step itself took 3 min 14 s against 10 min 0 s on the same GitHub runner. Thanks for the pointer; it is a real option for us while --previous-build is blocked here.
@HastD I was able to create a minimal reproduction. For the reduced reproductions, build the following container and create the two annotated baselines.
Then run the two distinct assertion tests. chunking.rs:704 uses the multilib source with V0 as prior. chunking.rs:423 uses the already chunked V1 image as both source and prior. This demonstrates that even an image with no changes is capable of hitting the chunking.rs:423 bug.
Activity
askpng commentedon Jan 5, 2026
Similar issue observed here as well.
daniel-g-carrasco commentedon Aug 29, 2026
Another data point, with two distinct assertions from the same image.
rpm-ostree compose build-chunked-oci --bootc --max-layers 127 --format-version 2with--previous-build, rpm-ostree 2026.2 (Fedora 44, ostree-ext 0.15.3), Fedora-based bootc image of about 19.5 GB rootfs (Bluefin DX derivative, ~2360 packages):assertion left == right failed, 2290 != 2501(theafter_processing_pkgs_len == before_processing_pkgs_lencheck inbasic_packing_with_prior_build)assertion left == right failed, 1734 != 0(assert_eq!(self.remainder.content.len(), 0)inChunking::process_mapping)Both reproduce locally on the rootfs, not only in CI. Without
--previous-buildthe same image chunks fine every time; the cost is that consecutive weekly builds share only 69 of 128 layers (about 2.8 GB of 6.2 GB), which is what users see as a near-full re-download on every update. Happy to run a patched build against this image if a fix needs a reproducer.HastD commentedon Aug 29, 2026
@daniel-g-carrasco At this point I'd recommend using Chunkah instead of build-chunked-oci for rechunking; Chunkah is actively maintained, runs much faster, and generally seems to give at least as good results (in terms of update sizes) as build-chunked-oci with
--previous-build.daniel-g-carrasco commentedon Aug 29, 2026
Thanks, that is useful to know. We stayed on build-chunked-oci because it is what the image ships and what Bazzite uses; I will run chunkah on the same image and compare the delta between two consecutive builds against the 69/128 layers we get today, and report the numbers here.
ci(build): chunker=chunkah dispatch input for measuring update deltas…
HastD commentedon Aug 29, 2026
Bazzite is in the process of switching to Chunkah, too: ublue-os/bazzite@d9a7169
daniel-g-carrasco commentedon Aug 31, 2026
Measured, as promised. Same image, same base, two builds about 21 hours apart (a few commits of ours plus one day of Fedora/COPR churn), chunked both ways:
build-chunked-oci(no--previous-build, because of this issue)--max-layers 127, rpmdb components, noupdate-intervalhints)So for a daily update chunkah downloads about 1.6 GB against 2.2 GB, with an image 143 MiB larger, out of the box and without per-package interval hints. The chunking step itself took 3 min 14 s against 10 min 0 s on the same GitHub runner. Thanks for the pointer; it is a real option for us while
--previous-buildis blocked here.ci: chunkah is the default chunker, rpm-ostree one dispatch away (#398)
fix(ci): rechunk without the previous image as baseline
ci: rechunk with chunkah (#92)
chunking: Repack ambiguous prior package names
chunking: Repack ambiguous prior package names
TheMDev commentedon Oct 20, 2026
@HastD I was able to create a minimal reproduction. For the reduced reproductions, build the following container and create the two annotated baselines.
V0: annotated Fedora baseline, with no prior.
V1: annotated Fedora multilib baseline, with no prior.
Then run the two distinct assertion tests.
chunking.rs:704uses the multilib source with V0 as prior.chunking.rs:423uses the already chunked V1 image as both source and prior. This demonstrates that even an image with no changes is capable of hitting thechunking.rs:423bug.chunking.rs:704: expected assertion 531 != 534.chunking.rs:423: expected assertion 558 != 0.After a brief look it appears in
basic_packing_with_prior_build, theBTreeSetof names collapses multiplicities, causingchunking.rs:704.name_to_componentkeeps only the first component for each name, so duplicate annotation entries select it twice and leave other objects for thechunking.rs:423check.chunking: Repack ambiguous prior package names
cargo: update ostree-ext to 6d7893f2
cargo: update ostree-ext to 6d7893f2
cargo: update ostree-ext to 6d7893f2