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

Fix panic in testutil/validatormock/synccomm.go #2347

Closed
dB2510 opened this issue Jun 22, 2023 · 0 comments
Closed

Fix panic in testutil/validatormock/synccomm.go #2347

dB2510 opened this issue Jun 22, 2023 · 0 comments
Labels
bug Something isn't working protocol Protocol Team tickets

Comments

@dB2510
Copy link
Contributor

dB2510 commented Jun 22, 2023

🐞 Bug Report

Description

A panic has been observed by compose tests in github actions: https://github.com/ObolNetwork/charon/actions/runs/5335228338/attempts/1
Might be due to a race condition.

Has this worked before in a previous version?

Yes

🔬 Minimal Reproduction

🔥 Error


panic: close of closed channel
�[35mnode2_1       |�[0m 
�[35mnode2_1       |�[0m goroutine 478 [running]:
�[35mnode2_1       |�[0m github.com/obolnetwork/charon/testutil/validatormock.(*SyncCommMember).setDuties(0x1d76ea0?, 0xc002d69c80?, {0x2a468b0?, 0xc001f4bd00?, 0x1d76ea0?})
�[35mnode2_1       |�[0m 	/app/charon/testutil/validatormock/synccomm.go:153 +0x105
�[35mnode2_1       |�[0m github.com/obolnetwork/charon/testutil/validatormock.(*SyncCommMember).PrepareEpoch(0xc001fc6b40, {0x1d76ea0, 0xc002d69c80})
�[35mnode2_1       |�[0m 	/app/charon/testutil/validatormock/synccomm.go:182 +0x9f
�[35mnode2_1       |�[0m github.com/obolnetwork/charon/app.wireValidatorMock.func1.2({0x1d76ea0?, 0xc002d69c80?}, {{0x1d92f00, 0xc001f4bd00}, 0xc001b0e600, 0xc001d94e70, 0xc001fc6b40})
�[35mnode2_1       |�[0m 	/app/charon/app/vmock.go:47 +0x45
�[35mnode2_1       |�[0m github.com/obolnetwork/charon/app.newVMockWrapper.func1.1()
�[35mnode2_1       |�[0m 	/app/charon/app/vmock.go:182 +0xac
�[35mnode2_1       |�[0m created by github.com/obolnetwork/charon/app.newVMockWrapper.func1
�[35mnode2_1       |�[0m 	/app/charon/app/vmock.go:178 +0x792

Anything else relevant (validator index / public key)?
Here's complete log of the failed test: run_version_matrix_with_dkg.log

@dB2510 dB2510 added the bug Something isn't working label Jun 22, 2023
@github-actions github-actions bot added the protocol Protocol Team tickets label Jun 22, 2023
@dB2510 dB2510 changed the title Fix panic in vmock Fix panic in testutil/validatormock/synccomm.go Jun 22, 2023
obol-bulldozer bot pushed a commit that referenced this issue Jun 22, 2023
Refactors validator mock logic to error when state already set (instead of panic). Also use explicit slot/poch to store stateful objects, rather then implicit "last slot" since out of order slot scheduling should cause problems. 

category: test
ticket: #2347
xenowits pushed a commit that referenced this issue Jun 26, 2023
Refactors validator mock logic to error when state already set (instead of panic). Also use explicit slot/poch to store stateful objects, rather then implicit "last slot" since out of order slot scheduling should cause problems. 

category: test
ticket: #2347
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

No branches or pull requests

2 participants