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 TestResumeFromCheckpointPhantom #246

Open
kolbe opened this issue Nov 22, 2023 · 1 comment
Open

Data race in TestResumeFromCheckpointPhantom #246

kolbe opened this issue Nov 22, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@kolbe
Copy link
Collaborator

kolbe commented Nov 22, 2023

I've only seen this once.

2023-11-22T20:46:13.1302308Z ==================
2023-11-22T20:46:13.1302412Z WARNING: DATA RACE
2023-11-22T20:46:13.1302847Z Write at 0x00c000407640 by goroutine 9406:
2023-11-22T20:46:13.1303365Z   github.com/cashapp/spirit/pkg/migration.TestResumeFromCheckpointPhantom()
2023-11-22T20:46:13.1304304Z       /home/runner/work/spirit/spirit/pkg/migration/runner_test.go:2082 +0x258e
2023-11-22T20:46:13.1304461Z   testing.tRunner()
2023-11-22T20:46:13.1304871Z       /opt/hostedtoolcache/go/1.21.4/x64/src/testing/testing.go:1595 +0x238
2023-11-22T20:46:13.1304990Z   testing.(*T).Run.func1()
2023-11-22T20:46:13.1305339Z       /opt/hostedtoolcache/go/1.21.4/x64/src/testing/testing.go:1648 +0x44
2023-11-22T20:46:13.1305349Z 
2023-11-22T20:46:13.1305516Z Previous read at 0x00c000407640 by goroutine 9454:
2023-11-22T20:46:13.1305832Z   github.com/cashapp/spirit/pkg/repl.(*Client).OnRow()
2023-11-22T20:46:13.1306291Z       /home/runner/work/spirit/spirit/pkg/repl/client.go:139 +0x1e8
2023-11-22T20:46:13.1306645Z   github.com/go-mysql-org/go-mysql/canal.(*Canal).handleRowsEvent()
2023-11-22T20:46:13.1307539Z       /home/runner/go/pkg/mod/github.com/go-mysql-org/[email protected]/canal/sync.go:265 +0x403
2023-11-22T20:46:13.1308078Z   github.com/go-mysql-org/go-mysql/canal.(*Canal).runSyncBinlog()
2023-11-22T20:46:13.1309350Z       /home/runner/go/pkg/mod/github.com/go-mysql-org/[email protected]/canal/sync.go:97 +0x691
2023-11-22T20:46:13.1309629Z   github.com/go-mysql-org/go-mysql/canal.(*Canal).run()
2023-11-22T20:46:13.1310642Z       /home/runner/go/pkg/mod/github.com/go-mysql-org/[email protected]/canal/canal.go:239 +0x1d5
2023-11-22T20:46:13.1310900Z   github.com/go-mysql-org/go-mysql/canal.(*Canal).Run()
2023-11-22T20:46:13.1311625Z       /home/runner/go/pkg/mod/github.com/go-mysql-org/[email protected]/canal/canal.go:194 +0x6e
2023-11-22T20:46:13.1311892Z   github.com/go-mysql-org/go-mysql/canal.(*Canal).RunFrom()
2023-11-22T20:46:13.1312877Z       /home/runner/go/pkg/mod/github.com/go-mysql-org/[email protected]/canal/canal.go:201 +0x6f
2023-11-22T20:46:13.1313287Z   github.com/cashapp/spirit/pkg/repl.(*Client).startCanal()
2023-11-22T20:46:13.1313687Z       /home/runner/work/spirit/spirit/pkg/repl/client.go:328 +0x1c7
2023-11-22T20:46:13.1313952Z   github.com/cashapp/spirit/pkg/repl.(*Client).Run.func1()
2023-11-22T20:46:13.1314259Z       /home/runner/work/spirit/spirit/pkg/repl/client.go:282 +0x33
2023-11-22T20:46:13.1314267Z 
2023-11-22T20:46:13.1314394Z Goroutine 9406 (running) created at:
2023-11-22T20:46:13.1314500Z   testing.(*T).Run()
2023-11-22T20:46:13.1315013Z       /opt/hostedtoolcache/go/1.21.4/x64/src/testing/testing.go:1648 +0x82a
2023-11-22T20:46:13.1315240Z   testing.runTests.func1()
2023-11-22T20:46:13.1315870Z       /opt/hostedtoolcache/go/1.21.4/x64/src/testing/testing.go:2054 +0x84
2023-11-22T20:46:13.1316063Z   testing.tRunner()
2023-11-22T20:46:13.1316680Z       /opt/hostedtoolcache/go/1.21.4/x64/src/testing/testing.go:1595 +0x238
2023-11-22T20:46:13.1316792Z   testing.runTests()
2023-11-22T20:46:13.1317136Z       /opt/hostedtoolcache/go/1.21.4/x64/src/testing/testing.go:2052 +0x896
2023-11-22T20:46:13.1317245Z   testing.(*M).Run()
2023-11-22T20:46:13.1317580Z       /opt/hostedtoolcache/go/1.21.4/x64/src/testing/testing.go:1925 +0xb57
2023-11-22T20:46:13.1317782Z   github.com/cashapp/spirit/pkg/migration.TestMain()
2023-11-22T20:46:13.1318189Z       /home/runner/work/spirit/spirit/pkg/migration/migration_test.go:23 +0x90
2023-11-22T20:46:13.1318290Z   main.main()
2023-11-22T20:46:13.1318467Z       _testmain.go:143 +0x307
2023-11-22T20:46:13.1318473Z 
2023-11-22T20:46:13.1318590Z Goroutine 9454 (running) created at:
2023-11-22T20:46:13.1318787Z   github.com/cashapp/spirit/pkg/repl.(*Client).Run()
2023-11-22T20:46:13.1319290Z       /home/runner/work/spirit/spirit/pkg/repl/client.go:282 +0xd76
2023-11-22T20:46:13.1319723Z   github.com/cashapp/spirit/pkg/migration.(*Runner).resumeFromCheckpoint()
2023-11-22T20:46:13.1320342Z       /home/runner/work/spirit/spirit/pkg/migration/runner.go:809 +0x16c4
2023-11-22T20:46:13.1320690Z   github.com/cashapp/spirit/pkg/migration.TestResumeFromCheckpointPhantom()
2023-11-22T20:46:13.1321089Z       /home/runner/work/spirit/spirit/pkg/migration/runner_test.go:2079 +0x2397
2023-11-22T20:46:13.1321195Z   testing.tRunner()
2023-11-22T20:46:13.1321544Z       /opt/hostedtoolcache/go/1.21.4/x64/src/testing/testing.go:1595 +0x238
2023-11-22T20:46:13.1321658Z   testing.(*T).Run.func1()
2023-11-22T20:46:13.1322003Z       /opt/hostedtoolcache/go/1.21.4/x64/src/testing/testing.go:1648 +0x44
2023-11-22T20:46:13.1322088Z ==================

