Skip to content

refactor(vmm): improve crash diagnostics and kernel cmdline handling#227

Merged
DorianZheng merged 1 commit intomainfrom
refactor/crash-report-extraction
Feb 11, 2026
Merged

refactor(vmm): improve crash diagnostics and kernel cmdline handling#227
DorianZheng merged 1 commit intomainfrom
refactor/crash-report-extraction

Conversation

@DorianZheng
Copy link
Copy Markdown
Member

@DorianZheng DorianZheng commented Feb 11, 2026

Summary

  • Fix Box fails to start when passing my host env vars:Timeout waiting for guest ready (30s) #222
  • Add ExitInfo enum for JSON crash data transfer between shim and library
  • Add CrashReport struct for user-friendly error message formatting
  • Add GuestEntrypointBuilder for managing env vars within kernel cmdline limits
  • Refactor shim.rs to shim/main.rs + crash_capture.rs directory structure
  • Fix LIBKRUN_CMDLINE_FIXED_OVERHEAD constant (300 bytes)
  • Preserve diagnostic files on crash (don't cleanup box directory)
  • Improve build script with deterministic OUT_DIR detection

Architecture

Crash Diagnostics:

  • ExitInfo (vmm layer): Pure data structure for JSON serialization - shim writes, library reads
  • CrashReport (litebox layer): Presentation/formatting for user-friendly error messages

Kernel Cmdline:

  • GuestEntrypointBuilder: Manages env vars with FILO semantics within arch-specific limits (2KB ARM64, 64KB x86_64)

Files Changed

New Files Purpose
vmm/exit_info.rs ExitInfo enum for JSON crash data
litebox/crash_report.rs CrashReport for user-friendly errors
bin/shim/crash_capture.rs Panic/signal handlers
init/tasks/guest_entrypoint.rs GuestEntrypointBuilder

Test plan

  • cargo test -p boxlite --lib -- vmm::exit_info (5 tests)
  • cargo test -p boxlite --lib -- litebox::crash_report (4 tests)
  • cargo clippy -p boxlite --lib (no warnings)
  • cargo fmt --check (clean)

@DorianZheng DorianZheng force-pushed the refactor/crash-report-extraction branch from 5914b5f to 781453f Compare February 11, 2026 07:52
@DorianZheng DorianZheng changed the title refactor(vmm): extract ExitInfo and CrashReport for crash diagnostics refactor(vmm): improve crash diagnostics and kernel cmdline handling Feb 11, 2026
- Add ExitInfo enum (vmm/exit_info.rs) for JSON crash data transfer
  between shim and library (signal/panic variants with serde)
- Add CrashReport struct (litebox/crash_report.rs) for user-friendly
  error message formatting with context-aware troubleshooting hints
- Refactor shim.rs to shim/main.rs + crash_capture.rs directory structure
- Extract CrashCapture to handle panic hooks and signal handlers
- Fix LIBKRUN_CMDLINE_FIXED_OVERHEAD constant (300 bytes)
- Move is_printable_ascii to util module
- Update guest_connect to use CrashReport for crash detection

Improves crash diagnostics by separating data (ExitInfo) from
presentation (CrashReport), enabling better error messages when
VM startup fails.
@DorianZheng DorianZheng force-pushed the refactor/crash-report-extraction branch from 781453f to 83adaa3 Compare February 11, 2026 07:55
@DorianZheng
Copy link
Copy Markdown
Member Author

@shayne-snap @uran0sH Can you take a look?

@DorianZheng DorianZheng merged commit a28dd47 into main Feb 11, 2026
14 checks passed
@DorianZheng DorianZheng deleted the refactor/crash-report-extraction branch February 11, 2026 08:21
@shayne-snap
Copy link
Copy Markdown
Contributor

Sorry for the late reply.

I tested the main branch on my laptop, I saw 2026-02-12T00:52:22.666558Z WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=_CE_M env_value=*** total_size=1536 var_size=9 limit=1539 which is great, BUT still encountered an error.

console.log is empty.


01KH7NB9KC4DVQXEHYESEATFG0 % ls -al
total 1032
drwxr-xr-x@ 10 goranka  staff     320 Feb 12 08:59 .
drwxr-xr-x@ 42 goranka  staff    1344 Feb 12 08:52 ..
-rw-r--r--@  1 goranka  staff       0 Feb 12 08:52 console.log
-rw-r--r--@  1 goranka  staff  262144 Feb 12 08:52 disk.qcow2
-rw-r--r--@  1 goranka  staff  262144 Feb 12 08:52 guest-rootfs.qcow2
drwxr-xr-x@  3 goranka  staff      96 Feb 12 08:52 mounts
drwxr-xr-x@  2 goranka  staff      64 Feb 12 08:52 shared
-rw-r--r--@  1 goranka  staff       6 Feb 12 08:52 shim.pid
-rw-r--r--@  1 goranka  staff       0 Feb 12 08:52 shim.stderr
drwxr-xr-x@  4 goranka  staff     128 Feb 12 08:52 sockets

base) goranka@fengbolins-MacBook-Pro boxlite % `boxlite run --rm $(printenv | sed 's/=.*//;s/^/-e /' | tr '\n' ' ') docker.io/library/alpine:latest echo ok`
2026-02-12T00:52:08.501698Z  INFO boxlite::runtime::rt_impl: Virtualization support verified reason=Hypervisor.framework is available (Apple Silicon)
Error: internal error: Failed to acquire runtime lock at /Users/goranka/.boxlite: internal error: Another BoxliteRuntime is already using directory: /Users/goranka/.boxlite
Only one runtime instance can use a BOXLITE_HOME directory at a time.
(base) goranka@fengbolins-MacBook-Pro boxlite % ./target/debug/boxlite run --rm $(printenv | sed 's/=.*//;s/^/-e /' | tr '\n' ' ') docker.io/library/alpine:latest echo ok
2026-02-12T00:52:19.127064Z  INFO boxlite::runtime::rt_impl: Virtualization support verified reason=Hypervisor.framework is available (Apple Silicon)
2026-02-12T00:52:19.169989Z  INFO boxlite::runtime::rt_impl: Recovering 40 boxes from database
2026-02-12T00:52:19.179610Z  INFO boxlite::runtime::rt_impl: Box recovery complete
2026-02-12T00:52:19.369078Z  INFO boxlite::images::store: Using cached image: docker.io/library/alpine:latest
2026-02-12T00:52:19.369538Z  INFO boxlite::litebox::init::tasks::container_rootfs: Using cached disk image: /Users/goranka/.boxlite/images/disk-images/sha256-71a4daca31190bb2ea2308feeacebf5c459648262dc1ba9eae88b9507193e708.ext4 (256MB)
2026-02-12T00:52:19.369975Z  INFO boxlite::disk::qcow2: Creating COW child disk: /Users/goranka/.boxlite/boxes/01KH7NB9KC4DVQXEHYESEATFG0/disk.qcow2 (backing: /Users/goranka/.boxlite/images/disk-images/sha256-71a4daca31190bb2ea2308feeacebf5c459648262dc1ba9eae88b9507193e708.ext4, format: raw)
2026-02-12T00:52:19.376223Z  INFO boxlite::disk::qcow2: Created COW child disk: /Users/goranka/.boxlite/boxes/01KH7NB9KC4DVQXEHYESEATFG0/disk.qcow2
2026-02-12T00:52:19.376233Z  INFO boxlite::litebox::init::tasks::container_rootfs: Created container rootfs COW overlay (persistent) cow_disk=/Users/goranka/.boxlite/boxes/01KH7NB9KC4DVQXEHYESEATFG0/disk.qcow2 base_disk=/Users/goranka/.boxlite/images/disk-images/sha256-71a4daca31190bb2ea2308feeacebf5c459648262dc1ba9eae88b9507193e708.ext4 virtual_size_mb=256
2026-02-12T00:52:19.376317Z  INFO boxlite::litebox::init::tasks::guest_rootfs: Initializing bootstrap guest rootfs debian:bookworm-slim (first time only)
2026-02-12T00:52:19.377060Z  INFO boxlite::images::store: Using cached image: docker.io/library/debian:bookworm-slim
2026-02-12T00:52:19.400232Z  INFO boxlite::litebox::init::tasks::guest_rootfs: Guest binary updated, invalidating cached guest rootfs disk: /Users/goranka/.boxlite/images/disk-images/sha256-cbdf6298da7f082bf2694d331308958f14612d8d044134d23c9d31a90f8dac93.ext4
2026-02-12T00:52:19.425003Z  INFO boxlite::litebox::init::tasks::guest_rootfs: Creating guest rootfs disk image from layers (first run)
2026-02-12T00:52:19.425111Z  INFO boxlite::rootfs::builder: Preparing rootfs at /Users/goranka/.boxlite/tmp/.tmpxWlrkS/merged
2026-02-12T00:52:19.425131Z  INFO boxlite::rootfs::builder: Attempting copy-based mount with layer caching
2026-02-12T00:52:19.426414Z  INFO boxlite::rootfs::builder: Stacking 1 cached layers directly to destination
2026-02-12T00:52:19.426427Z  INFO boxlite::rootfs::copy_mount: Creating copy-based mount: /Users/goranka/.boxlite/images/extracted/sha256-33bdc9671af8942d96d2f78f67aeec06580065dde1272decac3732689ec7c0e8 -> /Users/goranka/.boxlite/tmp/.tmpxWlrkS/merged
2026-02-12T00:52:20.232454Z  INFO boxlite::rootfs::copy_mount: ✅ Copy-based mount created at /Users/goranka/.boxlite/tmp/.tmpxWlrkS/merged
2026-02-12T00:52:20.232479Z  INFO boxlite::rootfs::builder: ✅ Rootfs prepared at /Users/goranka/.boxlite/tmp/.tmpxWlrkS/merged
2026-02-12T00:52:20.232488Z  INFO boxlite::rootfs::builder: ✅ Rootfs prepared using copy-based mount
2026-02-12T00:52:20.238641Z  INFO boxlite::rootfs::dns: Created /etc/resolv.conf in container rootfs
2026-02-12T00:52:20.239366Z  INFO boxlite::util: Injected guest binary into /Users/goranka/.boxlite/tmp/.tmpxWlrkS/merged/boxlite/bin/boxlite-guest
2026-02-12T00:52:20.239386Z  INFO boxlite::litebox::init::tasks::guest_rootfs: Guest binary at: /Users/goranka/.boxlite/tmp/.tmpxWlrkS/merged/boxlite/bin/boxlite-guest (167006216 bytes)
2026-02-12T00:52:22.423617Z  INFO boxlite::disk::ext4: Fixed ownership of 4222 files to 0:0 in 722.598625ms
2026-02-12T00:52:22.424199Z  INFO boxlite::litebox::init::tasks::guest_rootfs: Created guest rootfs disk: /Users/goranka/.boxlite/tmp/.tmpxWlrkS/guest-rootfs.ext4 (357MB)
2026-02-12T00:52:22.424381Z  INFO boxlite::images::blob_source: Installed disk image: /Users/goranka/.boxlite/tmp/.tmpxWlrkS/guest-rootfs.ext4 -> /Users/goranka/.boxlite/images/disk-images/sha256-cbdf6298da7f082bf2694d331308958f14612d8d044134d23c9d31a90f8dac93.ext4
2026-02-12T00:52:22.424414Z  INFO boxlite::litebox::init::tasks::guest_rootfs: Installed guest rootfs disk to cache: /Users/goranka/.boxlite/images/disk-images/sha256-cbdf6298da7f082bf2694d331308958f14612d8d044134d23c9d31a90f8dac93.ext4
2026-02-12T00:52:22.658622Z  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-12T00:52:22.658688Z  INFO boxlite::disk::qcow2: Creating COW child disk: /Users/goranka/.boxlite/boxes/01KH7NB9KC4DVQXEHYESEATFG0/guest-rootfs.qcow2 (backing: /Users/goranka/.boxlite/images/disk-images/sha256-cbdf6298da7f082bf2694d331308958f14612d8d044134d23c9d31a90f8dac93.ext4, format: raw)
2026-02-12T00:52:22.665226Z  INFO boxlite::disk::qcow2: Created COW child disk: /Users/goranka/.boxlite/boxes/01KH7NB9KC4DVQXEHYESEATFG0/guest-rootfs.qcow2
2026-02-12T00:52:22.665243Z  INFO boxlite::litebox::init::tasks::guest_rootfs: Created guest rootfs COW overlay (persistent) cow_disk=/Users/goranka/.boxlite/boxes/01KH7NB9KC4DVQXEHYESEATFG0/guest-rootfs.qcow2 base_disk=/Users/goranka/.boxlite/images/disk-images/sha256-cbdf6298da7f082bf2694d331308958f14612d8d044134d23c9d31a90f8dac93.ext4
2026-02-12T00:52:22.666397Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=PATH env_value=/Use.../bin (1645 chars) total_size=1330 var_size=1653 limit=1539
2026-02-12T00:52:22.666419Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=SECURITYSESSIONID env_value=*** total_size=1519 var_size=26 limit=1539
2026-02-12T00:52:22.666434Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=SSH_AUTH_SOCK env_value=/pri...ners (51 chars) total_size=1536 var_size=68 limit=1539
2026-02-12T00:52:22.666445Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=TERM env_value=xter...olor (14 chars) total_size=1536 var_size=22 limit=1539
2026-02-12T00:52:22.666457Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=TERM_PROGRAM env_value=*** total_size=1536 var_size=19 limit=1539
2026-02-12T00:52:22.666469Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=TERM_PROGRAM_VERSION env_value=0.22...c6f0 (59 chars) total_size=1536 var_size=83 limit=1539
2026-02-12T00:52:22.666477Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=TMPDIR env_value=/var...n/T/ (49 chars) total_size=1536 var_size=59 limit=1539
2026-02-12T00:52:22.666487Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=USER env_value=*** total_size=1536 var_size=15 limit=1539
2026-02-12T00:52:22.666498Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=WINDOWID env_value=1288...2549 (11 chars) total_size=1536 var_size=23 limit=1539
2026-02-12T00:52:22.666509Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=XPC_FLAGS env_value=*** total_size=1536 var_size=16 limit=1539
2026-02-12T00:52:22.666520Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=XPC_SERVICE_NAME env_value=*** total_size=1536 var_size=21 limit=1539
2026-02-12T00:52:22.666532Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=ZED_ENVIRONMENT env_value=work...hell (14 chars) total_size=1536 var_size=33 limit=1539
2026-02-12T00:52:22.666543Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=ZED_TERM env_value=*** total_size=1536 var_size=16 limit=1539
2026-02-12T00:52:22.666550Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=_CE_CONDA env_value=*** total_size=1536 var_size=13 limit=1539
2026-02-12T00:52:22.666558Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=_CE_M env_value=*** total_size=1536 var_size=9 limit=1539
2026-02-12T00:52:22.666569Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=_CONDA_EXE env_value=/opt...onda (25 chars) total_size=1536 var_size=39 limit=1539
2026-02-12T00:52:22.666581Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=_CONDA_ROOT env_value=/opt...nda3 (15 chars) total_size=1536 var_size=30 limit=1539
2026-02-12T00:52:22.666591Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=__CFBundleIdentifier env_value=dev.....Zed (11 chars) total_size=1536 var_size=35 limit=1539
2026-02-12T00:52:22.666602Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=__CF_USER_TEXT_ENCODING env_value=0x1F...:0x0 (13 chars) total_size=1536 var_size=40 limit=1539
2026-02-12T00:52:22.666993Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=SHLVL env_value=*** total_size=1536 var_size=10 limit=1539
2026-02-12T00:52:22.667013Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=_ env_value=/Use...lite (70 chars) total_size=1536 var_size=75 limit=1539
2026-02-12T00:52:22.667286Z  INFO boxlite::litebox::init::tasks::vmm_spawn: Port mappings: 0 (image: 0, user: 0, overridden: 0)
2026-02-12T00:52:22.667903Z  INFO boxlite::vmm::controller::shim: Starting Box subprocess engine=Libkrun transport=Unix { socket_path: "/Users/goranka/.boxlite/boxes/01KH7NB9KC4DVQXEHYESEATFG0/sockets/box.sock" }
2026-02-12T00:52:22.667925Z  INFO boxlite::jailer::command: Jailer disabled, running shim without sandbox isolation
2026-02-12T00:52:22.669966Z  INFO boxlite::vmm::controller::shim: boxlite-shim subprocess spawned box_id=01KH7NB9KC4DVQXEHYESEATFG0 pid=72757 shim_spawn_duration_ms=2
2026-02-12T00:52:22.670096Z  INFO boxlite::vmm::controller::shim: VM subprocess started successfully box_id=01KH7NB9KC4DVQXEHYESEATFG0
2026-02-12T00:52:24.175574Z  WARN boxlite::litebox::init::tasks::guest_connect: VM subprocess exited unexpectedly during startup pid=72757
2026-02-12T00:52:24.175770Z ERROR boxlite::litebox::init::tasks: Task failed: engine reported an error: Box 01KH7NB9KC4DVQXEHYESEATFG0 failed to start

