-
Notifications
You must be signed in to change notification settings - Fork 93
BOXLITE_EXECUTOR=guest causes transport error #264
Description
Issue
I might be missing something, I'm fixing the bug: #260 (comment). but I can consistently reproduce a crash-like behavior when forcing guest executor mode in MAIN branch.
./target/debug/boxlite exec mybox -- true succeed
./target/debug/boxlite exec -e BOXLITE_EXECUTOR=guest mybox -- true failed.
reproduction
- create a box .
./target/debug/boxlite create --name mybox alpine:latest 2>/dev/null || true
./target/debug/boxlite start mybox 2>/dev/null || true
- pass env BOXLITE_EXECUTOR=guest
./target/debug/boxlite exec -e BOXLITE_EXECUTOR=guest mybox -- true
Logs and output
./target/debug/boxlite exec -e BOXLITE_EXECUTOR=guest mybox -- true
2026-02-14T09:09:21.121738Z INFO boxlite::runtime::rt_impl: Virtualization support verified reason=Hypervisor.framework is available (Apple Silicon)
2026-02-14T09:09:21.176663Z INFO boxlite::runtime::rt_impl: Recovering 41 boxes from database
2026-02-14T09:09:21.177037Z WARN boxlite::runtime::rt_impl: Box process dead, cleaned up stale PID file box_id=01KHDNRMP39PBE1EJVNZRP76TB pid=21664
2026-02-14T09:09:21.179052Z INFO boxlite::runtime::rt_impl: Box recovery complete
2026-02-14T09:09:21.182917Z INFO boxlite::litebox::init::tasks::container_rootfs: Restart mode: reusing existing container rootfs disk disk_path=/Users/goranka/.boxlite/boxes/01KHDNRMP39PBE1EJVNZRP76TB/disk.qcow2
2026-02-14T09:09:21.363924Z INFO boxlite::images::store: Using cached image: docker.io/library/alpine:latest
2026-02-14T09:09:21.364581Z INFO boxlite::litebox::init::tasks::guest_rootfs: Initializing bootstrap guest rootfs debian:bookworm-slim (first time only)
2026-02-14T09:09:21.365091Z INFO boxlite::images::store: Using cached image: docker.io/library/debian:bookworm-slim
2026-02-14T09:09:21.389596Z INFO boxlite::litebox::init::tasks::guest_rootfs: Using cached guest rootfs disk image: /Users/goranka/.boxlite/images/disk-images/sha256-cbdf6298da7f082bf2694d331308958f14612d8d044134d23c9d31a90f8dac93.ext4
2026-02-14T09:09:21.389773Z INFO boxlite::litebox::init::tasks::guest_rootfs: Bootstrap guest rootfs ready: Disk { disk_path: "/Users/goranka/.boxlite/images/disk-images/sha256-cbdf6298da7f082bf2694d331308958f14612d8d044134d23c9d31a90f8dac93.ext4", device_path: None }
2026-02-14T09:09:21.389817Z INFO boxlite::litebox::init::tasks::guest_rootfs: Restart mode: reusing existing guest rootfs disk disk_path=/Users/goranka/.boxlite/boxes/01KHDNRMP39PBE1EJVNZRP76TB/guest-rootfs.qcow2
2026-02-14T09:09:21.390288Z INFO boxlite::litebox::init::tasks::vmm_spawn: Port mappings: 0 (image: 0, user: 0, overridden: 0)
2026-02-14T09:09:21.390899Z WARN boxlite::vmm::controller::shim: Removing stale Unix socket: /Users/goranka/.boxlite/boxes/01KHDNRMP39PBE1EJVNZRP76TB/sockets/box.sock
2026-02-14T09:09:21.391190Z INFO boxlite::vmm::controller::shim: Starting Box subprocess engine=Libkrun transport=Unix { socket_path: "/Users/goranka/.boxlite/boxes/01KHDNRMP39PBE1EJVNZRP76TB/sockets/box.sock" }
2026-02-14T09:09:21.391723Z INFO boxlite::jailer::command: Building sandbox-exec isolated command
2026-02-14T09:09:21.397836Z INFO boxlite::vmm::controller::shim: boxlite-shim subprocess spawned box_id=01KHDNRMP39PBE1EJVNZRP76TB pid=25174 shim_spawn_duration_ms=6
2026-02-14T09:09:21.398242Z INFO boxlite::vmm::controller::shim: VM subprocess started successfully box_id=01KHDNRMP39PBE1EJVNZRP76TB
2026-02-14T09:09:21.697004Z INFO boxlite::litebox::init::tasks::guest_init: Sending guest initialization request
2026-02-14T09:09:21.705901Z INFO boxlite::litebox::init::tasks::guest_init: Guest initialized successfully
2026-02-14T09:09:21.705916Z INFO boxlite::litebox::init::tasks::guest_init: Sending container configuration to guest
2026-02-14T09:09:21.783686Z INFO boxlite::litebox::init::tasks::guest_init: Container initialized container_id=c5b86642a3cfc526447329264abf2a5c1ac70c3fecf26de42496368d7e891962
2026-02-14T09:09:21.784314Z INFO boxlite::litebox::box_impl: Box started successfully (first_start=false) box_id=01KHDNRMP39PBE1EJVNZRP76TB
Error: gRPC/tonic error: status: Unknown, message: "transport error", details: [], metadata: MetadataMap { headers: {} }
/Users/goranka/.boxlite/boxes/01KHDNRMP39PBE1EJVNZRP76TB/console.log
2026-02-14T08:58:49.679542Z INFO boxlite_guest::service::exec: exec request execution_id=27b07282-9098-4967-b9e9-50b25cc4a129 program=true
fatal runtime error: IO Safety violation: owned file descriptor already closed, aborting
shim.stderr is empty
base) goranka@MacBook-Pro 01KHDNRMP39PBE1EJVNZRP76TB % cat shim.stderr
(base) goranka@MacBook-Pro 01KHDNRMP39PBE1EJVNZRP76TB % cat shim.pid
27084