2026-03-03 — debugging war story
Deploying a Bun app to a Proxmox VM. Everything works locally. On the VM:
panic(main thread): Segmentation fault at address 0x419E4000000
CPU lacks AVX support. Please consider upgrading to a newer CPU.
RSS: 15.96 GB. Peak: 7.93 GB. Bun's JIT compiler tried to eat the whole VM alive before dying.
- Bundled the app into a single 8MB JS file → same crash, 16GB RSS
- Ran from source with
bun --smol→ hangs, no output, then segfault - Increased VM RAM from 4GB to 8GB → same crash, just took longer
- Tried
--compilestandalone binary → still needs AVX at runtime - Considered rewriting the server to run on Node.js instead of Bun
~15-20 rounds of SSH commands, reading crash logs, trying flags. Claude Opus context window growing fatter each round.
Estimated burn: ~300K input tokens + ~30K output tokens = ~$6.75 USD.
# Check host CPU — AVX is there
grep -o 'avx[^ ]*' /proc/cpuinfo | head -2
# avx
# avx2
# Check VM config — no CPU type set (defaults to kvm64, no AVX passthrough)
qm config 102 | grep cpu
# (empty)
# The $6.75 command
qm set 102 --cpu host
qm stop 102 && qm start 102One command. Proxmox defaults VM CPU to kvm64 which strips out AVX/AVX2/SSE4.2 — doesn't pass through host CPU features. Setting --cpu host passes everything through.
After restart:
$ grep -o 'avx[^ ]*' /proc/cpuinfo | head -2
avx
avx2
$ bun --version
1.3.10
$ systemctl --user status my-app
● Active: active (running)
Memory: 52.2M
52 MB. Not 16 GB. Works perfectly.
When your runtime segfaults on a VM with "CPU lacks AVX support" — don't debug the runtime. Check qm config first.
Proxmox CPU types that pass AVX:
host— pass through all host CPU features (easiest, use this for dedicated VMs)x86-64-v3— guarantees AVX/AVX2 (better for migration between hosts)
Proxmox CPU types that DON'T have AVX:
kvm64(default) — minimal feature setqemu64— also minimalx86-64-v2— SSE4.2 yes, AVX no
| Runtime | AVX Required | Notes |
|---|---|---|
| Bun | Yes | JIT compiler uses AVX. Segfaults without it. |
| Node.js | No | Works on kvm64. V8 has non-AVX fallbacks. |
| Deno | No | V8-based, same as Node. |
If you can't change the VM CPU type, use Node.js. If you control the hypervisor, just set --cpu host and move on.
$6.75 in AI tokens to learn one qm set command. At least now you don't have to.