Skip to content

QEMU host-lock EXIT chaining overwrites caller failure status #978

Description

@ryanbreen

At a3786fe, the live ARM64 production gate printed FAIL: INPUT_INJECT production rejection: [] but exited 0 and emitted ended_by=scored_pass. Score-only replay of the same serial exited 1. The marker was missing from the copied userspace input; that explains the scorer rejection, but does not justify returning success.

docker/qemu/lib/qemu-host-lock.sh:221 chains _qhl_kill_tracked_pids before the caller's existing EXIT trap. That helper changes $?, so the production gate's cleanup $? receives 0.

Minimal reproduction without launching QEMU:

bash -c 'source docker/qemu/lib/qemu-host-lock.sh; cleanup() { printf "cleanup received status=%s\n" "$1"; exit "$1"; }; trap '\''cleanup $?'\'' EXIT; _qhl_chain_exit_trap; exit 1'

Observed: cleanup received status=0, shell exit 0. Expected: preserve exit 1 through cleanup, final verdict, and import metadata.

Receipts for the PR 956 continuation are in docs/planning/green-program/network/serials/586-pr3/merged-tip/prod.txt, docs/planning/green-program/network/serials/586-pr3/merged-tip/prod-score-only.txt, and docs/planning/green-program/network/serials/586-pr3/merged-tip/exit-trap-reproduction.txt. The round document retains the failed live run rather than treating its exit code as a passing gate.

Follow-up: preserve the original status across chained EXIT cleanup and add a real production-tail status ratchet covering a scorer failure after QEMU launch. No kernel change is indicated by this reproduction.

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions