Skip to content

package: 1bit bakes the build machine's HSA runtime path — c33's roll failed its own gate on it, and the row that caught it is too narrow #1459

Description

@bong-water-water-bong

The c33 payload roll (2026-11-08, tag rc-2026-11-08-c33) failed its own package gate, and the gate was right:

FAIL the packed 1bit names a build-machine home (1 strings)
[08:26:13] FAILED at line 667: return 1

The one string, read out of the packed 1bit in 1bit-rc-2026-11-08-c33-linux-x86_64.tar.zst:

/home/bcloud/wt/c33-payload/hrx-toolchain/lib/python3.14/site-packages/_rocm_sdk_core/lib/libhsa-runtime64.so.1

What makes it

cmake/hrx.cmake globs the runtime out of the build's toolchain —

file(GLOB_RECURSE _drop_libhsa "${ONEBIT_HRX_TOOLCHAIN}/*/libhsa-runtime64.so.1")
set(ONEBIT_HRX_LIBHSA "${_drop_libhsa_first}" CACHE FILEPATH ... FORCE)

— and CMakeLists.txt:426 compiled that absolute path into the onebit target as ONEBIT_HRX_LIBHSA. So it is a build-machine path by construction: whatever directory the roll happened to use.

Three consequences, one of them measured between two cycles

  1. The bytes depend on where the build ran. c32's shipped 1bit (6,064,984 B) baked
    /opt/rocm-therock/lib/python3.14/site-packages/_rocm_sdk_core/lib/libhsa-runtime64.so.1 and carries 0 /home/ strings;
    c33's (6,093,656 B) baked its own $HOME workdir and carries 1. Same source, different bytes, different strings — a
    reproducibility defect in the tarball, separate from the image-sha irreproducibility we already quote SFS shas for.
  2. It writes the builder's tree into a public artifact — the username and workdir of whoever rolled it.
  3. It cannot help at run time. app/serve.cpp:212-224 uses the baked value only if (fs::exists(...)), and the target does not have
    that path: the appliance installs the runtime flat at /opt/rocm-therock/lib (os/v3/puppy/build.sh, asserted by vm-check.sh U3)
    and the distro packages at /opt/1bit/engine/hrx/llama/bin (mk-plugin-package.sh:88). So serve falls through to its
    /opt/rocm-therock scan either way — docs/hrx.md already says as much: "on the appliance the baked path is a release-build
    directory that does not exist, so the scan is the only route left"
    .

The cache value must stay

os/mini/mkimage.sh:1020 reads ONEBIT_HRX_LIBHSA:FILEPATH= out of the CMake cache to decide which runtime to ship. So the fix is
not to stop finding it; it is to stop compiling it in. The cache stays build metadata, the macro goes, and
-DONEBIT_HRX_LIBHSA_BAKE=<path> is the explicit opt-in for a builder whose layout is the target's.

And the gate row is too narrow

The row reds on /home/ only, which is why c32 shipped a builder path under /opt and passed. It was right about the leak and wrong
about where the leak lives. It should red on this machine's tree — $SRC, $W — not on one prefix that happens to be common. (It must
not simply red on /opt/rocm-therock/…: that is also the appliance's own deployed path, so a build that bakes it is legitimate.)

Fix: #1454.

Activity

  1. added a commit that references this issue on Nov 8, 2026
    ec85d35
  2. bong-water-water-bong commented on Nov 8, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    Claiming this — unowned (0 comments, no board entry), and device-free.

    One correction before anyone plans around it: the issue ends with Fix: #1454, but #1454 is an unrelated PR —
    docs/npu-p4: record what A2 has actually landed… (two reviews, open). So there is no fix in flight for this, and the number in the
    report is a dead pointer. I will not touch #1454.

    Scope, straight from the report's own split:

    1. stop compiling the path in, keep finding it — the cache value must stay (os/mini/mkimage.sh:1020 reads
      ONEBIT_HRX_LIBHSA:FILEPATH= out of the cache to decide what to ship), so the macro goes and
      -DONEBIT_HRX_LIBHSA_BAKE=<path> becomes the explicit opt-in for a builder whose layout is the target's;
    2. widen the gate row — reding on /home/ only is why c32 shipped a builder path under /opt and passed; it should red on this
      machine's tree ($SRC, $W), and must not red merely on /opt/rocm-therock/..., which is also the appliance's deployed path.

    Acceptance I will hold myself to: a build with no ONEBIT_HRX_LIBHSA_BAKE carries 0 build-machine strings where c33 carries 1,
    the cache still carries the FILEPATH for mkimage, and the gate reds on a synthetic /home/... and $SRC string but stays green on a
    baked /opt/rocm-therock/.... If the second half of that (the gate) needs a decision about which prefixes count as "this machine", I
    will name the choice rather than quietly pick one.

  3. added 2 commits that reference this issue on Nov 8, 2026
    8bd18cf
    343185e
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions