Skip to content

Update libkrun to 1.19.7 - #1018

Merged
bryan-minimal merged 2 commits into
mainfrom
update-libkrun-1.19.7
Oct 26, 2026
Merged

bryan-minimal merged 2 commits into
mainfrom
update-libkrun-1.19.7

Conversation

@gominimal-pkgmgr-mgr

Copy link
Copy Markdown
Contributor

Update libkrun 1.19.6 → 1.19.7

Source: github:libkrun/libkrun:operator-pinned
Release: https://github.com/libkrun/libkrun/releases/tag/v1.19.7
Changelog: libkrun/libkrun@v1.19.6...v1.19.7
Released: 1 days ago (2026-10-22)

Warning

Carried patches will break this build — opened as a draft. Fix the recipe before merging.

  • 0001-vsock-bound-outstanding-packets.patch neither applies nor reverse-applies to 1.19.7 (patch -p1 --dry-run): rebase it onto 1.19.7 or drop it.

Forward dry-run:

checking file src/devices/src/virtio/vsock/tsi_stream.rs
Hunk #1 succeeded at 901 (offset 67 lines).
checking file src/devices/src/virtio/vsock/unix.rs
Hunk #2 succeeded at 46 (offset 1 line).
Hunk #3 succeeded at 128 (offset 2 lines).
Hunk #4 succeeded at 163 (offset 3 lines).
Hunk #5 succeeded at 215 (offset 3 lines).
Hunk #6 succeeded at 272 (offset 3 lines).
Hunk #7 succeeded at 321 (offset 6 lines).
Hunk #8 succeeded at 453 (offset 23 lines).
Hunk #9 FAILED at 528.
Hunk #10 succeeded at 588 (offset 27 lines).
Hunk #11 succeeded at 686 (offset 47 lines).
1 out of 11 hunks FAILED

Reverse dry-run:

checking file src/devices/src/virtio/vsock/tsi_stream.rs
Hunk #1 FAILED at 834.
1 out of 1 hunk FAILED
checking file src/devices/src/virtio/vsock/unix.rs
Hunk #1 FAILED at 9.
Hunk #2 FAILED at 45.
Hunk #3 FAILED at 126.
Hunk #4 FAILED at 160.
Hunk #5 FAILED at 212.
Hunk #6 FAILED at 269.
Hunk #7 FAILED at 315.
Hunk #8 FAILED at 430.
Hunk #9 FAILED at 528.
Hunk #10 FAILED at 562.
Hunk #11 FAILED at 640.
11 out of 11 hunks FAILED

Carried patches vs 1.19.7

Each | Local patch was dry-run against the extracted 1.19.7 tree: forward as build.sh applies it (patch -N), and reverse with exact context (patch -R -F0). Only a patch that reverse-applies WHOLE is treated as upstream; a partial match is a conflict.

  • Conflict 0001-vsock-bound-outstanding-packets.patch — neither direction applies to 1.19.7 (see the warning above).
  • Kept 0002-vsock-refuse-stream-when-unix-proxy-creation-fails.patch — still applies forward to 1.19.7.

Pkgscan: clean — diff against the prior version surfaced no newly-introduced suspicious patterns.

Components changed

