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

Flapping deadliner test #1721

Closed
corverroos opened this issue Jan 30, 2023 · 2 comments · Fixed by #2047
Closed

Flapping deadliner test #1721

corverroos opened this issue Jan 30, 2023 · 2 comments · Fixed by #2047
Assignees
Labels
bug Something isn't working protocol Protocol Team tickets

Comments

@corverroos
Copy link
Contributor

Problem to be solved

The following test is flapping: github.com/obolnetwork/charon/core_test.TestDeadliner
See https://github.com/ObolNetwork/charon/actions/runs/4043365995/jobs/6952199029.

Proposed solution

Fix and improve the test.

@github-actions github-actions bot added the protocol Protocol Team tickets label Jan 30, 2023
@thomasheremans thomasheremans added the bug Something isn't working label Mar 27, 2023
@corverroos
Copy link
Contributor Author

@corverroos
Copy link
Contributor Author

Logs:

panic: test timed out after 5m0s
running tests:
	TestDeadliner (5m0s)

goroutine 21 [running]:
testing.(*M).startAlarm.func1()
	/opt/hostedtoolcache/go/1.20.2/x64/src/testing/testing.go:2241 +0x219
created by time.goFunc
	/opt/hostedtoolcache/go/1.20.2/x64/src/time/sleep.go:176 +0x48

goroutine 1 [chan receive, 4 minutes]:
testing.(*T).Run(0xc0004311e0, {0x1b224e0, 0xd}, 0x1e87050)
	/opt/hostedtoolcache/go/1.20.2/x64/src/testing/testing.go:1630 +0x82e
testing.runTests.func1(0x0?)
	/opt/hostedtoolcache/go/1.20.2/x64/src/testing/testing.go:2036 +0x8e
testing.tRunner(0xc0004311e0, 0xc00033fac0)
	/opt/hostedtoolcache/go/1.20.2/x64/src/testing/testing.go:1576 +0x217
testing.runTests(0xc00089c1e0?, {0x29580a0, 0xd, 0xd}, {0x4?, 0x2?, 0x2c36780?})
	/opt/hostedtoolcache/go/1.20.2/x64/src/testing/testing.go:2034 +0x87d
testing.(*M).Run(0xc00089c1e0)
	/opt/hostedtoolcache/go/1.20.2/x64/src/testing/testing.go:1906 +0xb45
github.com/obolnetwork/charon/core_test.TestMain(0x1b12225?)
	/home/runner/work/charon/charon/core/eth2signeddata_test.go:23 +0x45
main.main()
	_testmain.go:106 +0x33e

goroutine 6 [chan receive, 4 minutes]:
github.com/obolnetwork/charon/core_test.TestDeadliner(0x0?)
	/home/runner/work/charon/charon/core/deadline_test.go:57 +0x49e
testing.tRunner(0xc000431380, 0x1e87050)
	/opt/hostedtoolcache/go/1.20.2/x64/src/testing/testing.go:1576 +0x217
created by testing.(*T).Run
	/opt/hostedtoolcache/go/1.20.2/x64/src/testing/testing.go:1629 +0x806

goroutine 7 [select, 4 minutes]:
github.com/obolnetwork/charon/core.(*deadliner).run(0xc0008b28[40](https://github.com/ObolNetwork/charon/actions/runs/4626973937/jobs/8184330658#step:5:41), {0x20fc260, 0xc0000[41](https://github.com/ObolNetwork/charon/actions/runs/4626973937/jobs/8184330658#step:5:42)270}, 0xc00089b110)
	/home/runner/work/charon/charon/core/deadline.go:106 +0x[45](https://github.com/ObolNetwork/charon/actions/runs/4626973937/jobs/8184330658#step:5:46)8
created by github.com/obolnetwork/charon/core.newDeadliner
	/home/runner/work/charon/charon/core/deadline.go:82 +0x327
FAIL	github.com/obolnetwork/charon/core	300.078s

@dB2510 dB2510 self-assigned this Apr 6, 2023
@dB2510 dB2510 linked a pull request Apr 6, 2023 that will close this issue
obol-bulldozer bot pushed a commit that referenced this issue Apr 6, 2023
Fixes flappy deadliner test. Looks like clockwork.FakeClock is not thread safe. Found out while debugging we were calling `clock.Advance` in deadline_test and `setCurrState` in deadline.go at the same time.

category: test
ticket: #1721
LukeHackett12 pushed a commit that referenced this issue Apr 11, 2023
Fixes flappy deadliner test. Looks like clockwork.FakeClock is not thread safe. Found out while debugging we were calling `clock.Advance` in deadline_test and `setCurrState` in deadline.go at the same time.

category: test
ticket: #1721
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working protocol Protocol Team tickets
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants