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

Race Test Failures #12112

Closed
4 tasks
alexanderbez opened this issue Jun 1, 2022 · 3 comments · Fixed by #12114
Closed
4 tasks

Race Test Failures #12112

alexanderbez opened this issue Jun 1, 2022 · 3 comments · Fixed by #12114
Labels

Comments

@alexanderbez
Copy link
Contributor

Summary of Bug

(Please close of duplicate)

--- FAIL: TestEventsTestSuite (0.02s)
    --- FAIL: TestEventsTestSuite/TestEventManagerTypedEvents (0.01s)
        testing.go:1312: race detected during execution of test
    testing.go:1312: race detected during execution of test
--- FAIL: TestCoinTestSuite (0.04s)
    --- FAIL: TestCoinTestSuite/TestCustomValidation (0.00s)
    testing.go:1312: race detected during execution of test

https://pastebin.com/wUcDxQta
https://github.com/cosmos/cosmos-sdk/runs/6690839672?check_suite_focus=true

Version

main


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@alexanderbez
Copy link
Contributor Author

Ok, the problem here is there is an explicit call to s.T().Parallel() in these tests, where the race condition stems from the global regex (pointer) used when validating coin denoms. So either we remove the global or make the tests execute sequentially.

@alexanderbez
Copy link
Contributor Author

@aaronc do you have a preference here?

  1. Make these two test suites execute sequentially (i.e. remove Parallel())
  2. Make all coin/int/dec regex uses wrapped by a mutex

@aaronc
Copy link
Member

aaronc commented Jun 1, 2022

Let's start by removing parallel. But we should get rid of that global too

@alexanderbez alexanderbez moved this to 👀 Needs Review in Cosmos-SDK Jun 1, 2022
Repository owner moved this from 👀 Needs Review to 👏 Done in Cosmos-SDK Jun 1, 2022
@tac0turtle tac0turtle removed this from Cosmos-SDK Nov 16, 2023
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