CycloneDX component delta (declared materials — the package's own version, not a dependency-tree diff)
Component Old New
~ libkrun 1.19.6 1.19.7
~ libkrun-upstream 1.19.6 1.19.7

Changes

Old New
Version 1.19.6 1.19.7
SHA256 7025d72208172dc0... d4541fcd959ad43f...
Size 1.8 MB
Source https://github.com/libkrun/libkrun/archive/refs/tags/v1.19.6.tar.gz https://github.com/libkrun/libkrun/archive/refs/tags/v1.19.7.tar.gz
  • License: Apache-2.0 (source: GitHub + tarball)

🔒 TLS: github.com — Sectigo Public Server Authentication CA DV E36 → Sectigo Public Server Authentication Root E46 (root c90f26f0fb1b4018…) ⇒ codeload.github.com — Sectigo Public Server Authentication CA DV E36 → Sectigo Public Server Authentication Root E46 (root c90f26f0fb1b4018…)

Quality suggestions

  • Missing tests block. This package has no standalone tests, so the buildbot will only verify compilation — not functional correctness. Consider adding a minimal smoke test (e.g., a --version or small round-trip invocation) as part of this PR so future bumps catch regressions. See packages/python/build.ncl for a simple example.

Created by pkgmgr

@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

…es with -F0

0001's update_peer_credit hunk no longer matched 1.19.7 at zero fuzz:
upstream added an early return after the fwd_cnt update ("virtio/vsock:
preserve TCP half-close semantics"). build.sh's plain `patch -Np1` allows
fuzz 2, so the hunk applied anyway, at a site its context no longer
pinned, and the build stayed green.

The rebased hunk puts drain_forwarded() right after the fwd_cnt update and
BEFORE the new early return, so every credit update retires forwarded
packets (otherwise a connected stream never drains `outstanding` and stalls
once it reaches the skb ceiling). Every other hunk is unchanged apart from
offsets. 0002 already applied cleanly.

build.sh now applies both with -F0, so a stale hunk fails the build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bryan-minimal

Copy link
Copy Markdown
Member

Rebased 0001-vsock-bound-outstanding-packets.patch onto 1.19.7 in 2db0ff8, and build.sh now applies both patches with -F0.

What went wrong. The updater called 0001 a conflict ("neither direction applies") because hunk #9 failed at -F0. build.sh's plain patch -Np1 allows fuzz 2, though, so the build applied that hunk anyway and went green. Hunk #9 is the drain_forwarded() call in UnixProxy::update_peer_credit(). 1.19.7 changed that function (upstream's "preserve TCP half-close semantics" work): right after the peer_fwd_cnt update it now has an early return:

self.peer_fwd_cnt = Wrapping(pkt.fwd_cnt());

if self.status != ProxyStatus::WaitingCreditUpdate || self.peer_avail_credit() == 0 {
    return ProxyUpdate::default();
}

The hunk's trailing context (self.status = ProxyStatus::Connected;) no longer follows the assignment. Two other functions (confirm_connect, process_op_response) end with the same peer_fwd_cnt assignment, so a fuzzed placement isn't pinned to the right one.

Where it goes now. drain_forwarded() sits right after the peer_fwd_cnt update and before the new early return. update_peer_credit() is the only place a running stream learns the guest's fwd_cnt. If the drain ran only on the path that resumes a waiting stream, a stream that is Connected would never retire outstanding. It would hit the skb ceiling and then loop on credit requests without draining. I deliberately did NOT add skb_ceiling_reached() to upstream's early-return condition. The guest only sends a credit update unprompted once its free byte space gets low, and a stream stalled on packet count still has most of its byte window. Re-entering Connected → WaitForCredit → credit request is what keeps it moving, as it did on 1.19.6.

The other 10 hunks are unchanged apart from offsets, including both signal_queue fixes, which land in the same WaitingCreditUpdate branch. 0002 already applied cleanly (git apply --check) and is untouched. The build.ncl comments now say 0001 is the same change as gominimal/minimal's vendored copy rebased onto 1.19.7 (minimal is still on 1.19.6, so the copies are no longer byte-identical), and "1.19.7 does not fix" 0002's bug.

Verification. build-bot run 8d61860f rebuilt libkrun on amd64 and arm64 (full_build=True, new spec hashes) with patch -F0, so GNU patch placed every hunk at zero fuzz. Package checks: 30/30 passed. pkgmgr-rs#1078 makes the updater report this case as "applies only with fuzz 2 (hunk #9 …), so it may be mis-applied" instead of a plain conflict.

Left as a draft for review. Not merged.

@bryan-minimal

Copy link
Copy Markdown
Member

Correction to the comment above: with GNU patch, the original fuzzed apply was actually in the right place.

A Cloud Build sweep (9fa1fe7a, Debian bookworm, GNU patch 2.7.6) applied the old 0001 to the v1.19.7 tarball with build.sh's own patch -Np1 and captured the result:

  • It reported Hunk #9 succeeded at 551 with fuzz 2 (offset 23 lines).
  • The drain_forwarded() call landed in update_peer_credit(), before the new early return. That is exactly where the rebase puts it.
  • So the green 1.19.7 build was functionally correct. The rebased patch produces the same tree.

The wrong-function placement (inside process_op_response) came from macOS's BSD patch 2.0. It weighs fuzz differently, and GNU patch didn't reproduce it.

The change still matters:

  • The patch now applies at zero fuzz.
  • -F0 makes the next upstream drift fail the build instead of depending on which candidate site patch picks.
  • The two other peer_fwd_cnt sites are real candidates for a fuzzed hunk.

@bryan-minimal
bryan-minimal marked this pull request as ready for review October 26, 2026 15:53
@bryan-minimal
bryan-minimal requested a review from a team as a code owner October 26, 2026 15:53
@bryan-minimal
bryan-minimal added this pull request to the merge queue Oct 26, 2026
Merged via the queue into main with commit d6f824b Oct 26, 2026
12 checks passed
@bryan-minimal
bryan-minimal deleted the update-libkrun-1.19.7 branch October 26, 2026 16:47
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.

1 participant