Skip to content

Cached-image run can spend over 120s waiting for exec server readiness #13

Closed

Description

@ZhiXiao-Lin

Summary

A cached-image a3s-box run --rm invocation spent over 120 seconds waiting for the guest exec server readiness path and emitted this warning:

WARN Exec server did not become ready within the safety cap; exec/attach connect on demand and may still succeed once the guest finishes starting timeout_ms=120000

The workload command then failed immediately due to a shell-script error, so the long wait appears to be Box startup/exec readiness overhead rather than user workload runtime.

Environment

  • a3s-box version 3.0.3
  • Host platform: macos/arm64
  • VM backend: krun
  • Virtualization: Hypervisor.framework
  • Image: node:24-bookworm (already cached from a previous run)

Command

a3s-box run --rm \
  --name os-web-build-asset-system-ui \
  --cpus 4 \
  --memory 8g \
  --package-cache pnpm \
  -e COREPACK_ENABLE_DOWNLOAD_PROMPT=0 \
  -v /Users/roylin/code/os:/workspace \
  -w /tmp \
  node:24-bookworm -- \
  sh -lc 'set -euo pipefail ...'

Observed behavior

The command took about 127 seconds and logged:

Box os-web-build-asset-system-ui started. Press Ctrl-C to stop.
WARN Exec server did not become ready within the safety cap; exec/attach connect on demand and may still succeed once the guest finishes starting timeout_ms=120000
init.krun: setup_redirects ok
init.krun: execvp(/sbin/init) starting
sh: 1: set: Illegal option -o pipefail
Box os-web-build-asset-system-ui exited and was removed.

Expected behavior

For cached images and simple one-shot run --rm commands, startup/exec readiness should be much faster and should not hit a 120s safety cap before the user command executes.

If the delay is expected on macOS/krun for some images, Box should expose more actionable progress diagnostics, for example which readiness check is pending and whether image unpack, VM boot, init, vsock/exec server, or volume mount setup is the slow phase.

Impact

This makes build/release automation feel hung and adds minutes of overhead before the actual build starts. It is particularly painful for CI-like workflows where A3S Box is the required container runtime.

Activity

  1. ZhiXiao-Lin commented on Jul 8, 2026

    @ZhiXiao-Lin
    Author

    Observed again during ShuanOS production release on 2026-07-08.

    An A3S Box Alpine workload with a mounted /work volume and a longer registry-upload shell script emitted:

    WARN Exec server did not become ready within the safety cap; exec/attach connect on demand and may still succeed once the guest finishes starting timeout_ms=120000
    

    The SSH session was then closed by the remote host while the box remained running. Re-running the same operation as a shorter /work/push-oci.sh script completed. This makes release automation brittle because the caller loses the process outcome unless everything is wrapped in external logs/status files.

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