Skip to content

a failed pacman RUN in the base stage leaves no error in charly's build log, hiding the root cause behind every ComfyUI build #1255

Done

Description

@aitrawog

What

charly box build of the ComfyUI box fails while building the base image podcdi.arch.arch-builder, in a pacman step — and charly's captured build log stops at the RUN line without the error body, so the failure cannot be root-caused from the artifact:

#13 [stage-4  6/12] RUN --mount=type=cache,id=charly-var-cache-pacman-pkg,dst=/var/cache/pacman/pkg,sharing=locked \
      pacman-key --init && (pacman-key --populate 2>/dev/null || true) && pacman -Syu --noconfirm --needed nodejs npm
BUILD_EXIT=1

(.check/check-cachyos-comfyui-pod/2026.327.1515/image-build.log and /tmp/build-pinned.log show the same truncation; buildkit's per-step error text is not in the file.)

Why it matters

It blocks every ComfyUI bed and the build gate of the plugin-ref bump in #1254, which needs a build that reaches the candy stage to prove the emitted pixi stage.

Two findings

  1. Diagnosability (charly): a failed RUN in a base stage must surface buildkit's error text in the log the run keeps; today the artifact ends at the RUN line, which forces guesswork and is exactly the "environmental" framing the rulebook forbids by mistake.
  2. The failure itself: unknown until (1) is fixed — it may be a mirror/keyring problem in podcdi.arch.arch-builder, the pacman cache mount, or the base image's keyring state. The fix is to capture the error, then root-cause it; filing it now with the evidence and the missing-control named is the honest disposition available.

Agent: image-lane-vram · Claude Code session 739c9baf-e4cc-465c-9028-0a77b9ea7617
Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)

Activity

  1. aitrawog commented on Nov 23, 2026

    @aitrawog
    ContributorAuthor

    STATUS — RCA progress: the error is in NEITHER artifact, and one hypothesis is eliminated.

    • buildkitdrive/buildctl.go already passes --progress plain explicitly (with the documented CI rationale), so the missing step output is not the buildctl-progress-mode defect that .github#271 fixed.
    • The buildkitd daemon writes its own log (~/.cache/charly/buildkitd/buildkitd.log, cmd.Stdout/Stderr = logFile in buildkitdrive/daemon.go). Around the failing builds it contains only the repeated detected 127.0.0.53 nameserver … line (the daemon restarts per run) — no pacman, no step error, no Solve failure.

    So the failing pacman step left no error text anywhere charly keeps: neither the step log (ends at the RUN line) nor the daemon log. Two candidate mechanisms remain, and they are distinguishable:

    1. The build was terminated, not failed — an abrupt kill produces exactly this signature (step line, no error, daemon just restarts). Charly has activity/idle bounds around buildkit (plugin_activity_bounds_test.go names the context canceled / signal: killed signature), and the pacman step starts with pacman-key --init && pacman-key --populate — a quiet phase before any output, which is what an idle bound reacts to.
    2. The error went to a stream neither artifact keeps — but --progress plain on stderr is captured, so this is the weaker hypothesis.

    Next experiment: run the build with the daemon log tailed live and buildctl's own stdout/stderr captured verbatim, so a termination (no error) is distinguished from a failure (error present). That is the measurement this issue needs before any fix is proposed.

    Agent: image-lane-vram · Claude Code session 739c9baf-e4cc-465c-9028-0a77b9ea7617
    Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)

  2. aitrawog commented on Nov 23, 2026

    @aitrawog
    ContributorAuthor

    STATUS — RCA narrowed further; the network hypothesis is now measured and rejected.

    $ curl -sI https://geo.mirror.pkgbuild.com/core/os/x86_64/ | head -1   → HTTP/2 200
    $ curl -s -o /dev/null -w '%{http_code}' https://quay.io/v2/            → 401 (normal auth challenge)
    $ curl -s -o /dev/null -w '%{http_code}' https://archlinux.org/mirrorlist/ → 200
    

    The mirrors the arch base's pacman would use are reachable from this host, so "mirror/network outage" is not supported by measurement. Combined with the previous step — --progress plain is already explicit, and the buildkitd daemon log carries no build error either — the failure remains unobserved, not explained. Until a failed RUN surfaces its error, any root-cause claim about the pacman step would be a guess, which is exactly what this issue exists to prevent.

    The fix this issue owns is therefore unchanged and is a real product fix: make a failed build step put buildkit's error into the log the run keeps (step output and daemon log both), so the pacman failure that blocks opencharly/pod-cdi#14, #1254, opencharly/opencharly#1254 and the two pod-comfyui beds can be diagnosed from the artifact.

    Agent: image-lane-vram · Claude Code session 739c9baf-e4cc-465c-9028-0a77b9ea7617
    Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)

  3. added
    category:delivery
    type:fix
    on Nov 23, 2026
  4. aitrawog commented on Nov 24, 2026

    @aitrawog
    ContributorAuthor

    RESOLVED

    RESOLVED — the fix this issue named is adopted and released.

    Verified by the behaviour the fix is FOR, on a deliberately failing build with two binaries:

    from origin/main (pre-fix)  : 45 log lines, 2 occurrences of the failing step's block
    from the fix branch         : 88 log lines, 4 occurrences — the second copy is the appended tail
    

    The remaining half of the class — a build whose buildctl child is SIGKILLed reporting only
    signal: killed with no attribution — is #1262, filed and claimed separately.

    Closing this issue: its own scope is done.

    Agent: image-lane-vram · Claude Code session 739c9baf-e4cc-465c-9028-0a77b9ea7617
    Assisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    category:deliverytype:fix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions