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

Flaky test in dot/rpc/subscription #2944

Closed
qdm12 opened this issue Nov 14, 2022 · 2 comments · Fixed by #3399
Closed

Flaky test in dot/rpc/subscription #2944

qdm12 opened this issue Nov 14, 2022 · 2 comments · Fixed by #3399
Assignees

Comments

@qdm12
Copy link
Contributor

qdm12 commented Nov 14, 2022

One or more tests have a nil pointer panic (shown as ugly stack trace due to CGO) occurring from time to time. This makes the unit-tests CI suite fail a good 1/3 of the time I'd say.

Stack trace:

SIGABRT: abort
PC=0x7efd3530f00b m=5 sigcode=18446744073709551610

goroutine 104 [running]:
runtime: unknown pc 0x7efd3530f00b
stack: frame={sp:0xc0000a37d0, fp:0x0} stack=[0xc000066800,0xc000067000)

runtime: unknown pc 0x7efd3530f00b
stack: frame={sp:0xc0000a37d0, fp:0x0} stack=[0xc000066800,0xc000067000)

created by github.com/ChainSafe/gossamer/dot/rpc/subscription.TestWSConn_HandleConn
	/home/runner/work/gossamer/gossamer/dot/rpc/subscription/websocket_test.go:29 +0xe5

goroutine 1 [chan receive]:
testing.(*T).Run(0xc0000dbba0, {0x1248819?, 0x5256a5?}, 0x136b060)
	/opt/hostedtoolcache/go/1.18.8/x64/src/testing/testing.go:1487 +0x37a
testing.runTests.func1(0xc0000dbba0?)
	/opt/hostedtoolcache/go/1.18.8/x64/src/testing/testing.go:1839 +0x6e
testing.tRunner(0xc0000dbba0, 0xc00085fca0)
	/opt/hostedtoolcache/go/1.18.8/x64/src/testing/testing.go:1439 +0x102
testing.runTests(0xc0007d20a0?, {0x1be0940, 0x9, 0x9}, {0x7efd3510d108?, 0x40?, 0x1ec3440?})
	/opt/hostedtoolcache/go/1.18.8/x64/src/testing/testing.go:1837 +0x457
testing.(*M).Run(0xc0007d20a0)
	/opt/hostedtoolcache/go/1.18.8/x64/src/testing/testing.go:1719 +0x5d9
main.main()
	_testmain.go:117 +0x255

goroutine 11 [select]:
github.com/ipfs/go-log/writer.(*MirrorWriter).logRoutine(0xc0000b1da0)
	/home/runner/go/pkg/mod/github.com/ipfs/go-log@v1.0.5/writer/writer.go:71 +0x11f
created by github.com/ipfs/go-log/writer.NewMirrorWriter
	/home/runner/go/pkg/mod/github.com/ipfs/go-log@v1.0.5/writer/writer.go:36 +0xca

