From 0abd37f70de4fa83da27d32cc37f75c961bed419 Mon Sep 17 00:00:00 2001 From: "Jiao, Joey" Date: Wed, 14 May 2025 10:21:28 +0800 Subject: [PATCH] pkg/ifaceprobe: note error only when res.Err is not null Seeing iface-probe run exits abnormally: ``` [FATAL] interface probing failed: failed to execute prog: %!w() (Crashed) r0 = openat(0xffffffffffffff9c, &(0x7f0000000080)='/sys/devices/pci0000:00/0000:00:01.1/ ata1/host0/target0:0:0/0:0:0:0/block/sda/queue/scheduler', 0x1, 0x0) write(r0, &(0x7f0000000100)=' ', 0x1) exit status 1 ``` The node to have this `%!w(nil>) (Crashed)` is random, but continue when res.Err is null bypass the problem. --- pkg/ifaceprobe/ifaceprobe.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/ifaceprobe/ifaceprobe.go b/pkg/ifaceprobe/ifaceprobe.go index c5bb6363943d..436f0b09f02c 100644 --- a/pkg/ifaceprobe/ifaceprobe.go +++ b/pkg/ifaceprobe/ifaceprobe.go @@ -217,8 +217,10 @@ func (pr *prober) submitFile(file string) { for _, req := range reqs { res := req.Wait(pr.ctx) if res.Status != queue.Success { - pr.noteError(fmt.Errorf("failed to execute prog: %w (%v)\n%s\n%s", - res.Err, res.Status, req.Prog.Serialize(), res.Output)) + if res.Err != nil { + pr.noteError(fmt.Errorf("failed to execute prog: %w (%v)\n%s\n%s", + res.Err, res.Status, req.Prog.Serialize(), res.Output)) + } continue } desc.results = append(desc.results, res)