The VM exited unexpectedly.

Common causes:
• AppArmor or SELinux blocking execution
• /dev/kvm permissions (Linux)
• Missing Hypervisor entitlement (macOS)

Debug files:
• Console: /Users/goranka/.boxlite/boxes/01KH7NB9KC4DVQXEHYESEATFG0/console.log

Tip: Check system logs (dmesg, Console.app) box_id=01KH7NB9KC4DVQXEHYESEATFG0 task=guest_connect
2026-02-12T00:52:24.175930Z  WARN boxlite::litebox::init::types: Box initialization failed, cleaning up
2026-02-12T00:52:24.175951Z ERROR boxlite::litebox::init::types: Box crashed. Diagnostic files preserved at:
  /Users/goranka/.boxlite/boxes/01KH7NB9KC4DVQXEHYESEATFG0

To clean up: rm -rf /Users/goranka/.boxlite/boxes/01KH7NB9KC4DVQXEHYESEATFG0
Error: engine reported an error: Box 01KH7NB9KC4DVQXEHYESEATFG0 failed to start

The VM exited unexpectedly.

Common causes:
• AppArmor or SELinux blocking execution
• /dev/kvm permissions (Linux)
• Missing Hypervisor entitlement (macOS)

Debug files:
• Console: /Users/goranka/.boxlite/boxes/01KH7NB9KC4DVQXEHYESEATFG0/console.log

Tip: Check system logs (dmesg, Console.app)

@DorianZheng
Copy link
Copy Markdown
Member Author

Sorry for the late reply.

I tested the main branch on my laptop, I saw 2026-02-12T00:52:22.666558Z WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=_CE_M env_value=*** total_size=1536 var_size=9 limit=1539 which is great, BUT still encountered an error.

console.log is empty.


