Skip to content

VM hangs permanently after host network drop: virtio_net TX timeout, no auto-recovery #2802

Open

Description

@phquand2000

Describe the bug

The Linux VM's virtio_net TX queue stalls after the host network becomes unreachable. It never recovers on its own. The VM stays hung for ~2 days until OrbStack is stopped and started manually.

Timeline (UTC+7, Nov 13):

  • 16:42:57: vmgr logs a burst of UDP dial failed ... connect: network is unreachable (port 3478)
  • ~16:43: kernel starts logging NETDEV WATCHDOG: transmit queue 0 timed out every ~5s
  • 16:45 onward: vmgr logs sampling stacks due to VM hang every ~2 min (868 times in that log file)
  • Docker, Kubernetes (TLS handshake timeout on :26443) and host-unix forward to the VM all time out
  • vCPUs are idle (cpu_do_idle) in the sampled stacks, so it is not a CPU or memory hang
  • No OOM, hung-task or lockup messages. Host memory was ~89% free.
  • orb stop + orb start fixed it. No further watchdog lines after restart.

Excerpt:

👾 kernel | [ 9652.674397] virtio_net virtio9 eth0: NETDEV WATCHDOG: CPU: 3: transmit queue 0 timed out 5001 ms
👾 kernel | [ 9657.759590] virtio_net virtio9 eth0: NETDEV WATCHDOG: CPU: 3: transmit queue 0 timed out 10086 ms
👾 kernel | [ 9662.879979] virtio_net virtio9 eth0: NETDEV WATCHDOG: CPU: 3: transmit queue 0 timed out 15206 ms
👾 kernel | [ 9652.674435] virtio_net virtio9 eth0: TX timeout on queue: 0, sq: output.0, vq: 0x1, name: output.0, 5001000 usecs ago
🌲 vmgr | time="11-13 16:45:20" level=warning msg="sampling stacks due to VM hang"
🌲 vmgr | time="11-13 16:47:28" level=warning msg="sampling stacks due to VM hang"
🌲 vmgr | time="11-13 16:45:20" level=error msg="health check failed" error="Post \"http://vcontrol/disk/report_stats\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)"
🌲 vmgr | time="11-13 16:47:28" level=error msg="health check failed" error="Post \"http://vcontrol/disk/report_stats\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)"
🌲 vmgr | time="11-13 17:30:23" level=error msg="host-unix forward: dial failed" addr="{1 0.250.250.2 2375 }" error="context deadline exceeded"
🌲 vmgr | time="11-13 16:42:57" level=error msg="UDP dial failed: dial udp 209.177.145.118:3478: connect: network is unreachable"

Possibly related to #1933 (hang after network change / sleep-wake), but that report has no virtio_net TX timeout.

To Reproduce

Not deterministic. It happened after a host network drop (network is unreachable). The Mac had been up 6+ days, Kubernetes was enabled, and ~10 containers were running.

Expected behavior

The VM network recovers after the host network returns, or vmgr restarts the VM or NIC when it detects the hang. A VM hang that repeats for hours should not need a manual restart.

Diagnostic report (REQUIRED)

OrbStack info:
Version: 2.2.5 (2020500)
Commit: bf842321f95fc3ca7cda3227bf0cd41cb188c471 (v2.2.5)

System info:
macOS: 15.8.1
CPU: arm64 (Apple M1 Max)

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions