Bugfix: Session 177 Bug 2: Why does VM kernel panic after network co...

Documentation for Sessions

🐛 Bugfix: Session 177 Bug 2: Why does VM kernel panic after network co...

Date: 2026-03-05
Time: 17:11:44 UTC
Session: gspace1-178.9
Agent: architecture
Confidence: 97%
Status: ✅ Documented


📋 Decision Context

Question:

Session 177 Bug 2: Why does VM kernel panic after network configuration step?

Task: Not specified


🎯 Decision Made

Chosen:

vm-network.sh had set -e but kernel ip= boot parameter already auto-configured eth0. When script ran ip addr add with same IP, RTNETLINK returned 'File exists' (exit code 2) → set -e killed script → PID 1 died → kernel panic. Fix: removed set -e from vm-network.sh, added fallback handlers that log 'IP already assigned, skipping' and 'Default route already exists, skipping'.

Options Considered:


💭 Reasoning

Console showed exitcode=0x00000200 (exit 2 = 'file exists' from ip addr add). The kernel's ip= parameter format ip=IP::GW:MASK::DEV:off configures the network at kernel level before init runs. The :off suffix was supposed to prevent auto-configuration but kernel 4.14/5.10 both auto-configure anyway (IP-Config: Complete shown in kernel log). With set -e active, the redundant ip addr add kills the script. This pattern (set -e in init scripts) is an anti-pattern for PID 1 — any transient failure kills the VM. Early warning: any VM init script with set -e is a ticking bomb.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation