Fix AMD GPU false detection, blackbox deadlock, and NOGPU build bloat
- sat.go: DetectGPUVendor lspci fallback now checks GPU device classes ([0300]/[0302]/[0380]) per line instead of scanning the whole output for vendor name; AMD EPYC servers have dozens of AMD-branded PCIe entries (Root Complex, IOMMU, Host Bridge) that were triggering the old check - blackbox.go: fix deadlock in finishCycle — it held w.mu while calling persistState(), which acquires rt.mu then re-acquires w.mu inside persistStateLocked(); now w.mu is released before persistState() - build.sh: remove NVIDIA-specific overlay files (bee-gpu-burn, bee-john-gpu-stress, bee-nccl-gpu-stress, bee-nvidia-recover, bee-dcgmproftester-staggered, bee-check-nvswitch, nvidia-fabricmanager.service.d/) for non-nvidia build variants - bee-selfheal: gate NVIDIA recovery on BEE_GPU_VENDOR=nvidia so the script does not attempt to restart bee-nvidia.service on NOGPU builds Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -182,9 +182,16 @@ func (s *System) DetectGPUVendor() string {
|
||||
return "amd"
|
||||
}
|
||||
if raw, err := exec.Command("lspci", "-nn").Output(); err == nil {
|
||||
text := strings.ToLower(string(raw))
|
||||
if strings.Contains(text, "advanced micro devices") || strings.Contains(text, "amd/ati") {
|
||||
return "amd"
|
||||
// Only match AMD GPU device classes [0300]=VGA, [0302]=3D controller, [0380]=Display.
|
||||
// AMD CPUs also appear in lspci as "Advanced Micro Devices" (Root Complex, IOMMU, etc.)
|
||||
// so matching vendor alone causes false positives on AMD CPU servers without GPUs.
|
||||
for _, line := range strings.Split(strings.ToLower(string(raw)), "\n") {
|
||||
if !strings.Contains(line, "advanced micro devices") && !strings.Contains(line, "amd/ati") {
|
||||
continue
|
||||
}
|
||||
if strings.Contains(line, "[0300]") || strings.Contains(line, "[0302]") || strings.Contains(line, "[0380]") {
|
||||
return "amd"
|
||||
}
|
||||
}
|
||||
}
|
||||
return ""
|
||||
|
||||
Reference in New Issue
Block a user