01KH7NB9KC4DVQXEHYESEATFG0 % ls -al
total 1032
drwxr-xr-x@ 10 goranka  staff     320 Feb 12 08:59 .
drwxr-xr-x@ 42 goranka  staff    1344 Feb 12 08:52 ..
-rw-r--r--@  1 goranka  staff       0 Feb 12 08:52 console.log
-rw-r--r--@  1 goranka  staff  262144 Feb 12 08:52 disk.qcow2
-rw-r--r--@  1 goranka  staff  262144 Feb 12 08:52 guest-rootfs.qcow2
drwxr-xr-x@  3 goranka  staff      96 Feb 12 08:52 mounts
drwxr-xr-x@  2 goranka  staff      64 Feb 12 08:52 shared
-rw-r--r--@  1 goranka  staff       6 Feb 12 08:52 shim.pid
-rw-r--r--@  1 goranka  staff       0 Feb 12 08:52 shim.stderr
drwxr-xr-x@  4 goranka  staff     128 Feb 12 08:52 sockets
base) goranka@fengbolins-MacBook-Pro boxlite % `boxlite run --rm $(printenv | sed 's/=.*//;s/^/-e /' | tr '\n' ' ') docker.io/library/alpine:latest echo ok`
2026-02-12T00:52:08.501698Z  INFO boxlite::runtime::rt_impl: Virtualization support verified reason=Hypervisor.framework is available (Apple Silicon)
Error: internal error: Failed to acquire runtime lock at /Users/goranka/.boxlite: internal error: Another BoxliteRuntime is already using directory: /Users/goranka/.boxlite
Only one runtime instance can use a BOXLITE_HOME directory at a time.
(base) goranka@fengbolins-MacBook-Pro boxlite % ./target/debug/boxlite run --rm $(printenv | sed 's/=.*//;s/^/-e /' | tr '\n' ' ') docker.io/library/alpine:latest echo ok
2026-02-12T00:52:19.127064Z  INFO boxlite::runtime::rt_impl: Virtualization support verified reason=Hypervisor.framework is available (Apple Silicon)
2026-02-12T00:52:19.169989Z  INFO boxlite::runtime::rt_impl: Recovering 40 boxes from database
2026-02-12T00:52:19.179610Z  INFO boxlite::runtime::rt_impl: Box recovery complete
2026-02-12T00:52:19.369078Z  INFO boxlite::images::store: Using cached image: docker.io/library/alpine:latest
2026-02-12T00:52:19.369538Z  INFO boxlite::litebox::init::tasks::container_rootfs: Using cached disk image: /Users/goranka/.boxlite/images/disk-images/sha256-71a4daca31190bb2ea2308feeacebf5c459648262dc1ba9eae88b9507193e708.ext4 (256MB)
2026-02-12T00:52:19.369975Z  INFO boxlite::disk::qcow2: Creating COW child disk: /Users/goranka/.boxlite/boxes/01KH7NB9KC4DVQXEHYESEATFG0/disk.qcow2 (backing: /Users/goranka/.boxlite/images/disk-images/sha256-71a4daca31190bb2ea2308feeacebf5c459648262dc1ba9eae88b9507193e708.ext4, format: raw)
2026-02-12T00:52:19.376223Z  INFO boxlite::disk::qcow2: Created COW child disk: /Users/goranka/.boxlite/boxes/01KH7NB9KC4DVQXEHYESEATFG0/disk.qcow2
2026-02-12T00:52:19.376233Z  INFO boxlite::litebox::init::tasks::container_rootfs: Created container rootfs COW overlay (persistent) cow_disk=/Users/goranka/.boxlite/boxes/01KH7NB9KC4DVQXEHYESEATFG0/disk.qcow2 base_disk=/Users/goranka/.boxlite/images/disk-images/sha256-71a4daca31190bb2ea2308feeacebf5c459648262dc1ba9eae88b9507193e708.ext4 virtual_size_mb=256
2026-02-12T00:52:19.376317Z  INFO boxlite::litebox::init::tasks::guest_rootfs: Initializing bootstrap guest rootfs debian:bookworm-slim (first time only)
2026-02-12T00:52:19.377060Z  INFO boxlite::images::store: Using cached image: docker.io/library/debian:bookworm-slim
2026-02-12T00:52:19.400232Z  INFO boxlite::litebox::init::tasks::guest_rootfs: Guest binary updated, invalidating cached guest rootfs disk: /Users/goranka/.boxlite/images/disk-images/sha256-cbdf6298da7f082bf2694d331308958f14612d8d044134d23c9d31a90f8dac93.ext4
2026-02-12T00:52:19.425003Z  INFO boxlite::litebox::init::tasks::guest_rootfs: Creating guest rootfs disk image from layers (first run)
2026-02-12T00:52:19.425111Z  INFO boxlite::rootfs::builder: Preparing rootfs at /Users/goranka/.boxlite/tmp/.tmpxWlrkS/merged
2026-02-12T00:52:19.425131Z  INFO boxlite::rootfs::builder: Attempting copy-based mount with layer caching
2026-02-12T00:52:19.426414Z  INFO boxlite::rootfs::builder: Stacking 1 cached layers directly to destination
2026-02-12T00:52:19.426427Z  INFO boxlite::rootfs::copy_mount: Creating copy-based mount: /Users/goranka/.boxlite/images/extracted/sha256-33bdc9671af8942d96d2f78f67aeec06580065dde1272decac3732689ec7c0e8 -> /Users/goranka/.boxlite/tmp/.tmpxWlrkS/merged
2026-02-12T00:52:20.232454Z  INFO boxlite::rootfs::copy_mount: ✅ Copy-based mount created at /Users/goranka/.boxlite/tmp/.tmpxWlrkS/merged
2026-02-12T00:52:20.232479Z  INFO boxlite::rootfs::builder: ✅ Rootfs prepared at /Users/goranka/.boxlite/tmp/.tmpxWlrkS/merged
2026-02-12T00:52:20.232488Z  INFO boxlite::rootfs::builder: ✅ Rootfs prepared using copy-based mount
2026-02-12T00:52:20.238641Z  INFO boxlite::rootfs::dns: Created /etc/resolv.conf in container rootfs
2026-02-12T00:52:20.239366Z  INFO boxlite::util: Injected guest binary into /Users/goranka/.boxlite/tmp/.tmpxWlrkS/merged/boxlite/bin/boxlite-guest
2026-02-12T00:52:20.239386Z  INFO boxlite::litebox::init::tasks::guest_rootfs: Guest binary at: /Users/goranka/.boxlite/tmp/.tmpxWlrkS/merged/boxlite/bin/boxlite-guest (167006216 bytes)
2026-02-12T00:52:22.423617Z  INFO boxlite::disk::ext4: Fixed ownership of 4222 files to 0:0 in 722.598625ms
2026-02-12T00:52:22.424199Z  INFO boxlite::litebox::init::tasks::guest_rootfs: Created guest rootfs disk: /Users/goranka/.boxlite/tmp/.tmpxWlrkS/guest-rootfs.ext4 (357MB)
2026-02-12T00:52:22.424381Z  INFO boxlite::images::blob_source: Installed disk image: /Users/goranka/.boxlite/tmp/.tmpxWlrkS/guest-rootfs.ext4 -> /Users/goranka/.boxlite/images/disk-images/sha256-cbdf6298da7f082bf2694d331308958f14612d8d044134d23c9d31a90f8dac93.ext4
2026-02-12T00:52:22.424414Z  INFO boxlite::litebox::init::tasks::guest_rootfs: Installed guest rootfs disk to cache: /Users/goranka/.boxlite/images/disk-images/sha256-cbdf6298da7f082bf2694d331308958f14612d8d044134d23c9d31a90f8dac93.ext4
2026-02-12T00:52:22.658622Z  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-12T00:52:22.658688Z  INFO boxlite::disk::qcow2: Creating COW child disk: /Users/goranka/.boxlite/boxes/01KH7NB9KC4DVQXEHYESEATFG0/guest-rootfs.qcow2 (backing: /Users/goranka/.boxlite/images/disk-images/sha256-cbdf6298da7f082bf2694d331308958f14612d8d044134d23c9d31a90f8dac93.ext4, format: raw)
2026-02-12T00:52:22.665226Z  INFO boxlite::disk::qcow2: Created COW child disk: /Users/goranka/.boxlite/boxes/01KH7NB9KC4DVQXEHYESEATFG0/guest-rootfs.qcow2
2026-02-12T00:52:22.665243Z  INFO boxlite::litebox::init::tasks::guest_rootfs: Created guest rootfs COW overlay (persistent) cow_disk=/Users/goranka/.boxlite/boxes/01KH7NB9KC4DVQXEHYESEATFG0/guest-rootfs.qcow2 base_disk=/Users/goranka/.boxlite/images/disk-images/sha256-cbdf6298da7f082bf2694d331308958f14612d8d044134d23c9d31a90f8dac93.ext4
2026-02-12T00:52:22.666397Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=PATH env_value=/Use.../bin (1645 chars) total_size=1330 var_size=1653 limit=1539
2026-02-12T00:52:22.666419Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=SECURITYSESSIONID env_value=*** total_size=1519 var_size=26 limit=1539
2026-02-12T00:52:22.666434Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=SSH_AUTH_SOCK env_value=/pri...ners (51 chars) total_size=1536 var_size=68 limit=1539
2026-02-12T00:52:22.666445Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=TERM env_value=xter...olor (14 chars) total_size=1536 var_size=22 limit=1539
2026-02-12T00:52:22.666457Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=TERM_PROGRAM env_value=*** total_size=1536 var_size=19 limit=1539
2026-02-12T00:52:22.666469Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=TERM_PROGRAM_VERSION env_value=0.22...c6f0 (59 chars) total_size=1536 var_size=83 limit=1539
2026-02-12T00:52:22.666477Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=TMPDIR env_value=/var...n/T/ (49 chars) total_size=1536 var_size=59 limit=1539
2026-02-12T00:52:22.666487Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=USER env_value=*** total_size=1536 var_size=15 limit=1539
2026-02-12T00:52:22.666498Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=WINDOWID env_value=1288...2549 (11 chars) total_size=1536 var_size=23 limit=1539
2026-02-12T00:52:22.666509Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=XPC_FLAGS env_value=*** total_size=1536 var_size=16 limit=1539
2026-02-12T00:52:22.666520Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=XPC_SERVICE_NAME env_value=*** total_size=1536 var_size=21 limit=1539
2026-02-12T00:52:22.666532Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=ZED_ENVIRONMENT env_value=work...hell (14 chars) total_size=1536 var_size=33 limit=1539
2026-02-12T00:52:22.666543Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=ZED_TERM env_value=*** total_size=1536 var_size=16 limit=1539
2026-02-12T00:52:22.666550Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=_CE_CONDA env_value=*** total_size=1536 var_size=13 limit=1539
2026-02-12T00:52:22.666558Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=_CE_M env_value=*** total_size=1536 var_size=9 limit=1539
2026-02-12T00:52:22.666569Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=_CONDA_EXE env_value=/opt...onda (25 chars) total_size=1536 var_size=39 limit=1539
2026-02-12T00:52:22.666581Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=_CONDA_ROOT env_value=/opt...nda3 (15 chars) total_size=1536 var_size=30 limit=1539
2026-02-12T00:52:22.666591Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=__CFBundleIdentifier env_value=dev.....Zed (11 chars) total_size=1536 var_size=35 limit=1539
2026-02-12T00:52:22.666602Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=__CF_USER_TEXT_ENCODING env_value=0x1F...:0x0 (13 chars) total_size=1536 var_size=40 limit=1539
2026-02-12T00:52:22.666993Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=SHLVL env_value=*** total_size=1536 var_size=10 limit=1539
2026-02-12T00:52:22.667013Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=_ env_value=/Use...lite (70 chars) total_size=1536 var_size=75 limit=1539
2026-02-12T00:52:22.667286Z  INFO boxlite::litebox::init::tasks::vmm_spawn: Port mappings: 0 (image: 0, user: 0, overridden: 0)
2026-02-12T00:52:22.667903Z  INFO boxlite::vmm::controller::shim: Starting Box subprocess engine=Libkrun transport=Unix { socket_path: "/Users/goranka/.boxlite/boxes/01KH7NB9KC4DVQXEHYESEATFG0/sockets/box.sock" }
2026-02-12T00:52:22.667925Z  INFO boxlite::jailer::command: Jailer disabled, running shim without sandbox isolation
2026-02-12T00:52:22.669966Z  INFO boxlite::vmm::controller::shim: boxlite-shim subprocess spawned box_id=01KH7NB9KC4DVQXEHYESEATFG0 pid=72757 shim_spawn_duration_ms=2
2026-02-12T00:52:22.670096Z  INFO boxlite::vmm::controller::shim: VM subprocess started successfully box_id=01KH7NB9KC4DVQXEHYESEATFG0
2026-02-12T00:52:24.175574Z  WARN boxlite::litebox::init::tasks::guest_connect: VM subprocess exited unexpectedly during startup pid=72757
2026-02-12T00:52:24.175770Z ERROR boxlite::litebox::init::tasks: Task failed: engine reported an error: Box 01KH7NB9KC4DVQXEHYESEATFG0 failed to start