goroutine 13 [select]:
go.opencensus.io/stats/view.(*worker).start(0xc0000b8880)
	/home/runner/go/pkg/mod/go.opencensus.io@v0.23.0/stats/view/worker.go:[27](https://github.com/ChainSafe/gossamer/actions/runs/3460653514/jobs/5777412745#step:9:28)6 +0xad
created by go.opencensus.io/stats/view.init.0
	/home/runner/go/pkg/mod/go.opencensus.io@v0.23.0/stats/view/worker.go:34 +0x8d

goroutine 101 [sleep]:
time.Sleep(0x77359400)
	/opt/hostedtoolcache/go/1.18.8/x64/src/runtime/time.go:194 +0x12e
github.com/ChainSafe/gossamer/dot/rpc/subscription.TestWSConn_HandleConn(0x0?)
	/home/runner/work/gossamer/gossamer/dot/rpc/subscription/websocket_test.go:30 +0xef
testing.tRunner(0xc0002356c0, 0x136b060)
	/opt/hostedtoolcache/go/1.18.8/x64/src/testing/testing.go:1439 +0x102
created by testing.(*T).Run
	/opt/hostedtoolcache/go/1.18.8/x64/src/testing/testing.go:1486 +0x35f

goroutine 100 [chan receive]:
github.com/ChainSafe/gossamer/dot/rpc/subscription.(*RuntimeVersionListener).Listen.func1()
	/home/runner/work/gossamer/gossamer/dot/rpc/subscription/listeners.go:421 +0x[28](https://github.com/ChainSafe/gossamer/actions/runs/3460653514/jobs/5777412745#step:9:29)a
created by github.com/ChainSafe/gossamer/dot/rpc/subscription.(*RuntimeVersionListener).Listen
	/home/runner/work/gossamer/gossamer/dot/rpc/subscription/listeners.go:419 +0x3aa

goroutine 80 [runnable]:
sync.runtime_SemacquireMutex(0x82e360?, 0x38?, 0xc001025cf0?)
	/opt/hostedtoolcache/go/1.18.8/x64/src/runtime/sema.go:71 +0x25
sync.(*Mutex).lockSlow(0xc000914398)
	/opt/hostedtoolcache/go/1.18.8/x64/src/sync/mutex.go:162 +0x165
sync.(*Mutex).Lock(...)
	/opt/hostedtoolcache/go/1.18.8/x64/src/sync/mutex.go:81
net/http.(*http2clientConnPool).MarkDead(0xc000914390, 0xc000790300)
	/opt/hostedtoolcache/go/1.18.8/x64/src/net/http/h2_bundle.go:951 +0x71
net/http.(*http2clientConnReadLoop).cleanup(0x0?)
	/opt/hostedtoolcache/go/1.18.8/x64/src/net/http/h2_bundle.go:8780 +0x454
net/http.(*http2ClientConn).readLoop(0xc000790300)
	/opt/hostedtoolcache/go/1.18.8/x64/src/net/http/h2_bundle.go:8721 +0x12d
created by net/http.(*http2Transport).newClientConn
	/opt/hostedtoolcache/go/1.18.8/x64/src/net/http/h2_bundle.go:7443 +0xa65

goroutine 96 [runnable]:
syscall.Syscall(0x1, 0xb, 0xc0006df000, 0x81)
	/opt/hostedtoolcache/go/1.18.8/x64/src/syscall/asm_linux_amd64.s:20 +0x5
syscall.write(0xc001be2e80?, {0xc0006df000?, 0x7efd0a2e0c00?, 0xc001bdd748?})
	/opt/hostedtoolcache/go/1.18.8/x64/src/syscall/zsyscall_linux_amd64.go:924 +0x4d
syscall.Write(...)
	/opt/hostedtoolcache/go/1.18.8/x64/src/syscall/syscall_unix.go:216
internal/poll.ignoringEINTRIO(...)
	/opt/hostedtoolcache/go/1.18.8/x64/src/internal/poll/fd_unix.go:794
internal/poll.(*FD).Write(0xc001be2e80?, {0xc0006df000?, 0x81?, 0x1000?})
	/opt/hostedtoolcache/go/1.18.8/x64/src/internal/poll/fd_unix.go:383 +0x36e
net.(*netFD).Write(0xc001be2e80, {0xc0006df000?, 0x424135432d414335?, 0x0?})
	/opt/hostedtoolcache/go/1.18.8/x64/src/net/fd_posix.go:96 +0x[29](https://github.com/ChainSafe/gossamer/actions/runs/3460653514/jobs/5777412745#step:9:30)
net.(*conn).Write(0xc000010c10, {0xc0006df000?, 0x1000?, 0x0?})
	/opt/hostedtoolcache/go/1.18.8/x64/src/net/net.go:195 +0x45
github.com/gorilla/websocket.(*Upgrader).Upgrade(0xc00074d920, {0x14d77e8, 0xc00069f260}, 0xc0000df[30](https://github.com/ChainSafe/gossamer/actions/runs/3460653514/jobs/5777412745#step:9:31)0, 0x3089774869436078?)
	/home/runner/go/pkg/mod/github.com/gorilla/websocket@v1.5.0/server.go:256 +0xd12
github.com/ChainSafe/gossamer/dot/rpc/subscription.setupWSConn.func2({0x14d77e8?, 0xc00069f260?}, 0x4a98a0?)
	/home/runner/work/gossamer/gossamer/dot/rpc/subscription/listeners_test.go:300 +0x45
net/http.HandlerFunc.ServeHTTP(0x0?, {0x14d77e8?, 0xc00069f260?}, 0xc00006c800?)
	/opt/hostedtoolcache/go/1.18.8/x64/src/net/http/server.go:2084 +0x2f
net/http.serverHandler.ServeHTTP({0xc0006da270?}, {0x14d77e8, 0xc00069f260}, 0xc0000df300)
	/opt/hostedtoolcache/go/1.18.8/x64/src/net/http/server.go:2916 +0x43b
net/http.(*conn).serve(0xc0006a3a40, {0x14d8370, 0xc0006da150})
	/opt/hostedtoolcache/go/1.18.8/x64/src/net/http/server.go:1966 +0x5d7
created by net/http.(*Server).Serve
	/opt/hostedtoolcache/go/1.18.8/x64/src/net/http/server.go:3071 +0x4db

rax    0x0
rbx    0x7efd0b[31](https://github.com/ChainSafe/gossamer/actions/runs/3460653514/jobs/5777412745#step:9:32)8700
rcx    0x7efd3530f00b
rdx    0x0
rdi    0x2
rsi    0xc0000a37d0
rbp    0xc0000a3aa0
rsp    0xc0000a37d0
r8     0x0
r9     0xc0000a37d0
r10    0x8
r11    0x246
r12    0xc000066ec0
r13    0x4
r14    0xb
r15    0x7efd0e5e50a5
rip    0x7efd3530f00b
rflags 0x246
cs     0x[33](https://github.com/ChainSafe/gossamer/actions/runs/3460653514/jobs/5777412745#step:9:34)
fs     0x0
gs     0x0
FAIL	github.com/ChainSafe/gossamer/dot/rpc/subscription	15.1[43](https://github.com/ChainSafe/gossamer/actions/runs/3460653514/jobs/5777412745#step:9:44)s
@danforbes danforbes changed the title Flakky test in dot/rpc/subscription Flaky test in dot/rpc/subscription Nov 28, 2022
@EclesioMeloJunior
Copy link
Member

Copy link

🎉 This issue has been resolved in version 0.8.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants