While the latest improvements in locking in certain data structures have improved reliability, sometimes tests are failing when running on multiple cores. Currently it is not predictable when they are failing. Last error message was
panic: test timed out after 30s
goroutine 3 [running]:
testing.(*M).startAlarm.func1()
/usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1459 +0xdf
created by time.goFunc
/usr/local/Cellar/go/1.14.4/libexec/src/time/sleep.go:168 +0x44
goroutine 1 [chan receive]:
testing.(*T).Run(0xc00017c5a0, 0x158a744, 0x10, 0x15a8478, 0x10c1601)
/usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1043 +0x37e
testing.runTests.func1(0xc00017c000)
/usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1284 +0x78
testing.tRunner(0xc00017c000, 0xc000121d28)
/usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0xdc
testing.runTests(0xc000126920, 0x19aaf40, 0x5, 0x5, 0x0)
/usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1282 +0x2a7
testing.(*M).Run(0xc00012a100, 0x0)
/usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1199 +0x15f
github.com/connctd/krach.TestMain(0xc00012a100)
/Users/till/Development/go/src/github.com/connctd/krach/krach_test.go:39 +0x20e
main.main()
_testmain.go:126 +0x1c1
goroutine 27 [semacquire]:
sync.runtime_Semacquire(0xc000128e08)
/usr/local/Cellar/go/1.14.4/libexec/src/runtime/sema.go:56 +0x42
sync.(*WaitGroup).Wait(0xc000128e00)
/usr/local/Cellar/go/1.14.4/libexec/src/sync/waitgroup.go:130 +0x64
github.com/connctd/krach.TestStreamsBasic(0xc00017c5a0)
/Users/till/Development/go/src/github.com/connctd/krach/stream_test.go:108 +0xace
testing.tRunner(0xc00017c5a0, 0x15a8478)
/usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:991 +0xdc
created by testing.(*T).Run
/usr/local/Cellar/go/1.14.4/libexec/src/testing/testing.go:1042 +0x357
goroutine 53 [IO wait]:
internal/poll.runtime_pollWait(0x9340d28, 0x72, 0xffffffffffffffff)
/usr/local/Cellar/go/1.14.4/libexec/src/runtime/netpoll.go:203 +0x55
internal/poll.(*pollDesc).wait(0xc00012a718, 0x72, 0x400, 0x400, 0xffffffffffffffff)
/usr/local/Cellar/go/1.14.4/libexec/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
/usr/local/Cellar/go/1.14.4/libexec/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc00012a700, 0xc00009e800, 0x400, 0x400, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.14.4/libexec/src/internal/poll/fd_unix.go:169 +0x201
net.(*netFD).Read(0xc00012a700, 0xc00009e800, 0x400, 0x400, 0x100b10b, 0xc000012000, 0x14f9a80)
/usr/local/Cellar/go/1.14.4/libexec/src/net/fd_unix.go:202 +0x4f
net.(*conn).Read(0xc0001240e8, 0xc00009e800, 0x400, 0x400, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.14.4/libexec/src/net/net.go:184 +0x8e
github.com/connctd/krach.(*buffer).readFromUntil(0xc000098090, 0x93410c0, 0xc0001240e8, 0x2, 0xc0001240e8, 0x0)
/Users/till/Development/go/src/github.com/connctd/krach/buffer.go:50 +0xb6
github.com/connctd/krach.(*Conn).readInternal(0xc000141180, 0x39, 0x0, 0x0)
/Users/till/Development/go/src/github.com/connctd/krach/conn.go:450 +0x1f4
github.com/connctd/krach.(*Stream).Read(0xc00042c0c0, 0xc00009c050, 0x4e, 0x4e, 0x0, 0x0, 0x1e)
/Users/till/Development/go/src/github.com/connctd/krach/stream.go:76 +0x268
io.ReadAtLeast(0x1649ea0, 0xc00042c0c0, 0xc00009c050, 0x4e, 0x4e, 0x4e, 0x1, 0x1e, 0x0)
/usr/local/Cellar/go/1.14.4/libexec/src/io/io.go:310 +0x87
io.ReadFull(...)
/usr/local/Cellar/go/1.14.4/libexec/src/io/io.go:329
github.com/connctd/krach.TestStreamsBasic.func2(0xc000128e00, 0xc0001240c8, 0xc00017c5a0, 0xc00014232e, 0xc000142300, 0x4e, 0x80)
/Users/till/Development/go/src/github.com/connctd/krach/stream_test.go:85 +0x2a3
created by github.com/connctd/krach.TestStreamsBasic
/Users/till/Development/go/src/github.com/connctd/krach/stream_test.go:77 +0x9ff
goroutine 62 [runnable]:
github.com/connctd/krach.(*Conn).notifyNextStreamWrite(0xc000140fc0, 0xc00016be34)
/Users/till/Development/go/src/github.com/connctd/krach/conn.go:219 +0x47
github.com/connctd/krach.(*Conn).pleaseWrite(0xc000140fc0)
/Users/till/Development/go/src/github.com/connctd/krach/conn.go:214 +0x6a
github.com/connctd/krach.(*Stream).pleaseWrite(0xc0001d5680, 0x108153c)
/Users/till/Development/go/src/github.com/connctd/krach/stream.go:114 +0x4c
github.com/connctd/krach.(*Stream).writeSynced(0xc0001d5680, 0x15a9803, 0xc000142500, 0x4e, 0x80, 0x0, 0x1c, 0x0)
/Users/till/Development/go/src/github.com/connctd/krach/stream.go:146 +0x7a
github.com/connctd/krach.(*Stream).Write(0xc0001d5680, 0xc000142500, 0x4e, 0x80, 0x0, 0x0, 0x0)
/Users/till/Development/go/src/github.com/connctd/krach/stream.go:180 +0x1c1
github.com/connctd/krach.TestStreamsBasic.func3(0xc000128e00, 0xc000140fc0, 0xc00017c5a0, 0xc000142532, 0xc000142500, 0x4e, 0x80)
/Users/till/Development/go/src/github.com/connctd/krach/stream_test.go:101 +0x2cc
created by github.com/connctd/krach.TestStreamsBasic
/Users/till/Development/go/src/github.com/connctd/krach/stream_test.go:94 +0xa6e
goroutine 75 [runnable]:
github.com/connctd/krach.(*Conn).readInternal(0xc000141180, 0x32, 0x0, 0x0)
/Users/till/Development/go/src/github.com/connctd/krach/conn.go:431 +0xf90
github.com/connctd/krach.(*Stream).Read(0xc000030200, 0xc000116460, 0x4e, 0x4e, 0x0, 0x0, 0x1e)
/Users/till/Development/go/src/github.com/connctd/krach/stream.go:76 +0x268
io.ReadAtLeast(0x1649ea0, 0xc000030200, 0xc000116460, 0x4e, 0x4e, 0x4e, 0x1, 0x1e, 0x0)
/usr/local/Cellar/go/1.14.4/libexec/src/io/io.go:310 +0x87
io.ReadFull(...)
/usr/local/Cellar/go/1.14.4/libexec/src/io/io.go:329
github.com/connctd/krach.TestStreamsBasic.func2(0xc000128e00, 0xc0001240c8, 0xc00017c5a0, 0xc000142839, 0xc000142880, 0x4e, 0x80)
/Users/till/Development/go/src/github.com/connctd/krach/stream_test.go:85 +0x2a3
created by github.com/connctd/krach.TestStreamsBasic
/Users/till/Development/go/src/github.com/connctd/krach/stream_test.go:77 +0x9ff
goroutine 76 [runnable]:
github.com/connctd/krach.(*Conn).notifyNextStreamWrite(0xc000140fc0, 0xc00016ee38)
/Users/till/Development/go/src/github.com/connctd/krach/conn.go:219 +0x47
github.com/connctd/krach.(*Conn).pleaseWrite(0xc000140fc0)
/Users/till/Development/go/src/github.com/connctd/krach/conn.go:214 +0x6a
github.com/connctd/krach.(*Stream).pleaseWrite(0xc000111500, 0x108153c)
/Users/till/Development/go/src/github.com/connctd/krach/stream.go:114 +0x4c
github.com/connctd/krach.(*Stream).writeSynced(0xc000111500, 0x15a9803, 0xc000142880, 0x4e, 0x80, 0x0, 0x1c, 0x0)
/Users/till/Development/go/src/github.com/connctd/krach/stream.go:146 +0x7a
github.com/connctd/krach.(*Stream).Write(0xc000111500, 0xc000142880, 0x4e, 0x80, 0x0, 0x0, 0x0)
/Users/till/Development/go/src/github.com/connctd/krach/stream.go:180 +0x1c1
github.com/connctd/krach.TestStreamsBasic.func3(0xc000128e00, 0xc000140fc0, 0xc00017c5a0, 0xc000142839, 0xc000142880, 0x4e, 0x80)
/Users/till/Development/go/src/github.com/connctd/krach/stream_test.go:101 +0x2cc
created by github.com/connctd/krach.TestStreamsBasic
/Users/till/Development/go/src/github.com/connctd/krach/stream_test.go:94 +0xa6e
exit status 2
FAIL github.com/connctd/krach 30.028s
Might be that polling on the connection blocks for some reason.
While the latest improvements in locking in certain data structures have improved reliability, sometimes tests are failing when running on multiple cores. Currently it is not predictable when they are failing. Last error message was
Might be that polling on the connection blocks for some reason.