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 integration configuration #17081

Closed
julienrbrt opened this issue Jul 20, 2023 · 0 comments · Fixed by #17089
Closed

Flaky integration configuration #17081

julienrbrt opened this issue Jul 20, 2023 · 0 comments · Fixed by #17089
Assignees
Labels

Comments

@julienrbrt
Copy link
Member

The test-integration job is flaky:

fatal error: concurrent map read and map write

goroutine 22 [running]:
github.com/cosmos/cosmos-sdk/testutil/configurator.NewAppConfig({0xc00052d668, 0x6, 0x0?})
	/home/runner/work/cosmos-sdk/cosmos-sdk/testutil/configurator/configurator.go:322 +0x211
github.com/cosmos/cosmos-sdk/tests/integration/runtime.initFixture({0x2442d30, 0xc000765040})
	/home/runner/work/cosmos-sdk/cosmos-sdk/tests/integration/runtime/query_test.go:45 +0x134
github.com/cosmos/cosmos-sdk/tests/integration/runtime.TestQueryAppConfig(0xc000765040)
	/home/runner/work/cosmos-sdk/cosmos-sdk/tests/integration/runtime/query_test.go:73 +0x4a
testing.tRunner(0xc000765040, 0x2246568)
	/opt/hostedtoolcache/go/1.20.6/x64/src/testing/testing.go:1576 +0x10b
created by testing.(*T).Run
	/opt/hostedtoolcache/go/1.20.6/x64/src/testing/testing.go:1629 +0x3ea

goroutine 1 [chan receive]:
testing.tRunner.func1()
	/opt/hostedtoolcache/go/1.20.6/x64/src/testing/testing.go:1542 +0x4a5
testing.tRunner(0xc000764ea0, 0xc0008a5c80)
	/opt/hostedtoolcache/go/1.20.6/x64/src/testing/testing.go:1582 +0x144
testing.runTests(0xc0000c5900?, {0x352cce0, 0x3, 0x3}, {0xd0?, 0x100000355dec0?, 0x355a380?})
	/opt/hostedtoolcache/go/1.20.6/x64/src/testing/testing.go:2034 +0x489
testing.(*M).Run(0xc0000c5900)
	/opt/hostedtoolcache/go/1.20.6/x64/src/testing/testing.go:1906 +0x63a
main.main()
	_testmain.go:82 +0x1c5

goroutine 19 [IO wait]:
internal/poll.runtime_pollWait(0x7f993c0b7ad8, 0x72)
	/opt/hostedtoolcache/go/1.20.6/x64/src/runtime/netpoll.go:306 +0x89
