Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestWatcher sometimes hangs #52

Open
fhs opened this issue Mar 30, 2020 · 0 comments
Open

TestWatcher sometimes hangs #52

fhs opened this issue Mar 30, 2020 · 0 comments

Comments

@fhs
Copy link
Owner

fhs commented Mar 30, 2020

The test seems to sometimes hang during tear-down (closing the Watcher).

=== RUN   TestWatcher
panic: test timed out after 10m0s

goroutine 43 [running]:
testing.(*M).startAlarm.func1()
	/opt/hostedtoolcache/go/1.14.1/x64/src/testing/testing.go:1460 +0x11c
created by time.goFunc
	/opt/hostedtoolcache/go/1.14.1/x64/src/time/sleep.go:168 +0x52

goroutine 1 [chan receive]:
testing.(*T).Run(0xc0000a4000, 0x6a38fc, 0xb, 0x6ae2f8, 0x1)
	/opt/hostedtoolcache/go/1.14.1/x64/src/testing/testing.go:1044 +0x699
testing.runTests.func1(0xc0000a4000)
	/opt/hostedtoolcache/go/1.14.1/x64/src/testing/testing.go:1285 +0xa7
testing.tRunner(0xc0000a4000, 0xc00007dd50)
	/opt/hostedtoolcache/go/1.14.1/x64/src/testing/testing.go:992 +0x1ec
testing.runTests(0xc00000e080, 0x84aee0, 0x13, 0x13, 0x0)
	/opt/hostedtoolcache/go/1.14.1/x64/src/testing/testing.go:1283 +0x528
testing.(*M).Run(0xc0000a0000, 0x0)
	/opt/hostedtoolcache/go/1.14.1/x64/src/testing/testing.go:1200 +0x300
main.main()
	_testmain.go:80 +0x224

goroutine 56 [chan receive]:
github.com/fhs/gompd/v2/mpd.(*Watcher).Close(0xc00015d8f0, 0x833120, 0xc000001980)
	/home/runner/work/gompd/gompd/mpd/watcher.go:115 +0xbe
github.com/fhs/gompd/v2/mpd.TestWatcher(0xc00016aea0)
	/home/runner/work/gompd/gompd/mpd/watcher_test.go:91 +0x97d
testing.tRunner(0xc00016aea0, 0x6ae2f8)
	/opt/hostedtoolcache/go/1.14.1/x64/src/testing/testing.go:992 +0x1ec
created by testing.(*T).Run
	/opt/hostedtoolcache/go/1.14.1/x64/src/testing/testing.go:1043 +0x661

goroutine 7 [IO wait]:
internal/poll.runtime_pollWait(0x7fb530cbbfa8, 0x72, 0x72)
	/opt/hostedtoolcache/go/1.14.1/x64/src/runtime/netpoll.go:203 +0x55
internal/poll.(*pollDesc).wait(0xc000106018, 0x72, 0x0, 0x0, 0x6a291a)
	/opt/hostedtoolcache/go/1.14.1/x64/src/internal/poll/fd_poll_runtime.go:87 +0xe4