The VM exited unexpectedly.

Common causes:
• AppArmor or SELinux blocking execution
• /dev/kvm permissions (Linux)
• Missing Hypervisor entitlement (macOS)

Debug files:
• Console: /Users/goranka/.boxlite/boxes/01KH7NB9KC4DVQXEHYESEATFG0/console.log

Tip: Check system logs (dmesg, Console.app) box_id=01KH7NB9KC4DVQXEHYESEATFG0 task=guest_connect
2026-02-12T00:52:24.175930Z  WARN boxlite::litebox::init::types: Box initialization failed, cleaning up
2026-02-12T00:52:24.175951Z ERROR boxlite::litebox::init::types: Box crashed. Diagnostic files preserved at:
  /Users/goranka/.boxlite/boxes/01KH7NB9KC4DVQXEHYESEATFG0

To clean up: rm -rf /Users/goranka/.boxlite/boxes/01KH7NB9KC4DVQXEHYESEATFG0
Error: engine reported an error: Box 01KH7NB9KC4DVQXEHYESEATFG0 failed to start

The VM exited unexpectedly.

Common causes:
• AppArmor or SELinux blocking execution
• /dev/kvm permissions (Linux)
• Missing Hypervisor entitlement (macOS)

Debug files:
• Console: /Users/goranka/.boxlite/boxes/01KH7NB9KC4DVQXEHYESEATFG0/console.log

Tip: Check system logs (dmesg, Console.app)

Hi @shayne-snap. Please open Console app on you Mac and at the right-upper search window, search for boxlite for Crash Reports and Diagnostic Reports. Just like the pic showed below

Screenshot 2026-02-12 at 09 57 32

Check if there is any new generated result

@shayne-snap
Copy link
Copy Markdown
Contributor

image image image

@shayne-snap
Copy link
Copy Markdown
Contributor

Feel free to let me know if you need more info.

@DorianZheng
Copy link
Copy Markdown
Member Author

DorianZheng commented Feb 12, 2026

Hi @shayne-snap. The command you showed above works on my side

(.venv) ➜ /Users/zhengzhiquan/Workspace/boxlite-latest  on git:main x>./target/debug/boxlite run --rm $(printenv | sed 's/=.*//;s/^/-e /' | tr '\n' ' ') docker.io/library/alpine:latest echo ok
2026-02-12T01:51:14.352782Z  INFO boxlite::runtime::rt_impl: Virtualization support verified reason=Hypervisor.framework is available (Apple Silicon)
2026-02-12T01:51:14.407881Z  INFO boxlite::runtime::rt_impl: Removing auto_remove=true box during recovery box_id=01KH7R66JZGPG4CTFJ9QP54EGP
2026-02-12T01:51:14.414641Z  INFO boxlite::runtime::rt_impl: Cleaned up 1 boxes during recovery (auto_remove or orphaned)
2026-02-12T01:51:14.414758Z  INFO boxlite::runtime::rt_impl: Recovering 0 boxes from database
2026-02-12T01:51:14.414779Z  INFO boxlite::runtime::rt_impl: Box recovery complete
2026-02-12T01:51:14.610023Z  INFO boxlite::images::store: Using cached image: docker.io/library/alpine:latest
2026-02-12T01:51:14.610144Z  INFO boxlite::litebox::init::tasks::container_rootfs: Using cached disk image: /Users/zhengzhiquan/.boxlite/images/disk-images/sha256-71a4daca31190bb2ea2308feeacebf5c459648262dc1ba9eae88b9507193e708.ext4 (256MB)
2026-02-12T01:51:14.610960Z  INFO boxlite::disk::qcow2: Creating COW child disk: /Users/zhengzhiquan/.boxlite/boxes/01KH7RQ5ZFRSM6ANQ621X7YSFV/disk.qcow2 (backing: /Users/zhengzhiquan/.boxlite/images/disk-images/sha256-71a4daca31190bb2ea2308feeacebf5c459648262dc1ba9eae88b9507193e708.ext4, format: raw)
2026-02-12T01:51:14.619457Z  INFO boxlite::disk::qcow2: Created COW child disk: /Users/zhengzhiquan/.boxlite/boxes/01KH7RQ5ZFRSM6ANQ621X7YSFV/disk.qcow2
2026-02-12T01:51:14.619495Z  INFO boxlite::litebox::init::tasks::container_rootfs: Created container rootfs COW overlay (persistent) cow_disk=/Users/zhengzhiquan/.boxlite/boxes/01KH7RQ5ZFRSM6ANQ621X7YSFV/disk.qcow2 base_disk=/Users/zhengzhiquan/.boxlite/images/disk-images/sha256-71a4daca31190bb2ea2308feeacebf5c459648262dc1ba9eae88b9507193e708.ext4 virtual_size_mb=256
2026-02-12T01:51:14.619815Z  INFO boxlite::litebox::init::tasks::guest_rootfs: Initializing bootstrap guest rootfs debian:bookworm-slim (first time only)
2026-02-12T01:51:14.620466Z  INFO boxlite::images::store: Using cached image: docker.io/library/debian:bookworm-slim
2026-02-12T01:51:14.644297Z  INFO boxlite::litebox::init::tasks::guest_rootfs: Using cached guest rootfs disk image: /Users/zhengzhiquan/.boxlite/images/disk-images/sha256-cbdf6298da7f082bf2694d331308958f14612d8d044134d23c9d31a90f8dac93.ext4
2026-02-12T01:51:14.644330Z  INFO boxlite::litebox::init::tasks::guest_rootfs: Bootstrap guest rootfs ready: Disk { disk_path: "/Users/zhengzhiquan/.boxlite/images/disk-images/sha256-cbdf6298da7f082bf2694d331308958f14612d8d044134d23c9d31a90f8dac93.ext4", device_path: None }
2026-02-12T01:51:14.644376Z  INFO boxlite::disk::qcow2: Creating COW child disk: /Users/zhengzhiquan/.boxlite/boxes/01KH7RQ5ZFRSM6ANQ621X7YSFV/guest-rootfs.qcow2 (backing: /Users/zhengzhiquan/.boxlite/images/disk-images/sha256-cbdf6298da7f082bf2694d331308958f14612d8d044134d23c9d31a90f8dac93.ext4, format: raw)
2026-02-12T01:51:14.648815Z  INFO boxlite::disk::qcow2: Created COW child disk: /Users/zhengzhiquan/.boxlite/boxes/01KH7RQ5ZFRSM6ANQ621X7YSFV/guest-rootfs.qcow2
2026-02-12T01:51:14.648856Z  INFO boxlite::litebox::init::tasks::guest_rootfs: Created guest rootfs COW overlay (persistent) cow_disk=/Users/zhengzhiquan/.boxlite/boxes/01KH7RQ5ZFRSM6ANQ621X7YSFV/guest-rootfs.qcow2 base_disk=/Users/zhengzhiquan/.boxlite/images/disk-images/sha256-cbdf6298da7f082bf2694d331308958f14612d8d044134d23c9d31a90f8dac93.ext4
2026-02-12T01:51:14.649877Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=TERMINFO_DIRS env_value=/App...info (71 chars) total_size=1513 var_size=88 limit=1529
2026-02-12T01:51:14.649899Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=HOME env_value=/Use...quan (19 chars) total_size=1513 var_size=27 limit=1529
2026-02-12T01:51:14.649909Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=TMPDIR env_value=/var...n/T/ (49 chars) total_size=1513 var_size=59 limit=1529
2026-02-12T01:51:14.649919Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=USER env_value=zhen...quan (12 chars) total_size=1513 var_size=20 limit=1529
2026-02-12T01:51:14.649928Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=XPC_SERVICE_NAME env_value=*** total_size=1513 var_size=21 limit=1529
2026-02-12T01:51:14.649936Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=LOGNAME env_value=zhen...quan (12 chars) total_size=1513 var_size=23 limit=1529
2026-02-12T01:51:14.649945Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=ITERM_SESSION_ID env_value=w0t5...828E (43 chars) total_size=1513 var_size=63 limit=1529
2026-02-12T01:51:14.650072Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=__CF_USER_TEXT_ENCODING env_value=0x1F...:0x0 (13 chars) total_size=1513 var_size=40 limit=1529
2026-02-12T01:51:14.650099Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=OLDPWD env_value=/Use...node (54 chars) total_size=1523 var_size=64 limit=1529
2026-02-12T01:51:14.650109Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=ZSH env_value=/Use...-zsh (30 chars) total_size=1523 var_size=37 limit=1529
2026-02-12T01:51:14.650140Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=PAGER env_value=*** total_size=1523 var_size=13 limit=1529
2026-02-12T01:51:14.650154Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=LESS env_value=*** total_size=1523 var_size=10 limit=1529
2026-02-12T01:51:14.650164Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=LC_CTYPE env_value=en_A...TF-8 (11 chars) total_size=1523 var_size=23 limit=1529
2026-02-12T01:51:14.650211Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=LSCOLORS env_value=Gxfx...acad (22 chars) total_size=1523 var_size=34 limit=1529
2026-02-12T01:51:14.650221Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=GOPATH env_value=/Use...e/go (32 chars) total_size=1523 var_size=42 limit=1529
2026-02-12T01:51:14.650230Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=GOBIN env_value=/Use.../bin (36 chars) total_size=1523 var_size=45 limit=1529
2026-02-12T01:51:14.650387Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=JAVA_8_HOME env_value=/Use...Home (81 chars) total_size=1523 var_size=96 limit=1529
2026-02-12T01:51:14.650398Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=JAVA_HOME env_value=/Use...Home (81 chars) total_size=1523 var_size=94 limit=1529
2026-02-12T01:51:14.650408Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=JAVA_11_HOME env_value=/Use...Home (79 chars) total_size=1523 var_size=95 limit=1529
2026-02-12T01:51:14.650497Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=JAVA_12_HOME env_value=/Lib...Home (58 chars) total_size=1523 var_size=74 limit=1529
2026-02-12T01:51:14.650511Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=JAVA_17_HOME env_value=/Use...Home (78 chars) total_size=1523 var_size=94 limit=1529
2026-02-12T01:51:14.650521Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=JAVA_19_HOME env_value=/Use...Home (78 chars) total_size=1523 var_size=94 limit=1529
2026-02-12T01:51:14.650559Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=http_proxy env_value=http...7890 (21 chars) total_size=1523 var_size=35 limit=1529
2026-02-12T01:51:14.650573Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=https_proxy env_value=http...7890 (21 chars) total_size=1523 var_size=36 limit=1529
2026-02-12T01:51:14.650584Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=no_proxy env_value=127....10.2 (75 chars) total_size=1523 var_size=87 limit=1529
2026-02-12T01:51:14.650622Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=MAVEN_OPTS env_value=-Xmx...512m (37 chars) total_size=1523 var_size=51 limit=1529
2026-02-12T01:51:14.650632Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=NVM_DIR env_value=/Use....nvm (24 chars) total_size=1523 var_size=35 limit=1529
2026-02-12T01:51:14.650640Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=NVM_CD_FLAGS env_value=*** total_size=1523 var_size=18 limit=1529
2026-02-12T01:51:14.650680Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=NVM_BIN env_value=/Use.../bin (50 chars) total_size=1523 var_size=61 limit=1529
2026-02-12T01:51:14.650691Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=NVM_INC env_value=/Use...node (59 chars) total_size=1523 var_size=70 limit=1529
2026-02-12T01:51:14.650700Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=GEMINI_API_KEY env_value=AIza...2W5Y (39 chars) total_size=1523 var_size=57 limit=1529
2026-02-12T01:51:14.650741Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=GOOGLE_CLOUD_PROJECT env_value=dori...nzzq (9 chars) total_size=1523 var_size=33 limit=1529
2026-02-12T01:51:14.650751Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=PYENV_ROOT env_value=/Use...yenv (26 chars) total_size=1523 var_size=40 limit=1529
2026-02-12T01:51:14.650759Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=PYENV_SHELL env_value=*** total_size=1523 var_size=18 limit=1529
2026-02-12T01:51:14.650799Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=VIRTUAL_ENV env_value=/Use...venv (50 chars) total_size=1523 var_size=65 limit=1529
2026-02-12T01:51:14.650808Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=VIRTUAL_ENV_PROMPT env_value=*** total_size=1523 var_size=27 limit=1529
2026-02-12T01:51:14.650820Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: contains non-ASCII characters env_key=PS1 env_value=(.ve...r%}> (139 chars)
2026-02-12T01:51:14.650856Z  WARN boxlite::litebox::init::tasks::guest_entrypoint: Skipping env var: kernel cmdline size limit reached env_key=_ env_value=/Use...lite (67 chars) total_size=1523 var_size=72 limit=1529
2026-02-12T01:51:14.651308Z  INFO boxlite::litebox::init::tasks::vmm_spawn: Port mappings: 0 (image: 0, user: 0, overridden: 0)
2026-02-12T01:51:14.652238Z  INFO boxlite::vmm::controller::shim: Starting Box subprocess engine=Libkrun transport=Unix { socket_path: "/Users/zhengzhiquan/.boxlite/boxes/01KH7RQ5ZFRSM6ANQ621X7YSFV/sockets/box.sock" }
2026-02-12T01:51:14.652270Z  INFO boxlite::jailer::command: Jailer disabled, running shim without sandbox isolation
2026-02-12T01:51:14.657602Z  INFO boxlite::vmm::controller::shim: boxlite-shim subprocess spawned box_id=01KH7RQ5ZFRSM6ANQ621X7YSFV pid=23512 shim_spawn_duration_ms=5
2026-02-12T01:51:14.658175Z  INFO boxlite::vmm::controller::shim: VM subprocess started successfully box_id=01KH7RQ5ZFRSM6ANQ621X7YSFV
2026-02-12T01:51:14.994670Z  INFO boxlite::litebox::init::tasks::guest_init: Sending guest initialization request
2026-02-12T01:51:15.007408Z  INFO boxlite::litebox::init::tasks::guest_init: Guest initialized successfully
2026-02-12T01:51:15.007446Z  INFO boxlite::litebox::init::tasks::guest_init: Sending container configuration to guest
2026-02-12T01:51:15.066909Z  INFO boxlite::litebox::init::tasks::guest_init: Container initialized container_id=a12573da11c0cf20c7658fca48766a9bafe2612a6830908cd6e9ea21cf15c876
2026-02-12T01:51:15.067486Z  INFO boxlite::litebox::box_impl: Box started successfully (first_start=true) box_id=01KH7RQ5ZFRSM6ANQ621X7YSFV
2026-02-12T01:51:14.639855Z  WARN libcontainer::process::init::process: seccomp not available, unable to set seccomp privileges!
ok

Please

  1. Run the command again as:
RUST_LOG=info,boxlite=trace,boxlite_guest=trace ./target/debug/boxlite run --rm $(printenv | sed 's/=.*//;s/^/-e /' | tr '\n' ' ') docker.io/library/alpine:latest echo ok

and paste the output and shim.stderr output here

  1. run echo $DYLD_LIBRARY_PATH to see if there are any result

@shayne-snap
Copy link
Copy Markdown
Contributor

DYLD_LIBRARY_PATH is empty.

(base) goranka@fengbolins-MacBook-Pro boxlite % cd /Users/goranka/.boxlite/boxes/01KH7VF3W69DMV1BBG6WW6X0XB/
(base) goranka@fengbolins-MacBook-Pro 01KH7VF3W69DMV1BBG6WW6X0XB % ls
console.log		disk.qcow2		guest-rootfs.qcow2	mounts			shared			shim.pid		shim.stderr		sockets
(base) goranka@fengbolins-MacBook-Pro 01KH7VF3W69DMV1BBG6WW6X0XB % cat shim.stderr
[2026-02-12T02:39:16Z INFO  vmm::macos::vstate] vCPU 0 received shutdown signal
[2026-02-12T02:39:16Z INFO  vmm] Vmm is stopping.
(base) goranka@fengbolins-MacBook-Pro 01KH7VF3W69DMV1BBG6WW6X0XB % echo $DYLD_LIBRARY_PATH

(base) goranka@fengbolins-MacBook-Pro 01KH7VF3W69DMV1BBG6WW6X0XB %
2026-02-12T02:39:16.076372Z DEBUG boxlite::jailer::command: Pre-spawn isolation: no-op on macOS (no cgroups) box_id=01KH7VF3W69DMV1BBG6WW6X0XB
2026-02-12T02:39:16.076378Z  INFO boxlite::jailer::command: Jailer disabled, running shim without sandbox isolation
2026-02-12T02:39:16.077187Z DEBUG boxlite::util: dylibs_path: Some("/Users/goranka/.local/share/boxlite")
2026-02-12T02:39:16.077197Z DEBUG boxlite::util: Set DYLD_FALLBACK_LIBRARY_PATH for bundled libraries dylibs=/Users/goranka/.local/share/boxlite
2026-02-12T02:39:16.078581Z  INFO boxlite::vmm::controller::shim: boxlite-shim subprocess spawned box_id=01KH7VF3W69DMV1BBG6WW6X0XB pid=7381 shim_spawn_duration_ms=2
2026-02-12T02:39:16.079279Z  INFO boxlite::vmm::controller::shim: VM subprocess started successfully box_id=01KH7VF3W69DMV1BBG6WW6X0XB
2026-02-12T02:39:16.079376Z DEBUG boxlite::litebox::init::tasks: Executing task box_id=01KH7VF3W69DMV1BBG6WW6X0XB task=guest_connect
2026-02-12T02:39:16.079494Z DEBUG boxlite::litebox::init::tasks::guest_connect: Waiting for guest to be ready box_id=01KH7VF3W69DMV1BBG6WW6X0XB
2026-02-12T02:39:16.079586Z DEBUG boxlite::litebox::init::tasks::guest_connect: Listening for guest ready notification socket=/Users/goranka/.boxlite/boxes/01KH7VF3W69DMV1BBG6WW6X0XB/sockets/ready.sock
2026-02-12T02:39:16.580725Z  WARN boxlite::litebox::init::tasks::guest_connect: VM subprocess exited unexpectedly during startup pid=7381
2026-02-12T02:39:16.581162Z ERROR boxlite::litebox::init::tasks: Task failed: engine reported an error: Box 01KH7VF3W69DMV1BBG6WW6X0XB failed to start

The VM exited unexpectedly.

Common causes:
• AppArmor or SELinux blocking execution
• /dev/kvm permissions (Linux)
• Missing Hypervisor entitlement (macOS)

Debug files:
• Console: /Users/goranka/.boxlite/boxes/01KH7VF3W69DMV1BBG6WW6X0XB/console.log

Tip: Check system logs (dmesg, Console.app) box_id=01KH7VF3W69DMV1BBG6WW6X0XB task=guest_connect
2026-02-12T02:39:16.581436Z  WARN boxlite::litebox::init::types: Box initialization failed, cleaning up
2026-02-12T02:39:16.581500Z ERROR boxlite::litebox::init::types: Box crashed. Diagnostic files preserved at:
  /Users/goranka/.boxlite/boxes/01KH7VF3W69DMV1BBG6WW6X0XB

To clean up: rm -rf /Users/goranka/.boxlite/boxes/01KH7VF3W69DMV1BBG6WW6X0XB
2026-02-12T02:39:16.583302Z TRACE boxlite::litebox::manager: Saved box state to database box_id=01KH7VF3W69DMV1BBG6WW6X0XB status=Stopped
2026-02-12T02:39:16.585087Z DEBUG boxlite::litebox::manager: Removed box from state box_id=01KH7VF3W69DMV1BBG6WW6X0XB
2026-02-12T02:39:16.585199Z DEBUG boxlite::disk::image: Skipping cleanup for persistent disk: /Users/goranka/.boxlite/boxes/01KH7VF3W69DMV1BBG6WW6X0XB/disk.qcow2
2026-02-12T02:39:16.585230Z DEBUG boxlite::disk::image: Skipping cleanup for persistent disk: /Users/goranka/.boxlite/boxes/01KH7VF3W69DMV1BBG6WW6X0XB/guest-rootfs.qcow2
2026-02-12T02:39:16.587394Z DEBUG boxlite::runtime::lock: Released runtime lock lock_path=/Users/goranka/.boxlite/.lock
Error: engine reported an error: Box 01KH7VF3W69DMV1BBG6WW6X0XB failed to start