TestResumeFromCheckpointPhantom_datarace.txt

@morgo morgo added the bug Something isn't working label Dec 3, 2023
@morgo
Copy link
Collaborator

morgo commented Jan 11, 2024

Another race, probably unrelated. Can fix at the same time:

024-01-11T03:02:57.1302324Z ==================
2024-01-11T03:02:57.1302662Z WARNING: DATA RACE
2024-01-11T03:02:57.1303026Z Write at 0x00c00009ebe0 by goroutine 3142:
2024-01-11T03:02:57.1303646Z   github.com/cashapp/spirit/pkg/repl.(*Client).Run()
2024-01-11T03:02:57.1304391Z       /home/runner/work/spirit/spirit/pkg/repl/client.go:259 +0xa3c
2024-01-11T03:02:57.1305053Z   github.com/cashapp/spirit/pkg/migration.TestCheckpoint()
2024-01-11T03:02:57.1305920Z       /home/runner/work/spirit/spirit/pkg/migration/runner_test.go:811 +0x16ed
2024-01-11T03:02:57.1306774Z   testing.tRunner()
2024-01-11T03:02:57.1307399Z       /opt/hostedtoolcache/go/1.21.5/x64/src/testing/testing.go:1595 +0x261
2024-01-11T03:02:57.1308009Z   testing.(*T).Run.func1()
2024-01-11T03:02:57.1308641Z       /opt/hostedtoolcache/go/1.21.5/x64/src/testing/testing.go:1648 +0x44
2024-01-11T03:02:57.1309037Z 
2024-01-11T03:02:57.1309268Z Previous read at 0x00c00009ebe0 by goroutine 3177:
2024-01-11T03:02:57.1309895Z   github.com/cashapp/spirit/pkg/repl.(*Client).startCanal()
2024-01-11T03:02:57.1310643Z       /home/runner/work/spirit/spirit/pkg/repl/client.go:330 +0x1a5
2024-01-11T03:02:57.1311346Z   github.com/cashapp/spirit/pkg/repl.(*Client).Run.func1()
2024-01-11T03:02:57.1312211Z       /home/runner/work/spirit/spirit/pkg/repl/client.go:284 +0x33
2024-01-11T03:02:57.1312644Z 
2024-01-11T03:02:57.1312800Z Goroutine 3142 (running) created at:
2024-01-11T03:02:57.1313223Z   testing.(*T).Run()
2024-01-11T03:02:57.1314194Z       /opt/hostedtoolcache/go/1.21.5/x64/src/testing/testing.go:1648 +0x845
2024-01-11T03:02:57.1314807Z   testing.runTests.func1()
2024-01-11T03:02:57.1315439Z       /opt/hostedtoolcache/go/1.21.5/x64/src/testing/testing.go:2054 +0x84
2024-01-11T03:02:57.1316093Z   testing.tRunner()
2024-01-11T03:02:57.1316662Z       /opt/hostedtoolcache/go/1.21.5/x64/src/testing/testing.go:1595 +0x261
2024-01-11T03:02:57.1317228Z   testing.runTests()
2024-01-11T03:02:57.1317897Z       /opt/hostedtoolcache/go/1.21.5/x64/src/testing/testing.go:2052 +0x8ad
2024-01-11T03:02:57.1318412Z   testing.(*M).Run()
2024-01-11T03:02:57.1318989Z       /opt/hostedtoolcache/go/1.21.5/x64/src/testing/testing.go:1925 +0xcd7
2024-01-11T03:02:57.1319730Z   github.com/cashapp/spirit/pkg/migration.TestMain()
2024-01-11T03:02:57.1320479Z       /home/runner/work/spirit/spirit/pkg/migration/migration_test.go:23 +0x90
2024-01-11T03:02:57.1321095Z   main.main()
2024-01-11T03:02:57.1321620Z       _testmain.go:147 +0x307
2024-01-11T03:02:57.1321851Z 
2024-01-11T03:02:57.1322002Z Goroutine 3177 (running) created at:
2024-01-11T03:02:57.1322532Z   github.com/cashapp/spirit/pkg/repl.(*Client).Run()
2024-01-11T03:02:57.1323298Z       /home/runner/work/spirit/spirit/pkg/repl/client.go:284 +0xddc
2024-01-11T03:02:57.1324022Z   github.com/cashapp/spirit/pkg/migration.(*Runner).resumeFromCheckpoint()
2024-01-11T03:02:57.1324890Z       /home/runner/work/spirit/spirit/pkg/migration/runner.go:821 +0x19ac
2024-01-11T03:02:57.1325660Z   github.com/cashapp/spirit/pkg/migration.TestCheckpoint()
2024-01-11T03:02:57.1326463Z       /home/runner/work/spirit/spirit/pkg/migration/runner_test.go:808 +0x16a4
2024-01-11T03:02:57.1327044Z   testing.tRunner()
2024-01-11T03:02:57.1327713Z       /opt/hostedtoolcache/go/1.21.5/x64/src/testing/testing.go:1595 +0x261
2024-01-11T03:02:57.1328304Z   testing.(*T).Run.func1()
2024-01-11T03:02:57.1328877Z       /opt/hostedtoolcache/go/1.21.5/x64/src/testing/testing.go:1648 +0x44
2024-01-11T03:02:57.1329545Z ==================
2024-01-11T03:02:57.1330050Z     testing.go:1465: race detected during execution of test
2024-01-11T03:02:57.1330590Z --- FAIL: TestCheckpoint (4.05s)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants