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

Data race in test database connections #1614

Open
gloriousCode opened this issue Aug 16, 2024 · 0 comments
Open

Data race in test database connections #1614

gloriousCode opened this issue Aug 16, 2024 · 0 comments
Labels
bug low priority This enhancement or update will be implemented at a later date.

Comments

@gloriousCode
Copy link
Collaborator

New Issue

From https://github.com/thrasher-corp/gocryptotrader/actions/runs/10399495691/job/28798453118?pr=1612#step:10:2136

Context

2024-08-15T05:59:46.4533660Z WARNING: DATA RACE
2024-08-15T05:59:46.4533840Z Read at 0x0001115a8bc0 by goroutine 831:
2024-08-15T05:59:46.4534490Z   github.com/thrasher-corp/gocryptotrader/database/repository/withdraw.getByColumns()
2024-08-15T05:59:46.4535410Z       /Users/runner/work/gocryptotrader/gocryptotrader/database/repository/withdraw/withdraw.go:292 +0x66
2024-08-15T05:59:46.4536090Z   github.com/thrasher-corp/gocryptotrader/database/repository/withdraw.GetEventByUUID()
2024-08-15T05:59:46.4536960Z       /Users/runner/work/gocryptotrader/gocryptotrader/database/repository/withdraw/withdraw.go:224 +0x33e
2024-08-15T05:59:46.4537630Z   github.com/thrasher-corp/gocryptotrader/engine.(*WithdrawManager).WithdrawalEventByID()
2024-08-15T05:59:46.4538320Z       /Users/runner/work/gocryptotrader/gocryptotrader/engine/withdraw_manager.go:110 +0x1e4
2024-08-15T05:59:46.4538850Z   github.com/thrasher-corp/gocryptotrader/engine.TestWithdrawEventByID()
2024-08-15T05:59:46.4539620Z       /Users/runner/work/gocryptotrader/gocryptotrader/engine/withdraw_manager_test.go:142 +0x224
2024-08-15T05:59:46.4539760Z   testing.tRunner()
2024-08-15T05:59:46.4540360Z       /Users/runner/hostedtoolcache/go/1.23.0/x64/src/testing/testing.go:1690 +0x226
2024-08-15T05:59:46.4540520Z   testing.(*T).Run.gowrap1()
2024-08-15T05:59:46.4541100Z       /Users/runner/hostedtoolcache/go/1.23.0/x64/src/testing/testing.go:1743 +0x44
2024-08-15T05:59:46.4541110Z 
2024-08-15T05:59:46.4541350Z Previous write at 0x0001115a8bc0 by goroutine 779:
2024-08-15T05:59:46.4541970Z   github.com/thrasher-corp/gocryptotrader/database.(*Instance).SetSQLiteConnection()
2024-08-15T05:59:46.4542780Z       /Users/runner/work/gocryptotrader/gocryptotrader/database/database.go:35 +0xc4
2024-08-15T05:59:46.4543350Z   github.com/thrasher-corp/gocryptotrader/database/drivers/sqlite3.Connect()
2024-08-15T05:59:46.4544150Z       /Users/runner/work/gocryptotrader/gocryptotrader/database/drivers/sqlite3/sqlite3.go:24 +0x19b
2024-08-15T05:59:46.4544780Z   github.com/thrasher-corp/gocryptotrader/engine.(*DatabaseConnectionManager).Start()
2024-08-15T05:59:46.4550180Z       /Users/runner/work/gocryptotrader/gocryptotrader/engine/database_connection.go:105 +0x4e4
2024-08-15T05:59:46.4553190Z   github.com/thrasher-corp/gocryptotrader/engine.RPCTestSetup()
2024-08-15T05:59:46.4554380Z       /Users/runner/work/gocryptotrader/gocryptotrader/engine/rpcserver_test.go:521 +0x1a2c
2024-08-15T05:59:46.4555180Z   github.com/thrasher-corp/gocryptotrader/engine.TestRPCServer_GetTicker_LastUpdatedNanos()
2024-08-15T05:59:46.4556140Z       /Users/runner/work/gocryptotrader/gocryptotrader/engine/rpcserver_test.go:2117 +0xcb
2024-08-15T05:59:46.4556300Z   testing.tRunner()
2024-08-15T05:59:46.4556880Z       /Users/runner/hostedtoolcache/go/1.23.0/x64/src/testing/testing.go:1690 +0x226
2024-08-15T05:59:46.4557050Z   testing.(*T).Run.gowrap1()
2024-08-15T05:59:46.4557630Z       /Users/runner/hostedtoolcache/go/1.23.0/x64/src/testing/testing.go:1743 +0x44
2024-08-15T05:59:46.4557640Z 
2024-08-15T05:59:46.4557810Z Goroutine 831 (running) created at:
2024-08-15T05:59:46.4557960Z   testing.(*T).Run()
2024-08-15T05:59:46.4558540Z       /Users/runner/hostedtoolcache/go/1.23.0/x64/src/testing/testing.go:1743 +0x825
2024-08-15T05:59:46.4558710Z   testing.runTests.func1()
2024-08-15T05:59:46.4559270Z       /Users/runner/hostedtoolcache/go/1.23.0/x64/src/testing/testing.go:2168 +0x85
2024-08-15T05:59:46.4559420Z   testing.tRunner()
2024-08-15T05:59:46.4560010Z       /Users/runner/hostedtoolcache/go/1.23.0/x64/src/testing/testing.go:1690 +0x226
2024-08-15T05:59:46.4560150Z   testing.runTests()
2024-08-15T05:59:46.4560730Z       /Users/runner/hostedtoolcache/go/1.23.0/x64/src/testing/testing.go:2166 +0x8be
2024-08-15T05:59:46.4560880Z   testing.(*M).Run()
2024-08-15T05:59:46.4561450Z       /Users/runner/hostedtoolcache/go/1.23.0/x64/src/testing/testing.go:2034 +0xf17
2024-08-15T05:59:46.4561590Z   main.main()
2024-08-15T05:59:46.4561790Z       _testmain.go:533 +0x164
2024-08-15T05:59:46.4561800Z 
2024-08-15T05:59:46.4561970Z Goroutine 779 (running) created at:
2024-08-15T05:59:46.4562130Z   testing.(*T).Run()
2024-08-15T05:59:46.4562700Z       /Users/runner/hostedtoolcache/go/1.23.0/x64/src/testing/testing.go:1743 +0x825
2024-08-15T05:59:46.4562870Z   testing.runTests.func1()
2024-08-15T05:59:46.4563450Z       /Users/runner/hostedtoolcache/go/1.23.0/x64/src/testing/testing.go:2168 +0x85
2024-08-15T05:59:46.4563590Z   testing.tRunner()
2024-08-15T05:59:46.4564170Z       /Users/runner/hostedtoolcache/go/1.23.0/x64/src/testing/testing.go:1690 +0x226
2024-08-15T05:59:46.4564320Z   testing.runTests()
2024-08-15T05:59:46.4564900Z       /Users/runner/hostedtoolcache/go/1.23.0/x64/src/testing/testing.go:2166 +0x8be
2024-08-15T05:59:46.4565050Z   testing.(*M).Run()
2024-08-15T05:59:46.4565620Z       /Users/runner/hostedtoolcache/go/1.23.0/x64/src/testing/testing.go:2034 +0xf17
2024-08-15T05:59:46.4565750Z   main.main()
2024-08-15T05:59:46.4565960Z       _testmain.go:533 +0x164
2024-08-15T05:59:46.4566080Z ==================
2024-08-15T05:59:46.4566330Z --- FAIL: TestWithdrawEventByID (2.18s)
2024-08-15T05:59:46.4566690Z     testing.go:1399: race detected during execution of test
@gloriousCode gloriousCode added bug low priority This enhancement or update will be implemented at a later date. labels Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug low priority This enhancement or update will be implemented at a later date.
Projects
None yet
Development

No branches or pull requests

1 participant