internal/poll.(*pollDesc).waitRead(...)
	/opt/hostedtoolcache/go/1.14.1/x64/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Accept(0xc000106000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/opt/hostedtoolcache/go/1.14.1/x64/src/internal/poll/fd_unix.go:384 +0x2c9
net.(*netFD).accept(0xc000106000, 0xc00010a100, 0x6e40c0, 0x6e40a0)
	/opt/hostedtoolcache/go/1.14.1/x64/src/net/fd_unix.go:238 +0x56
net.(*TCPListener).accept(0xc00011e000, 0xc00010a100, 0xc000198000, 0x1000)
	/opt/hostedtoolcache/go/1.14.1/x64/src/net/tcpsock_posix.go:139 +0x50
net.(*TCPListener).Accept(0xc00011e000, 0x6ae310, 0xc000126000, 0xc00013abd0, 0xc00010a100)
	/opt/hostedtoolcache/go/1.14.1/x64/src/net/tcpsock.go:261 +0x50
github.com/fhs/gompd/v2/mpd/internal/server.Listen(0x6a20db, 0x3, 0x6a43e9, 0xe, 0xc0000662a0)
	/home/runner/work/gompd/gompd/mpd/internal/server/server.go:899 +0x160
created by github.com/fhs/gompd/v2/mpd.localDial
	/home/runner/work/gompd/gompd/mpd/client_test.go:44 +0x26b

goroutine 18 [select]:
github.com/fhs/gompd/v2/mpd/internal/server.(*server).broadcastIdleEvents(0xc000126000)
	/home/runner/work/gompd/gompd/mpd/internal/server/server.go:852 +0x4a9
created by github.com/fhs/gompd/v2/mpd/internal/server.Listen
	/home/runner/work/gompd/gompd/mpd/internal/server/server.go:896 +0x12c

goroutine 58 [IO wait]:
internal/poll.runtime_pollWait(0x7fb530cbbc28, 0x72, 0x6e43e0)
	/opt/hostedtoolcache/go/1.14.1/x64/src/runtime/netpoll.go:203 +0x55
internal/poll.(*pollDesc).wait(0xc000107498, 0x72, 0x1000, 0x1000, 0xffffffffffffffff)
	/opt/hostedtoolcache/go/1.14.1/x64/src/internal/poll/fd_poll_runtime.go:87 +0xe4
internal/poll.(*pollDesc).waitRead(...)
	/opt/hostedtoolcache/go/1.14.1/x64/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc000107480, 0xc000198000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/opt/hostedtoolcache/go/1.14.1/x64/src/internal/poll/fd_unix.go:169 +0x253
net.(*netFD).Read(0xc000107480, 0xc000198000, 0x1000, 0x1000, 0x1d, 0x0, 0x0)
	/opt/hostedtoolcache/go/1.14.1/x64/src/net/fd_unix.go:202 +0x66
net.(*conn).Read(0xc00010a100, 0xc000198000, 0x1000, 0x1000, 0x1d, 0x0, 0x0)
	/opt/hostedtoolcache/go/1.14.1/x64/src/net/net.go:184 +0xa1
bufio.(*Reader).fill(0xc00010c9c0)
	/opt/hostedtoolcache/go/1.14.1/x64/src/bufio/bufio.go:100 +0x19a
bufio.(*Reader).ReadSlice(0xc00010c9c0, 0x47a70a, 0xc00011ee80, 0xc000041d10, 0x47a90f, 0xc000139540, 0xc000041d70)
	/opt/hostedtoolcache/go/1.14.1/x64/src/bufio/bufio.go:359 +0x96
bufio.(*Reader).ReadLine(0xc00010c9c0, 0x61d1a0, 0xc000139580, 0xc000036a80, 0x2, 0x7fb55a0687d0, 0x0)
	/opt/hostedtoolcache/go/1.14.1/x64/src/bufio/bufio.go:388 +0x45
net/textproto.(*Reader).readLineSlice(0xc00013abd0, 0x473427, 0x412630, 0x7fb52c011238, 0xc00013ac18, 0x473427)
	/opt/hostedtoolcache/go/1.14.1/x64/src/net/textproto/reader.go:58 +0x9e
net/textproto.(*Reader).ReadLine(...)
	/opt/hostedtoolcache/go/1.14.1/x64/src/net/textproto/reader.go:39
github.com/fhs/gompd/v2/mpd/internal/server.(*server).readRequest(0xc000126000, 0xc00013abd0, 0xc000126000, 0xc00013abd0, 0x5)
	/home/runner/work/gompd/gompd/mpd/internal/server/server.go:684 +0x53
github.com/fhs/gompd/v2/mpd/internal/server.(*server).handleConnection(0xc000126000, 0xc00013abd0)
	/home/runner/work/gompd/gompd/mpd/internal/server/server.go:767 +0x1e1
created by github.com/fhs/gompd/v2/mpd/internal/server.Listen
	/home/runner/work/gompd/gompd/mpd/internal/server/server.go:904 +0x241

goroutine 57 [IO wait]:
internal/poll.runtime_pollWait(0x7fb530cbbd08, 0x72, 0x6e43e0)
	/opt/hostedtoolcache/go/1.14.1/x64/src/runtime/netpoll.go:203 +0x55
internal/poll.(*pollDesc).wait(0xc000107298, 0x72, 0x1000, 0x1000, 0xffffffffffffffff)
	/opt/hostedtoolcache/go/1.14.1/x64/src/internal/poll/fd_poll_runtime.go:87 +0xe4
internal/poll.(*pollDesc).waitRead(...)
	/opt/hostedtoolcache/go/1.14.1/x64/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc000107280, 0xc00018c000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/opt/hostedtoolcache/go/1.14.1/x64/src/internal/poll/fd_unix.go:169 +0x253
net.(*netFD).Read(0xc000107280, 0xc00018c000, 0x1000, 0x1000, 0x9, 0x0, 0x0)
	/opt/hostedtoolcache/go/1.14.1/x64/src/net/fd_unix.go:202 +0x66
net.(*conn).Read(0xc00010a0f0, 0xc00018c000, 0x1000, 0x1000, 0x9, 0x0, 0x0)
	/opt/hostedtoolcache/go/1.14.1/x64/src/net/net.go:184 +0xa1
bufio.(*Reader).fill(0xc00010c900)
	/opt/hostedtoolcache/go/1.14.1/x64/src/bufio/bufio.go:100 +0x19a
bufio.(*Reader).ReadSlice(0xc00010c900, 0x47a70a, 0xc0000e2060, 0xc000165d10, 0x47a90f, 0xc00000ec00, 0xc000165d70)
	/opt/hostedtoolcache/go/1.14.1/x64/src/bufio/bufio.go:359 +0x96
bufio.(*Reader).ReadLine(0xc00010c900, 0x61d1a0, 0xc000013c40, 0xc000036700, 0x1, 0x7fb55a068108, 0x0)
	/opt/hostedtoolcache/go/1.14.1/x64/src/bufio/bufio.go:388 +0x45
net/textproto.(*Reader).readLineSlice(0xc00013aab0, 0x473427, 0x412630, 0x7fb52c031038, 0xc00013ab10, 0x473427)
	/opt/hostedtoolcache/go/1.14.1/x64/src/net/textproto/reader.go:58 +0x9e
net/textproto.(*Reader).ReadLine(...)
	/opt/hostedtoolcache/go/1.14.1/x64/src/net/textproto/reader.go:39
github.com/fhs/gompd/v2/mpd/internal/server.(*server).readRequest(0xc000126000, 0xc00013aab0, 0xc00000ec00, 0x2, 0x2)
	/home/runner/work/gompd/gompd/mpd/internal/server/server.go:684 +0x53
github.com/fhs/gompd/v2/mpd/internal/server.(*server).handleConnection(0xc000126000, 0xc00013aab0)
	/home/runner/work/gompd/gompd/mpd/internal/server/server.go:767 +0x1e1
created by github.com/fhs/gompd/v2/mpd/internal/server.Listen
	/home/runner/work/gompd/gompd/mpd/internal/server/server.go:904 +0x241

goroutine 59 [IO wait]:
internal/poll.runtime_pollWait(0x7fb530cbbde8, 0x72, 0x6e43e0)
	/opt/hostedtoolcache/go/1.14.1/x64/src/runtime/netpoll.go:203 +0x55
internal/poll.(*pollDesc).wait(0xc000107418, 0x72, 0x1000, 0x1000, 0xffffffffffffffff)
	/opt/hostedtoolcache/go/1.14.1/x64/src/internal/poll/fd_poll_runtime.go:87 +0xe4
internal/poll.(*pollDesc).waitRead(...)
	/opt/hostedtoolcache/go/1.14.1/x64/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc000107400, 0xc000196000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/opt/hostedtoolcache/go/1.14.1/x64/src/internal/poll/fd_unix.go:169 +0x253
net.(*netFD).Read(0xc000107400, 0xc000196000, 0x1000, 0x1000, 0xc000042800, 0xc0000428e8, 0x4ca88c)
	/opt/hostedtoolcache/go/1.14.1/x64/src/net/fd_unix.go:202 +0x66
net.(*conn).Read(0xc00010a0f8, 0xc000196000, 0x1000, 0x1000, 0x0, 0xc000042bc8, 0x0)
	/opt/hostedtoolcache/go/1.14.1/x64/src/net/net.go:184 +0xa1
bufio.(*Reader).fill(0xc00010c960)
	/opt/hostedtoolcache/go/1.14.1/x64/src/bufio/bufio.go:100 +0x19a
bufio.(*Reader).ReadSlice(0xc00010c960, 0xa, 0xc000153ba0, 0x9, 0xc000153ba0, 0x9, 0x9)
	/opt/hostedtoolcache/go/1.14.1/x64/src/bufio/bufio.go:359 +0x96
bufio.(*Reader).ReadLine(0xc00010c960, 0x9, 0x2, 0x1, 0x2, 0xc000153ba0, 0xc000153ba7)
	/opt/hostedtoolcache/go/1.14.1/x64/src/bufio/bufio.go:388 +0x45
net/textproto.(*Reader).readLineSlice(0xc00013ab40, 0x6a2936, 0x7, 0x6a1f87, 0x2, 0xc000153ba0)
	/opt/hostedtoolcache/go/1.14.1/x64/src/net/textproto/reader.go:58 +0x9e
net/textproto.(*Reader).ReadLine(...)
	/opt/hostedtoolcache/go/1.14.1/x64/src/net/textproto/reader.go:39
github.com/fhs/gompd/v2/mpd.(*Client).readList(0xc00011ed00, 0x6a2936, 0x7, 0x0, 0x0, 0x0, 0x4, 0x0)
	/home/runner/work/gompd/gompd/mpd/client.go:163 +0xe9
github.com/fhs/gompd/v2/mpd.(*Command).Strings(0xc00000ec20, 0x6a2936, 0x7, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/runner/work/gompd/gompd/mpd/response.go:86 +0x1fc
github.com/fhs/gompd/v2/mpd.(*Client).idle(0xc00011ed00, 0xc00011ede0, 0x2, 0x2, 0xc0000e2000, 0x1, 0x1, 0x0, 0x0)
	/home/runner/work/gompd/gompd/mpd/client.go:284 +0x10d
github.com/fhs/gompd/v2/mpd.(*Watcher).watch(0xc00015d8f0, 0xc000105b00, 0x2, 0x2)
	/home/runner/work/gompd/gompd/mpd/watcher.go:46 +0x335
created by github.com/fhs/gompd/v2/mpd.NewWatcher
	/home/runner/work/gompd/gompd/mpd/watcher.go:36 +0x300

goroutine 62 [select]:
github.com/fhs/gompd/v2/mpd/internal/server.(*server).writeIdleResponse(0xc000126000, 0xc00013abd0, 0x5, 0xc000124e40, 0xc000139550, 0x2, 0x3)
	/home/runner/work/gompd/gompd/mpd/internal/server/server.go:742 +0x320
created by github.com/fhs/gompd/v2/mpd/internal/server.(*server).handleConnection
	/home/runner/work/gompd/gompd/mpd/internal/server/server.go:780 +0x2e3
FAIL	github.com/fhs/gompd/v2/mpd	600.013s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant