eve
eve copied to clipboard
TestDnsResolve and goroutinesMonitor failures with make build
Please provide information requested in the template below as much as possible.
Describe the bug
'make test' consistently failing in my environment.
Recent release
[12.6.0] - 2 failures [13.4.2-lts] - 1 failure [14.5.0-rc4] - 2 failures
Duplicate
N/A
How to reproduce
make test
[12.6.0] [13.4.2-lts] [14.5.0-rc4]
Expected behavior
Passing tests consistently - consistent failure in my environment, while other devs unable to reproduce.
Error message
12.6.0 and 14.5.0-rc4
=== Failed
=== FAIL: cmd/watcher TestGoroutinesMonitorUpdateParamsKeepStatsDecrease (2.98s)
watcher_test.go:409: Expected log output to contain 'Removing 720 oldest entries', but got '{"file":"/pillar/cmd/watcher/watcher.go:439","func":"github.com/lf-edge/eve/pkg/pillar/cmd/watcher.goroutinesMonitor","level":"debug","msg":"Starting goroutines monitor (stoppable: true)","pid":19600,"source":"watcher","time":"2025-06-11T07:23:32.121548346Z"}
{"file":"/pillar/cmd/watcher/watcher.go:448","func":"github.com/lf-edge/eve/pkg/pillar/cmd/watcher.goroutinesMonitor","level":"debug","msg":"Stopping goroutines monitor","pid":19600,"source":"watcher","time":"2025-06-11T07:23:32.121811471Z"}
{"file":"/pillar/cmd/watcher/watcher.go:456","func":"github.com/lf-edge/eve/pkg/pillar/cmd/watcher.goroutinesMonitor","level":"debug","msg":"Resizing stats slice to 720","pid":19600,"source":"watcher","time":"2025-06-11T07:23:35.002837791Z"}
{"file":"/pillar/cmd/watcher/watcher.go:458","func":"github.com/lf-edge/eve/pkg/pillar/cmd/watcher.goroutinesMonitor","level":"debug","msg":"Removing 687 oldest entries","pid":19600,"source":"watcher","time":"2025-06-11T07:23:35.003104833Z"}
'
=== FAIL: devicenetwork TestDnsResolve (30.00s)
panic: dns exchange failed: read udp 172.17.0.3:44722->1.1.1.1:53: i/o timeout [recovered]
panic: dns exchange failed: read udp 172.17.0.3:44722->1.1.1.1:53: i/o timeout
goroutine 53 [running]:
testing.tRunner.func1.2({0x1545ac0, 0xc0005a6190})
/usr/lib/go/src/testing/testing.go:1734 +0x2bc
testing.tRunner.func1()
/usr/lib/go/src/testing/testing.go:1737 +0x47c
panic({0x1545ac0?, 0xc0005a6190?})
/usr/lib/go/src/runtime/panic.go:792 +0x124
github.com/lf-edge/eve/pkg/pillar/devicenetwork_test.TestDnsResolve(0xc0006a6fc0)
/pillar/devicenetwork/dns_test.go:134 +0x3ac
testing.tRunner(0xc0006a6fc0, 0x17e6ed8)
/usr/lib/go/src/testing/testing.go:1792 +0x184
created by testing.(*T).Run in goroutine 1
/usr/lib/go/src/testing/testing.go:1851 +0x688
13.4.2-lts
=== Failed
=== FAIL: devicenetwork TestDnsResolve (30.03s)
Additional context
Add any other information about the problem here.
This is most likely a networking issue on your side rather than a bug in the code. You can try to run tcpdump simultaneously while running the test to confirm if DNS request is sent and whether any response is received. In my case:
$ sudo tcpdump -i any -n "port 53"
tcpdump: data link type LINUX_SLL2
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on any, link-type LINUX_SLL2 (Linux cooked v2), snapshot length 262144 bytes
12:09:45.163018 wlp0s20f3 Out IP 10.10.10.102.49709 > 1.1.1.1.53: 6971+ A? 255.255.255.255.nip.io. (40)
12:09:45.208141 wlp0s20f3 In IP 1.1.1.1.53 > 10.10.10.102.49709: 6971 1/0/0 A 255.255.255.255 (56)