directpv
directpv copied to clipboard
test: failure in UEventListener
Describe the bug
--- PASS: TestListDrives (0.00s)
=== RUN TestUEventListener
panic: test timed out after 10m0s
goroutine 23 [running]:
testing.(*M).startAlarm.func1()
/opt/hostedtoolcache/go/1.18.5/x64/src/testing/testing.go:2029 +0x8e
created by time.goFunc
/opt/hostedtoolcache/go/1.18.5/x64/src/time/sleep.go:176 +0x32
goroutine 1 [chan receive, 10 minutes]:
testing.(*T).Run(0xc00011cb60, {0x154381c?, 0x512185?}, 0x1607820)
/opt/hostedtoolcache/go/1.18.5/x64/src/testing/testing.go:1487 +0x37a
testing.runTests.func1(0xc0005303f0?)
/opt/hostedtoolcache/go/1.18.5/x64/src/testing/testing.go:1839 +0x6e
testing.tRunner(0xc00011cb60, 0xc00015dcd8)
/opt/hostedtoolcache/go/1.18.5/x64/src/testing/testing.go:1439 +0x102
testing.runTests(0xc000364960?, {0x212b300, 0x16, 0x16}, {0x7fa0563b35b8?, 0x40?, 0x21[420](https://github.com/minio/directpv/actions/runs/3055648228/jobs/4928934980#step:7:421)40?})
/opt/hostedtoolcache/go/1.18.5/x64/src/testing/testing.go:1837 +0x457
testing.(*M).Run(0xc000364960)
/opt/hostedtoolcache/go/1.18.5/x64/src/testing/testing.go:1719 +0x5d9
main.main()
_testmain.go:89 +0x1aa
goroutine 21 [chan receive, 10 minutes]:
github.com/minio/directpv/pkg/uevent.(*eventQueue).pop(0xc0004c2c90)
/home/runner/work/directpv/directpv/pkg/uevent/queue.go:100 +0x51
github.com/minio/directpv/pkg/uevent.TestUEventListener(0xc00011d860)
/home/runner/work/directpv/directpv/pkg/uevent/listener_test.go:222 +0x11e7
testing.tRunner(0xc00011d860, 0x1607820)
/opt/hostedtoolcache/go/1.18.5/x64/src/testing/testing.go:1439 +0x102
created by testing.(*T).Run
/opt/hostedtoolcache/go/1.18.5/x64/src/testing/testing.go:1486 +0x35f
goroutine 6 [runnable]:
syscall.Syscall6(0x2d, 0xb, 0xc0008bb000, 0x1000, 0x2, 0xc000926d80, 0xc000926d74)
/opt/hostedtoolcache/go/1.18.5/x64/src/syscall/asm_linux_amd64.s:43 +0x5
syscall.recvfrom(0x2?, {0xc0008bb000?, 0x0?, 0x2?}, 0x40d785?, 0xc000926d90?, 0xc000926d90?)
/opt/hostedtoolcache/go/1.18.5/x64/src/syscall/zsyscall_linux_amd64.go:1538 +0x70
syscall.Recvfrom(0xc000926e60?, {0xc0008bb000?, 0x0?, 0x0?}, 0x2?)
/opt/hostedtoolcache/go/1.18.5/x64/src/syscall/syscall_unix.go:291 +0x6d
github.com/minio/directpv/pkg/uevent.(*listener).msgPeek(0xc0000a2000, {0x1757578, 0xc00012c008})
/home/runner/work/directpv/directpv/pkg/uevent/parse_linux.go:127 +0x11f
github.com/minio/directpv/pkg/uevent.(*listener).readMsg(0xc000926f50?, {0x1757578, 0xc00012c008})
/home/runner/work/directpv/directpv/pkg/uevent/parse_linux.go:162 +0x3d
github.com/minio/directpv/pkg/uevent.(*listener).getNextDeviceUEvent(0xc0000a2000, {0x1757578, 0xc00012c008})
/home/runner/work/directpv/directpv/pkg/uevent/listener.go:408 +0xc6
github.com/minio/directpv/pkg/uevent.TestUEventListener.func2()
/home/runner/work/directpv/directpv/pkg/uevent/listener_test.go:118 +0xa9
created by github.com/minio/directpv/pkg/uevent.TestUEventListener
/home/runner/work/directpv/directpv/pkg/uevent/listener_test.go:112 +0x34c
FAIL github.com/minio/directpv/pkg/uevent 600.025s
=== RUN TestVolumeStatusTransitions
To Reproduce Flaky but possible to do with `go test -run TestUEventListener --count=100
Expected behavior No hang
Deployment information (please complete the following information): Latest master
All of the udev listener code will be removed soon
Not applicable anymore.