[Bug] nvpair-node-scanner causes macOS kernel panics (userspace_watchdog_timeout) due to aggressive net.Interfaces() polling
维护者通常 5 天内回复
@sherief-nv 已经在做这个了。
开始于 2026年9月11日。
评估
这个 Issue 还没有评估数据。
描述
System Information
- OS: macOS (Apple Silicon / arm64)
- Component:
nvpair-node-scanner/shared/discovery - Symptom: Entire system freezes and reboots with a
userspace_watchdog_timeoutkernel panic.
Description
When running the PAIR macOS application, the system will randomly freeze and trigger a forced watchdog reboot. Analyzing the Apple Diagnostic Reports (/Library/Logs/DiagnosticReports/configd_*.spin) reveals that Apple's core network configuration daemon (configd) gets starved while waiting for a kernel read-write lock (krwlock).
The macOS crash logs explicitly show that this kernel lock is being held by nvpair-node-scanner:
*1 ??? (kernel.release.t6050 + 773428) [0xfffffe000b4a8d34] (blocked by krwlock for reading owned by nvpair-node-scanner [1309] [unique pid 791059] thread 0x6fa35b) 2
Root Cause Analysis
The root cause stems from the Windows mDNS workaround in services/shared/discovery/discovery.go.
The Browse loop executes every 5 seconds. Within this loop, sendMulticastQuery() is called to bypass a Windows-specific bug where grandcat/zeroconf drops UDP packets due to multicast bindings. However, sendMulticastQuery() executes unconditionally on all operating systems.
func sendMulticastQuery(service, domain string) map[string]bool {
// ...
ifaces, err := net.Interfaces()
// ...
// Iterates through all interfaces, binding and closing UDP sockets
On macOS, calling net.Interfaces() and rapidly binding/closing raw UDP sockets on every valid interface every 5 seconds inside a background daemon causes severe kernel routing table lock contention (krwlock). Over time, this starves configd, triggering the userspace_watchdog_timeout panic.
As the source comment itself notes, standard zeroconf receive/transmit works perfectly on macOS/Linux. This custom per-interface UDP barrage is only necessary on Windows.
Proposed Fix
Guarding the sendMulticastQuery() function so that it only executes on Windows completely eradicates the kernel panics on macOS, while preserving standard zeroconf discovery.
Patch for services/shared/discovery/discovery.go:
import "runtime"
// ...
func sendMulticastQuery(service, domain string) map[string]bool {
outcomes := make(map[string]bool)
// FIX: Restrict the socket workaround to Windows to prevent macOS krwlock starvation
if runtime.GOOS != "windows" {
return outcomes
}
msg := new(dns.Msg)
// ... rest of the function ...
}
We have compiled and deployed this patch locally across our macOS cluster, and it immediately resolved the panics. We highly recommend upstreaming this guard to prevent other macOS users from experiencing severe system reboots.
- 主要语言
- Go
- 星标
- 1.6k
- 派生
- 266
- 平均合并
- 3 天 15 小时
- 30 天内合并 PR
- 23
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
NVIDIA/Personal-AI-Router 的其他 Issue
-
enhancement
难度 4/5 一周以上 新手友好度 12/100
NVIDIA/Personal-AI-Router#162 ·
维护者通常 5 天内回复
-
enhancement
难度 4/5 3-5 天 新手友好度 25/100
NVIDIA/Personal-AI-Router#154 · 1 条评论 ·
维护者通常 5 天内回复
-
[Feature]: [Ollama] Alert the user about model pull failures可能已有人在做 @ckelseynv 于 2 天前认领。 未关闭enhancement
难度 3/5 1-2 天 新手友好度 56/100
NVIDIA/Personal-AI-Router#152 · 1 条评论 · 已指派 1 人 ·
维护者通常 5 天内回复
-
[Bug]: /v1/responses bypasses model-owner filtering in the Ollama proxy可能已有人在做 @ilaigold 于 3 天前认领。 未关闭
难度 3/5 半天 新手友好度 84/100
NVIDIA/Personal-AI-Router#146 ·
维护者通常 5 天内回复
-
Make model download cancellation asynchronous可能已有人在做 @ckelseynv 于 19 天前认领。 未关闭enhancement
NVIDIA/Personal-AI-Router#115 · 已指派 1 人 ·
维护者通常 5 天内回复
查看 NVIDIA/Personal-AI-Router 的全部 Issue
相似的 Issue
-
agent-butler-finding chore
难度 2/5 1-3 小时 新手友好度 78/100
jordansmall/spindrift#5128 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 84/100
维护者通常 2 天内回复
-
License GOtome under Apache 2.0 instead of AGPL-3.0可能已有人在做 @praetorianer777 今天认领。 未关闭area:workflow documentation
难度 2/5 1-3 小时 新手友好度 84/100
praetorianer777/GoTome#212 ·
维护者通常 1 天内回复
-
ci: pin Go version in Build and Unit Test workflows (>=1.26.6 floats to 1.27.2 and breaks golangci-lint)可能已有人在做 @leninmehedy 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 87/100
hashgraph/solo-weaver#1255 ·
维护者通常 1 天内回复
-
area/infra backlog type/chore
难度 2/5 1-3 小时 新手友好度 76/100
praetorianer777/Stator#374 ·
维护者通常 1 天内回复