The VM exited unexpectedly.

Common causes:
• AppArmor or SELinux blocking execution
• /dev/kvm permissions (Linux)
• Missing Hypervisor entitlement (macOS)

Debug files:
• Console: /Users/goranka/.boxlite/boxes/01KH7VF3W69DMV1BBG6WW6X0XB/console.log

Tip: Check system logs (dmesg, Console.app)

@DorianZheng
Copy link
Copy Markdown
Member Author

Hi @shayne-snap. Does the node example #222 (comment) failed to start with the latest code too

@shayne-snap
Copy link
Copy Markdown
Contributor

shayne-snap commented Feb 12, 2026

After running make dev:node and node simplebox.js(the node example you mentioned). The output is down below:

(base) goranka@fengbolins-MacBook-Pro node % node simplebox.js
=== SimpleBox Example ===

   Env count: 59
1. Running basic command...

6. Cleaning up...
   Box stopped and removed.
Error: [Error: engine reported an error: Box 01KH7X5DH4ZFGP8B8NS7Z0MAH3 failed to start

The VM exited unexpectedly.

Common causes:
• AppArmor or SELinux blocking execution
• /dev/kvm permissions (Linux)
• Missing Hypervisor entitlement (macOS)

Debug files:
• Console: /Users/goranka/.boxlite/boxes/01KH7X5DH4ZFGP8B8NS7Z0MAH3/console.log

Tip: Check system logs (dmesg, Console.app)] {
  code: 'GenericFailure'
}
(base) goranka@fengbolins-MacBook-Pro node % cd /Users/goranka/.boxlite/boxes/01KH7X5DH4ZFGP8B8NS7Z0MAH3
(base) goranka@fengbolins-MacBook-Pro 01KH7X5DH4ZFGP8B8NS7Z0MAH3 % ls
console.log		disk.qcow2		guest-rootfs.qcow2	mounts			shared			shim.stderr		sockets
(base) goranka@fengbolins-MacBook-Pro 01KH7X5DH4ZFGP8B8NS7Z0MAH3 % cat shim.stderr
(base) goranka@fengbolins-MacBook-Pro 01KH7X5DH4ZFGP8B8NS7Z0MAH3 % cat console.log
(base) goranka@fengbolins-MacBook-Pro 01KH7X5DH4ZFGP8B8NS7Z0MAH3 %
(base) goranka@fengbolins-MacBook-Pro 01KH7X5DH4ZFGP8B8NS7Z0MAH3 % echo $DYLD_LIBRARY_PATH

(base) goranka@fengbolins-MacBook-Pro 01KH7X5DH4ZFGP8B8NS7Z0MAH3 %

There's NO new generated result(Crash Reports and Diagnostic Reports) in Console App.

@DorianZheng
Copy link
Copy Markdown
Member Author

DorianZheng commented Feb 12, 2026

After running make dev:node and node simplebox.js(the node example you mentioned). The output is down below:

(base) goranka@fengbolins-MacBook-Pro node % node simplebox.js
=== SimpleBox Example ===

   Env count: 59
1. Running basic command...

6. Cleaning up...
   Box stopped and removed.
Error: [Error: engine reported an error: Box 01KH7X5DH4ZFGP8B8NS7Z0MAH3 failed to start

The VM exited unexpectedly.

Common causes:
• AppArmor or SELinux blocking execution
• /dev/kvm permissions (Linux)
• Missing Hypervisor entitlement (macOS)

Debug files:
• Console: /Users/goranka/.boxlite/boxes/01KH7X5DH4ZFGP8B8NS7Z0MAH3/console.log

Tip: Check system logs (dmesg, Console.app)] {
  code: 'GenericFailure'
}
(base) goranka@fengbolins-MacBook-Pro node % cd /Users/goranka/.boxlite/boxes/01KH7X5DH4ZFGP8B8NS7Z0MAH3
(base) goranka@fengbolins-MacBook-Pro 01KH7X5DH4ZFGP8B8NS7Z0MAH3 % ls
console.log		disk.qcow2		guest-rootfs.qcow2	mounts			shared			shim.stderr		sockets
(base) goranka@fengbolins-MacBook-Pro 01KH7X5DH4ZFGP8B8NS7Z0MAH3 % cat shim.stderr
(base) goranka@fengbolins-MacBook-Pro 01KH7X5DH4ZFGP8B8NS7Z0MAH3 % cat console.log
(base) goranka@fengbolins-MacBook-Pro 01KH7X5DH4ZFGP8B8NS7Z0MAH3 %
(base) goranka@fengbolins-MacBook-Pro 01KH7X5DH4ZFGP8B8NS7Z0MAH3 % echo $DYLD_LIBRARY_PATH

(base) goranka@fengbolins-MacBook-Pro 01KH7X5DH4ZFGP8B8NS7Z0MAH3 %

There's NO new generated result(Crash Reports and Diagnostic Reports) in Console App.

Hi @shayne-snap. So sorry for the inconvenience, please run another test

rm -rf ~/.boxlite/images/disk-images/
rm -rf ~/.boxlite/tmp/
make clean
make dev:node
node simplebox.js

The current error message is still not good for diagnosing issues. I will keep on improving it

@shayne-snap
Copy link
Copy Markdown
Contributor

After running these commands

rm -rf ~/.boxlite/images/disk-images/
rm -rf ~/.boxlite/tmp/
make clean
make dev:node

the output is down below:

 node examples/node/simplebox.js
=== SimpleBox Example ===

   Env count: 59
1. Running basic command...

6. Cleaning up...
   Box stopped and removed.
Error: [Error: engine reported an error: Box 01KH80MVHYGVH0FHH61C0P132K failed to start

The VM exited unexpectedly.

Common causes:
• AppArmor or SELinux blocking execution
• /dev/kvm permissions (Linux)
• Missing Hypervisor entitlement (macOS)

Debug files:
• Console: /Users/goranka/.boxlite/boxes/01KH80MVHYGVH0FHH61C0P132K/console.log

Tip: Check system logs (dmesg, Console.app)] {
  code: 'GenericFailure'
}
(base) goranka@fengbolins-MacBook-Pro boxlite % cd  /Users/goranka/.boxlite/boxes/01KH80MVHYGVH0FHH61C0P132K/
(base) goranka@fengbolins-MacBook-Pro 01KH80MVHYGVH0FHH61C0P132K % ls
console.log		disk.qcow2		guest-rootfs.qcow2	mounts			shared			shim.stderr		sockets
(base) goranka@fengbolins-MacBook-Pro 01KH80MVHYGVH0FHH61C0P132K % cat shim.stderr
(base) goranka@fengbolins-MacBook-Pro 01KH80MVHYGVH0FHH61C0P132K % ls
console.log		disk.qcow2		guest-rootfs.qcow2	mounts			shared			shim.stderr		sockets
(base) goranka@fengbolins-MacBook-Pro 01KH80MVHYGVH0FHH61C0P132K % cat console.log
(base) goranka@fengbolins-MacBook-Pro 01KH80MVHYGVH0FHH61C0P132K % cat console.log
(base) goranka@fengbolins-MacBook-Pro 01KH80MVHYGVH0FHH61C0P132K % echo $DYLD_LIBRARY_PATH

(base) goranka@fengbolins-MacBook-Pro 01KH80MVHYGVH0FHH61C0P132K % cd ..
(base) goranka@fengbolins-MacBook-Pro boxes % ls
01KG4SVPZ7HA3G67ETB08B4Y2Q	01KGNSMB8SHPM5VJMKZNMG1ED7	01KGNV70PWBAV4W6ZQEJMRJGPE	01KGNX0X2V5MQT85BEWVH7GTBK	01KGP09NYG3QMNAJP327MMCGQT	01KGQ4NJ042995HT7EAKD61HY6	01KH3D22C4HE7MAMFC808WXD59
01KGGYPMDGGHFR5VFNAEAR5VD6	01KGNT4WJ8F3B78TQHFMSNJMB7	01KGNVATJ26EY28MWADEFSQXKY	01KGNX72W836ZF3R4WVG07ATFD	01KGP0WB9BNRSTM2M757JT8864	01KGQ4W3N58NTTV6TV4CJEH9T0	01KH3DB2K98XZYH78PYTEXF20G
01KGNSGWAMV00ZKAVNTTJX5FPT	01KGNT8RWXTZ3AWR16QTG6R1VE	01KGNVDP5NNTKW05NQ3DTXYK5T	01KGNXXDJBHEWD3306PH7CQFCG	01KGP0X9H1HE9C2KVSH7SHS6MR	01KGQ5603ESSHVQAQX44ME93R1	01KH3DD9S7FDSGMRGA3R914KG0
01KGNSHW5N1J1WACA10ESFJHKE	01KGNTC7QTEY1EK5MNT6HRWAB6	01KGNVJ7MXT9KJN7W06MKZE46Z	01KGNYXT11D78S0K070Q9CXZA1	01KGP1A6Y90WVETYZ122PCA80E	01KGRDRD53MD400NTG2MWFA5JA	01KH80MVHYGVH0FHH61C0P132K
01KGNSK2YC5VTV5YWXT149JNJ9	01KGNTE3KSKTGNSKFB67S021RW	01KGNVYBEY8T11W2Q386CBT6J7	01KGNZX7JKYBY9DB0G0ARK5X2Q	01KGP1BX1DWF9S4D0VH9RDPVE8	01KH3BXQKM0GGF77WJNC5J6NQN
01KGNSKRMFYZF693YXJ7Y9RWR7	01KGNV2DR00XWK2A2B101Y3R1F	01KGNW4SC42DCDD1T6KDWF4RT8	01KGP07F8X0QMZCVFHEK94XMHM	01KGP1JWSB4K5Z8QG4G3ZWMZBY	01KH3CWNJXF4E0YEYMRCEERHFQ
(base) goranka@fengbolins-MacBook-Pro boxes % cd ~/Engineer/ai
(base) goranka@fengbolins-MacBook-Pro ai % ls
CascadeProjects				LanguageExchangeX			claude-code-acp				homebrew-tap				react-native-starter			waylog-cli
ChatGF					OpenVoiceService			cowork					ls					reference				wayway
EnglishPodCastPoster			Server-ChatGF				cursor-chat-browser			mcp-test				sandbox					workflow
Front_LangBit.code-workspace		acp					earthworm				node_modules				scoop-bucket				xtts
FuturePodcast				agents					eary					package-lock.json			tw
FuturePodcastFronted			ai-chatbot-reactnative			eary-api				package.json				virtualgf-gpt
GirlfriendGPT				antigravity-vscode.code-workspace	eary.code-workspace			package7				voice-agent
LangBit					boxlite-labs				helloai					pkg7					voiceassistant
(base) goranka@fengbolins-MacBook-Pro ai % cd boxlite-labs/boxlite
(base) goranka@fengbolins-MacBook-Pro boxlite % ls
AGENTS.md		Cargo.lock		Makefile		boxlite-cli		examples		package-lock.json	rustfmt.toml		target
CLAUDE.md		Cargo.toml		README.md		boxlite-shared		guest			package.json		scripts
CONTRIBUTING.md		LICENSE			boxlite			docs			node_modules		rust-toolchain.toml	sdks
(base) goranka@fengbolins-MacBook-Pro boxlite % node examples/node/simplebox.js
=== SimpleBox Example ===

   Env count: 59
1. Running basic command...

6. Cleaning up...
   Box stopped and removed.
Error: [Error: engine reported an error: Box 01KH80TFQZ016YX6NHM75FVH99 failed to start

The VM exited unexpectedly.

Common causes:
• AppArmor or SELinux blocking execution
• /dev/kvm permissions (Linux)
• Missing Hypervisor entitlement (macOS)

Debug files:
• Console: /Users/goranka/.boxlite/boxes/01KH80TFQZ016YX6NHM75FVH99/console.log

Tip: Check system logs (dmesg, Console.app)] {
  code: 'GenericFailure'
}

@DorianZheng
Copy link
Copy Markdown
Member Author

After running these commands

rm -rf ~/.boxlite/images/disk-images/
rm -rf ~/.boxlite/tmp/
make clean
make dev:node

the output is down below:

 node examples/node/simplebox.js
=== SimpleBox Example ===

   Env count: 59
1. Running basic command...

6. Cleaning up...
   Box stopped and removed.
Error: [Error: engine reported an error: Box 01KH80MVHYGVH0FHH61C0P132K failed to start

The VM exited unexpectedly.

Common causes:
• AppArmor or SELinux blocking execution
• /dev/kvm permissions (Linux)
• Missing Hypervisor entitlement (macOS)

Debug files:
• Console: /Users/goranka/.boxlite/boxes/01KH80MVHYGVH0FHH61C0P132K/console.log

Tip: Check system logs (dmesg, Console.app)] {
  code: 'GenericFailure'
}
(base) goranka@fengbolins-MacBook-Pro boxlite % cd  /Users/goranka/.boxlite/boxes/01KH80MVHYGVH0FHH61C0P132K/
(base) goranka@fengbolins-MacBook-Pro 01KH80MVHYGVH0FHH61C0P132K % ls
console.log		disk.qcow2		guest-rootfs.qcow2	mounts			shared			shim.stderr		sockets
(base) goranka@fengbolins-MacBook-Pro 01KH80MVHYGVH0FHH61C0P132K % cat shim.stderr
(base) goranka@fengbolins-MacBook-Pro 01KH80MVHYGVH0FHH61C0P132K % ls
console.log		disk.qcow2		guest-rootfs.qcow2	mounts			shared			shim.stderr		sockets
(base) goranka@fengbolins-MacBook-Pro 01KH80MVHYGVH0FHH61C0P132K % cat console.log
(base) goranka@fengbolins-MacBook-Pro 01KH80MVHYGVH0FHH61C0P132K % cat console.log
(base) goranka@fengbolins-MacBook-Pro 01KH80MVHYGVH0FHH61C0P132K % echo $DYLD_LIBRARY_PATH

(base) goranka@fengbolins-MacBook-Pro 01KH80MVHYGVH0FHH61C0P132K % cd ..
(base) goranka@fengbolins-MacBook-Pro boxes % ls
01KG4SVPZ7HA3G67ETB08B4Y2Q	01KGNSMB8SHPM5VJMKZNMG1ED7	01KGNV70PWBAV4W6ZQEJMRJGPE	01KGNX0X2V5MQT85BEWVH7GTBK	01KGP09NYG3QMNAJP327MMCGQT	01KGQ4NJ042995HT7EAKD61HY6	01KH3D22C4HE7MAMFC808WXD59
01KGGYPMDGGHFR5VFNAEAR5VD6	01KGNT4WJ8F3B78TQHFMSNJMB7	01KGNVATJ26EY28MWADEFSQXKY	01KGNX72W836ZF3R4WVG07ATFD	01KGP0WB9BNRSTM2M757JT8864	01KGQ4W3N58NTTV6TV4CJEH9T0	01KH3DB2K98XZYH78PYTEXF20G
01KGNSGWAMV00ZKAVNTTJX5FPT	01KGNT8RWXTZ3AWR16QTG6R1VE	01KGNVDP5NNTKW05NQ3DTXYK5T	01KGNXXDJBHEWD3306PH7CQFCG	01KGP0X9H1HE9C2KVSH7SHS6MR	01KGQ5603ESSHVQAQX44ME93R1	01KH3DD9S7FDSGMRGA3R914KG0
01KGNSHW5N1J1WACA10ESFJHKE	01KGNTC7QTEY1EK5MNT6HRWAB6	01KGNVJ7MXT9KJN7W06MKZE46Z	01KGNYXT11D78S0K070Q9CXZA1	01KGP1A6Y90WVETYZ122PCA80E	01KGRDRD53MD400NTG2MWFA5JA	01KH80MVHYGVH0FHH61C0P132K
01KGNSK2YC5VTV5YWXT149JNJ9	01KGNTE3KSKTGNSKFB67S021RW	01KGNVYBEY8T11W2Q386CBT6J7	01KGNZX7JKYBY9DB0G0ARK5X2Q	01KGP1BX1DWF9S4D0VH9RDPVE8	01KH3BXQKM0GGF77WJNC5J6NQN
01KGNSKRMFYZF693YXJ7Y9RWR7	01KGNV2DR00XWK2A2B101Y3R1F	01KGNW4SC42DCDD1T6KDWF4RT8	01KGP07F8X0QMZCVFHEK94XMHM	01KGP1JWSB4K5Z8QG4G3ZWMZBY	01KH3CWNJXF4E0YEYMRCEERHFQ
(base) goranka@fengbolins-MacBook-Pro boxes % cd ~/Engineer/ai
(base) goranka@fengbolins-MacBook-Pro ai % ls
CascadeProjects				LanguageExchangeX			claude-code-acp				homebrew-tap				react-native-starter			waylog-cli
ChatGF					OpenVoiceService			cowork					ls					reference				wayway
EnglishPodCastPoster			Server-ChatGF				cursor-chat-browser			mcp-test				sandbox					workflow
Front_LangBit.code-workspace		acp					earthworm				node_modules				scoop-bucket				xtts
FuturePodcast				agents					eary					package-lock.json			tw
FuturePodcastFronted			ai-chatbot-reactnative			eary-api				package.json				virtualgf-gpt
GirlfriendGPT				antigravity-vscode.code-workspace	eary.code-workspace			package7				voice-agent
LangBit					boxlite-labs				helloai					pkg7					voiceassistant
(base) goranka@fengbolins-MacBook-Pro ai % cd boxlite-labs/boxlite
(base) goranka@fengbolins-MacBook-Pro boxlite % ls
AGENTS.md		Cargo.lock		Makefile		boxlite-cli		examples		package-lock.json	rustfmt.toml		target
CLAUDE.md		Cargo.toml		README.md		boxlite-shared		guest			package.json		scripts
CONTRIBUTING.md		LICENSE			boxlite			docs			node_modules		rust-toolchain.toml	sdks
(base) goranka@fengbolins-MacBook-Pro boxlite % node examples/node/simplebox.js
=== SimpleBox Example ===

   Env count: 59
1. Running basic command...

6. Cleaning up...
   Box stopped and removed.
Error: [Error: engine reported an error: Box 01KH80TFQZ016YX6NHM75FVH99 failed to start

The VM exited unexpectedly.

Common causes:
• AppArmor or SELinux blocking execution
• /dev/kvm permissions (Linux)
• Missing Hypervisor entitlement (macOS)

Debug files:
• Console: /Users/goranka/.boxlite/boxes/01KH80TFQZ016YX6NHM75FVH99/console.log

Tip: Check system logs (dmesg, Console.app)] {
  code: 'GenericFailure'
}

Hi @shayne-snap. I have spent some time optimizing the error message a little bit #240. Can you update to the latest code and try above command again

@shayne-snap
Copy link
Copy Markdown
Contributor

shayne-snap commented Feb 12, 2026

Hi. Sorry for the late reply. It took a while to redownload everything(I have to use VPN). I updated to the latest code, and ran the commands to remove the old stuff. Here's the output down below:

node examples/node/fix.js
=== SimpleBox Example ===

   Env count: 59
1. Running basic command...

6. Cleaning up...
   Box stopped and removed.
Error: [Error: engine reported an error: Box 01KH8JBV3NJZ3XCF7VS1T2W5AP failed to start

Exit code: 0

Debug files:
• Console: /Users/goranka/.boxlite/boxes/01KH8JBV3NJZ3XCF7VS1T2W5AP/console.log
• Stderr: /Users/goranka/.boxlite/boxes/01KH8JBV3NJZ3XCF7VS1T2W5AP/shim.stderr

System logs: dmesg (Linux), Console.app (macOS)] {
  code: 'GenericFailure'
}
(base) goranka@fengbolins-MacBook-Pro boxlite % cat /Users/goranka/.boxlite/boxes/01KH8JBV3NJZ3XCF7VS1T2W5AP/shim.stderr
(base) goranka@fengbolins-MacBook-Pro boxlite % cat /Users/goranka/.boxlite/boxes/01KH8JBV3NJZ3XCF7VS1T2W5AP/console.log
(base) goranka@fengbolins-MacBook-Pro boxlite % ls -al /Users/goranka/.boxlite/boxes/01KH8JBV3NJZ3XCF7VS1T2W5AP
total 1024
drwxr-xr-x@  9 goranka  staff     288 Feb 12 17:19 .
drwxr-xr-x@ 42 goranka  staff    1344 Feb 12 17:19 ..
-rw-r--r--@  1 goranka  staff       0 Feb 12 17:19 console.log
-rw-r--r--@  1 goranka  staff  262144 Feb 12 17:19 disk.qcow2
-rw-r--r--@  1 goranka  staff  262144 Feb 12 17:19 guest-rootfs.qcow2
drwxr-xr-x@  3 goranka  staff      96 Feb 12 17:19 mounts
drwxr-xr-x@  2 goranka  staff      64 Feb 12 17:19 shared
-rw-r--r--@  1 goranka  staff       0 Feb 12 17:19 shim.stderr
drwxr-xr-x@  4 goranka  staff     128 Feb 12 17:19 sockets
(base) goranka@fengbolins-MacBook-Pro boxlite % echo $DYLD_LIBRARY_PATH

(base) goranka@fengbolins-MacBook-Pro boxlite % git logs
git: 'logs' is not a git command. See 'git --help'.

The most similar command is
	log
(base) goranka@fengbolins-MacBook-Pro boxlite % git log
commit 28b72d04230b5a11979e9e406473fb0fc83f4963 (HEAD, upstream/main, upstream/HEAD)
Author: dorianzheng <[email protected]>
Date:   Thu Feb 12 16:31:01 2026 +0800

    refactor(crash): extract ProcessMonitor and improve crash diagnostics (#240)

    - Add ProcessMonitor abstraction for waitpid-based process liveness detection
    - Capture stderr to file BEFORE subprocess spawn (catches pre-main dyld errors)
    - Pass BoxFilesystemLayout through spawn chain (DRY - no redundant recreation)
    - Remove stderr from ExitInfo::Signal (CrashReport reads directly from file)
    - Simplify CrashCapture::install() to only take exit_file parameter

    The ProcessMonitor encapsulates the Unix parent/child constraint for waitpid,
    handling both owned (spawned) and attached (reconnected) process modes with
    explicit ProcessExit::Code vs ProcessExit::Unknown return types.

./target/debug/boxlite run --rm $(printenv | sed 's/=.*//;s/^/-e /' | tr '\n' ' ') docker.io/library/alpine:latest echo ok

System logs: dmesg (Linux), Console.app (macOS) box_id=01KH8JJC681JEJ6YH4MCVE46JA task=guest_connect
2026-02-12T09:23:03.722996Z  WARN boxlite::litebox::init::types: Box initialization failed, cleaning up
2026-02-12T09:23:03.723056Z ERROR boxlite::litebox::init::types: Box crashed. Diagnostic files preserved at:
  /Users/goranka/.boxlite/boxes/01KH8JJC681JEJ6YH4MCVE46JA

To clean up: rm -rf /Users/goranka/.boxlite/boxes/01KH8JJC681JEJ6YH4MCVE46JA
Error: engine reported an error: Box 01KH8JJC681JEJ6YH4MCVE46JA failed to start

Exit code: 0

Debug files:
• Console: /Users/goranka/.boxlite/boxes/01KH8JJC681JEJ6YH4MCVE46JA/console.log
• Stderr: /Users/goranka/.boxlite/boxes/01KH8JJC681JEJ6YH4MCVE46JA/shim.stderr

System logs: dmesg (Linux), Console.app (macOS)
(base) goranka@fengbolins-MacBook-Pro boxlite % cat /Users/goranka/.boxlite/boxes/01KH8JJC681JEJ6YH4MCVE46JA/console.log
(base) goranka@fengbolins-MacBook-Pro boxlite % cat /Users/goranka/.boxlite/boxes/01KH8JJC681JEJ6YH4MCVE46JA/shim.stderr

@DorianZheng
Copy link
Copy Markdown
Member Author

Hi. Sorry for the late reply. It took a while to redownload everything(I have to use VPN). I updated to the latest code, and ran the commands to remove the old stuff. Here's the output down below:

node examples/node/fix.js
=== SimpleBox Example ===

   Env count: 59
1. Running basic command...

6. Cleaning up...
   Box stopped and removed.
Error: [Error: engine reported an error: Box 01KH8JBV3NJZ3XCF7VS1T2W5AP failed to start

Exit code: 0

Debug files:
• Console: /Users/goranka/.boxlite/boxes/01KH8JBV3NJZ3XCF7VS1T2W5AP/console.log
• Stderr: /Users/goranka/.boxlite/boxes/01KH8JBV3NJZ3XCF7VS1T2W5AP/shim.stderr

System logs: dmesg (Linux), Console.app (macOS)] {
  code: 'GenericFailure'
}
(base) goranka@fengbolins-MacBook-Pro boxlite % cat /Users/goranka/.boxlite/boxes/01KH8JBV3NJZ3XCF7VS1T2W5AP/shim.stderr
(base) goranka@fengbolins-MacBook-Pro boxlite % cat /Users/goranka/.boxlite/boxes/01KH8JBV3NJZ3XCF7VS1T2W5AP/console.log
(base) goranka@fengbolins-MacBook-Pro boxlite % ls -al /Users/goranka/.boxlite/boxes/01KH8JBV3NJZ3XCF7VS1T2W5AP
total 1024
drwxr-xr-x@  9 goranka  staff     288 Feb 12 17:19 .
drwxr-xr-x@ 42 goranka  staff    1344 Feb 12 17:19 ..
-rw-r--r--@  1 goranka  staff       0 Feb 12 17:19 console.log
-rw-r--r--@  1 goranka  staff  262144 Feb 12 17:19 disk.qcow2
-rw-r--r--@  1 goranka  staff  262144 Feb 12 17:19 guest-rootfs.qcow2
drwxr-xr-x@  3 goranka  staff      96 Feb 12 17:19 mounts
drwxr-xr-x@  2 goranka  staff      64 Feb 12 17:19 shared
-rw-r--r--@  1 goranka  staff       0 Feb 12 17:19 shim.stderr
drwxr-xr-x@  4 goranka  staff     128 Feb 12 17:19 sockets
(base) goranka@fengbolins-MacBook-Pro boxlite % echo $DYLD_LIBRARY_PATH

(base) goranka@fengbolins-MacBook-Pro boxlite % git logs
git: 'logs' is not a git command. See 'git --help'.

The most similar command is
	log
(base) goranka@fengbolins-MacBook-Pro boxlite % git log
commit 28b72d04230b5a11979e9e406473fb0fc83f4963 (HEAD, upstream/main, upstream/HEAD)
Author: dorianzheng <[email protected]>
Date:   Thu Feb 12 16:31:01 2026 +0800

    refactor(crash): extract ProcessMonitor and improve crash diagnostics (#240)

    - Add ProcessMonitor abstraction for waitpid-based process liveness detection
    - Capture stderr to file BEFORE subprocess spawn (catches pre-main dyld errors)
    - Pass BoxFilesystemLayout through spawn chain (DRY - no redundant recreation)
    - Remove stderr from ExitInfo::Signal (CrashReport reads directly from file)
    - Simplify CrashCapture::install() to only take exit_file parameter

    The ProcessMonitor encapsulates the Unix parent/child constraint for waitpid,
    handling both owned (spawned) and attached (reconnected) process modes with
    explicit ProcessExit::Code vs ProcessExit::Unknown return types.

./target/debug/boxlite run --rm $(printenv | sed 's/=.*//;s/^/-e /' | tr '\n' ' ') docker.io/library/alpine:latest echo ok

System logs: dmesg (Linux), Console.app (macOS) box_id=01KH8JJC681JEJ6YH4MCVE46JA task=guest_connect
2026-02-12T09:23:03.722996Z  WARN boxlite::litebox::init::types: Box initialization failed, cleaning up
2026-02-12T09:23:03.723056Z ERROR boxlite::litebox::init::types: Box crashed. Diagnostic files preserved at:
  /Users/goranka/.boxlite/boxes/01KH8JJC681JEJ6YH4MCVE46JA

To clean up: rm -rf /Users/goranka/.boxlite/boxes/01KH8JJC681JEJ6YH4MCVE46JA
Error: engine reported an error: Box 01KH8JJC681JEJ6YH4MCVE46JA failed to start

Exit code: 0

Debug files:
• Console: /Users/goranka/.boxlite/boxes/01KH8JJC681JEJ6YH4MCVE46JA/console.log
• Stderr: /Users/goranka/.boxlite/boxes/01KH8JJC681JEJ6YH4MCVE46JA/shim.stderr

System logs: dmesg (Linux), Console.app (macOS)
(base) goranka@fengbolins-MacBook-Pro boxlite % cat /Users/goranka/.boxlite/boxes/01KH8JJC681JEJ6YH4MCVE46JA/console.log
(base) goranka@fengbolins-MacBook-Pro boxlite % cat /Users/goranka/.boxlite/boxes/01KH8JJC681JEJ6YH4MCVE46JA/shim.stderr

Got it. Let me check

@shayne-snap
Copy link
Copy Markdown
Contributor

shayne-snap commented Feb 12, 2026

I accidentally passed process.env to Node SDK by SimpleBox

Actually, Most developers and me dont need to pass the whole process.env. The normal SimpleBox.js example(without process.env) works on my laptop. It was an accidental test.

@DorianZheng
Copy link
Copy Markdown
Member Author

I accidentally passed process.env to Node SDK by SimpleBox

Actually, Most developers and me dont need to pass the whole process.env. The normal SimpleBox.js example(without process.env) works on my laptop. It was an accidental test.

@shayne-snap Would you mind using a binary search approach to isolate which environment introduced this issue?
According to the report, boxlite-shim exits silently with exit_code = 0, which seems unusual. I’m not sure where to start🥲—any help would be appreciated.

@shayne-snap
Copy link
Copy Markdown
Contributor

shayne-snap commented Feb 12, 2026

@DorianZheng Given that this pull request have already fixed the env vars number is too big issue and the solution works both for you and @uran0sH . It's a low priority task. We can fix it later.

I'll try to explore the root cause on my computer and ask for help when I need. How about that?

@DorianZheng
Copy link
Copy Markdown
Member Author

@DorianZheng Given that this pull request have already fixed the env vars number is too big issue and the solution works both for you and @uran0sH . It's a low priority task. We can fix it later.

I'll try to explore the root cause on my computer and ask for help when I need. How about that?

Sounds perfect! Thanks again for all the testing. Ping me in the future whenever you find anything 🥰

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Box fails to start when passing my host env vars:Timeout waiting for guest ready (30s)

2 participants