internal/poll.(*pollDesc).wait(0xc0002[25](https://github.com/cosmos/cosmos-sdk/actions/runs/5612517291/job/15206440922?pr=17076#step:5:26)400?, 0xc0002fd370?, 0x0)
	/opt/hostedtoolcache/go/1.20.6/x64/src/internal/poll/fd_poll_runtime.go:84 +0x32
internal/poll.(*pollDesc).waitRead(...)
	/opt/hostedtoolcache/go/1.20.6/x64/src/internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).ReadMsg(0xc000225400, {0xc0002fd370, 0x10, 0x10}, {0xc00041d920, 0x1000, 0x1000}, 0x1?)
	/opt/hostedtoolcache/go/1.20.6/x64/src/internal/poll/fd_unix.go:304 +0x3aa
net.(*netFD).readMsg(0xc000225400, {0xc0002fd370?, 0x1?, 0x244eda0?}, {0xc00041d920?, 0x1?, 0x5?}, 0xa?)
	/opt/hostedtoolcache/go/1.20.6/x64/src/net/fd_posix.go:78 +0x37
net.(*UnixConn).readMsg(0xc0004aab00, {0xc0002fd370?, 0xc00048b818?, 0x24[26](https://github.com/cosmos/cosmos-sdk/actions/runs/5612517291/job/15206440922?pr=17076#step:5:27)aa0?}, {0xc00041d920?, 0x2426aa0?, 0xc00028ced0?})
	/opt/hostedtoolcache/go/1.20.6/x64/src/net/unixsock_posix.go:115 +0x4f
net.(*UnixConn).ReadMsgUnix(0xc0004aab00, {0xc0002fd370?, 0x4185d0?, 0xc00028ced0?}, {0xc00041d920?, 0x4101ca?, 0xc00048ba40?})
	/opt/hostedtoolcache/go/1.20.6/x64/src/net/unixsock.go:143 +0x3c
github.com/godbus/dbus.(*oobReader).Read(0xc00041d900, {0xc0002fd370?, 0xc00052fe28?, 0x4105a7?})
	/home/runner/go/pkg/mod/github.com/godbus/dbus@v0.0.0-20190726142602-4481cbc300e2/transport_unix.go:21 +0x45
io.ReadAtLeast({0x242a9c0, 0xc00041d900}, {0xc0002fd370, 0x10, 0x10}, 0x10)
	/opt/hostedtoolcache/go/1.20.6/x64/src/io/io.go:332 +0x9a
io.ReadFull(...)
	/opt/hostedtoolcache/go/1.20.6/x64/src/io/io.go:351
github.com/godbus/dbus.(*unixTransport).ReadMessage(0xc00048b260)
	/home/runner/go/pkg/mod/github.com/godbus/dbus@v0.0.0-20190726142602-4481cbc300e2/transport_unix.go:91 +0x11e
github.com/godbus/dbus.(*Conn).inWorker(0xc00030f830)
	/home/runner/go/pkg/mod/github.com/godbus/dbus@v0.0.0-20190726142602-4481cbc300e2/conn.go:294 +0x3b
created by github.com/godbus/dbus.(*Conn).Auth
	/home/runner/go/pkg/mod/github.com/godbus/dbus@v0.0.0-20190726142602-4481cbc300e2/auth.go:118 +0x9ee

goroutine 21 [select]:
github.com/desertbit/timer.timerRoutine()
	/home/runner/go/pkg/mod/github.com/desertbit/timer@v0.0.0-20180107155436-c41aec40b[27](https://github.com/cosmos/cosmos-sdk/actions/runs/5612517291/job/15206440922?pr=17076#step:5:28)f/timers.go:119 +0xba
created by github.com/desertbit/timer.init.0
	/home/runner/go/pkg/mod/github.com/desertbit/timer@v0.0.0-20180107155436-c41aec40b27f/timers.go:15 +0x25

goroutine 23 [runnable]:
testing.(*T).Parallel(0xc000765380)
	/opt/hostedtoolcache/go/1.20.6/x64/src/testing/testing.go:1384 +0x225
github.com/cosmos/cosmos-sdk/tests/integration/runtime.TestReflectionService(0xc000765380)
	/home/runner/work/cosmos-sdk/cosmos-sdk/tests/integration/runtime/query_test.go:96 +0x36
testing.tRunner(0xc000765380, 0x2246578)
	/opt/hostedtoolcache/go/1.20.6/x64/src/testing/testing.go:1576 +0x10b
created by testing.(*T).Run
	/opt/hostedtoolcache/go/1.20.6/x64/src/testing/testing.go:16[29](https://github.com/cosmos/cosmos-sdk/actions/runs/5612517291/job/15206440922?pr=17076#step:5:30) +0x3ea

goroutine 24 [runnable]:
github.com/cosmos/cosmos-sdk/testutil/configurator.NewAppConfig({0xc00064f7f8, 0x6, 0x0?})
	/home/runner/work/cosmos-sdk/cosmos-sdk/testutil/configurator/configurator.go:334 +0x572
github.com/cosmos/cosmos-sdk/tests/integration/runtime.initFixture({0x2442d[30](https://github.com/cosmos/cosmos-sdk/actions/runs/5612517291/job/15206440922?pr=17076#step:5:31), 0xc0007656c0})
	/home/runner/work/cosmos-sdk/cosmos-sdk/tests/integration/runtime/query_test.go:45 +0x134
github.com/cosmos/cosmos-sdk/tests/integration/runtime.TestQueryAutoCLIAppOptions(0xc000765380?)
	/home/runner/work/cosmos-sdk/cosmos-sdk/tests/integration/runtime/query_test.go:127 +0x36
testing.tRunner(0xc0007656c0, 0x2246570)
	/opt/hostedtoolcache/go/1.20.6/x64/src/testing/testing.go:1576 +0x10b
created by testing.(*T).Run
	/opt/hostedtoolcache/go/1.20.6/x64/src/testing/testing.go:1629 +0x3ea
FAIL	github.com/cosmos/cosmos-sdk/tests/integration/runtime	0.0[83](https://github.com/cosmos/cosmos-sdk/actions/runs/5612517291/job/15206440922?pr=17076#step:5:84)s

https://github.com/cosmos/cosmos-sdk/actions/runs/5612517291/job/15206440922?pr=17076

@odeke-em odeke-em self-assigned this Jul 21, 2023
odeke-em added a commit that referenced this issue Jul 21, 2023
This change fixes a data race that was caused by incorrectly copying
the defaultConfig, a pointer value and that "copied value" was passed around
to independent tests yet they were all mutating the same value.
The fix involves creating a true/correct fresh copy each time.

Fixes #17081
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants