Skip to content

bootc: Handle ENOSYS from emulated syscalls in container lint instead of failing (#1481) #311

Open

Description

@cgwalters-bot

Repo: bootc-dev/bootc

Task: bootc-dev/bootc#1481. bootc container lint on an arm64 image under QEMU user-mode emulation fails with errno 38 (ENOSYS, set_robust_list) from some checks. Find the lints that fail (see the issue's trace), and make them degrade gracefully: skip the affected check with a clear warning when the error is ENOSYS rather than aborting the run. Check whether the failing call is in bootc or inside cap-std (sunfishcode/cap-std#423); if the only fix is upstream in cap-std, say so in your report and do not hack around it.

Acceptance: a unit test for the ENOSYS-to-skip classification; cargo fmt --check, cargo clippy --all-targets, cargo test pass.

Constraints: code and tests only, no GitHub writes (the coordinator opens the PR); keep the change small and match the surrounding style; commit message in the project's style with a Generated-by: AI trailer, no Signed-off-by.

Generated-by: https://github.com/cgwalters/#llms

Activity

  1. added
    dispatchOpt in to the dispatcher's auto-dispatch of a devspace run
    and removed
    dispatchOpt in to the dispatcher's auto-dispatch of a devspace run
    on Oct 3, 2026
  2. locked as resolved and limited conversation to collaborators on Oct 18, 2026
  3. cgwalters-bot commented on Oct 22, 2026

    @cgwalters-bot
    CollaboratorAuthor

    ✅ dispatch ended well. Result: #311 (comment)

  4. cgwalters-bot commented on Oct 22, 2026

    @cgwalters-bot
    CollaboratorAuthor

    Triage (21 Oct 2026): valid and reproducible, but the brief points at the wrong syscall and the wrong repository. Needs the operator to pick a direction.

    What actually fails. The ENOSYS is from openat2, not set_robust_list. amnabbouti traced it in bootc#1481 (25 Aug 2026): QEMU linux-user 8.2.9 reports unsupported aarch64 syscall 437 (openat2) right before the error, and the same image passes under QEMU 10.2.2. QEMU gained openat2 in linux-user with commit 9651cead (Oct 2024), shipped in 9.2, motivated by the same symptom in bootc-image-builder#619. The original reporter's "fix" was a QEMU built from git master, which already had openat2; the set_robust_list stub was incidental (glibc ignores that call's result).

    Where the call lives. Not in bootc. Both failing lints reach cap-std-ext's direct openat2(RESOLVE_NO_XDEV | RESOLVE_BENEATH) in impl_open_dir_noxdev, which maps EXDEV to Ok(None) but passes ENOSYS through:

    cap-std-ext already tolerates ENOSYS from statx in is_mountpoint (returns Ok(None)), so there is precedent, but open_dir_noxdev has no fallback. cap-std#423 asks cap-primitives for a RESOLVE_NO_XDEV-aware manual resolver; sunfishcode said cap-std has never offered that, and cap-std#426 is about archiving cap-std, so nothing will come from there. bootc pins cap-std-ext 5.1.2 and cap-primitives 4.0.2; no ENOSYS handling exists in bootc's tree today.

    Why this is the operator's call. The brief ("skip the check with a clear warning on ENOSYS") conflicts with cgwalters's own upstream reply (5 Aug 2025), which prefers a stat-plus-dev/inode fallback over not running the lints, and the fallback belongs in coreos/cap-std-ext, which is not in this tracker's dispatch bounds (.github/agentic-job/dispatch.toml lists only the cgwalters-forge/bootc fork). The epic this sits under (#333) is parked. The options:

    1. Close as not planned, with a docs note. QEMU 9.2 and later implement openat2, so the environment fix exists; a line in the lint docs saying "under QEMU user-mode emulation older than 9.2, use --skip var-tmpfiles --skip utf8 or upgrade QEMU" covers the remaining users (Ubuntu 24.04 still ships 8.2). This is the cheapest option and matches cgwalters's "happy to take a patch for that" on documentation.
    2. Fix in cap-std-ext, then bump bootc. In impl_open_dir_noxdev and open_beneath_rdonly, on Errno::NOSYS fall back to a component-by-component openat(O_DIRECTORY | O_NOFOLLOW) with a statx MOUNT_ROOT check (or st_dev comparison) per component, returning Ok(None) on a crossing. That is one cap-std-ext PR plus a bootc dependency bump, and needs coreos/cap-std-ext added to the dispatch bounds or a run by hand.
    3. Do the brief as written in bootc. Catch ErrorKind::Unsupported or Errno::NOSYS in the lint runner and report the lint as skipped with a warning. Smallest change, but it silently weakens utf8 and var-tmpfiles on old emulators, which cgwalters argued against upstream.

    Recommendation: option 1, with option 2 if a code fix is wanted. I will not plan anything until one is chosen.

    Generated by dispatch · ◷

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions