Bugfix: Computer Use 500: VM init crashes with kernel panic — three ...

Documentation for Sessions

🐛 Bugfix: Computer Use 500: VM init crashes with kernel panic — three ...

Date: 2026-03-05
Time: 17:05:47 UTC
Session: gspace1-177.6
Agent: angular
Confidence: 98%
Status: ✅ Documented


📋 Decision Context

Question:

Computer Use 500: VM init crashes with kernel panic — three root causes found and fixed

Task: Not specified


🎯 Decision Made

Chosen:

Three cascading bugs: (1) vm-init.sh used process substitution before /proc mount — /dev/fd missing → bash exit → kernel panic. Fix: mount proc+devtmpfs first, create /dev/fd symlink. (2) vm-network.sh had set -e but kernel ip= already configured network — ip addr add failed with RTNETLINK File exists → exit 2 → kernel panic. Fix: removed set -e, added || fallback. (3) Kernel 4.14.174 has no entropy in Firecracker VM — getrandom() blocks forever for sshd/dbus/Chrome. Fix: replaced with kernel 5.10.0 + random.trust_cpu=on boot arg + virtio-rng entropy device in Firecracker config. Also added diagnostic /health vmPrerequisites and pre-flight fs.existsSync checks.

Options Considered:


💭 Reasoning

Systematic debugging traced: frontend 500 → SelfHostedProvider POST /sandboxes → SandboxController → SandboxManager.create → FirecrackerService.startVM → VmExecutor.waitForReady timeout. Manual Firecracker boot with console output revealed 3 sequential bugs. Each fix was verified independently. The kernel entropy issue was the deepest: kernel 4.14 CRNG never reaches crng_init=2 in a minimal VM. Kernel 5.10 with random.trust_cpu=on shows 'crng done (trusting CPU manufacturer)' at 29ms. End-to-end verified: POST /sandboxes returns status:running in production.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation