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

TestMysqlSinkWorker has data race #4765

Closed
Tracked by #2246
overvenus opened this issue Mar 3, 2022 · 0 comments · Fixed by #4820
Closed
Tracked by #2246

TestMysqlSinkWorker has data race #4765

overvenus opened this issue Mar 3, 2022 · 0 comments · Fixed by #4820
Assignees
Labels
area/ticdc Issues or PRs related to TiCDC. component/test Unit tests and integration tests component. type/enhancement The issue or PR belongs to an enhancement.

Comments

@overvenus
Copy link
Member

Which jobs are flaking?

ut check

Which test(s) are flaking?

TestMysqlSinkWorker

Jenkins logs or GitHub Actions link

https://ci.pingcap.net/blue/organizations/jenkins/ut-check/detail/ut-check/3725/pipeline#step-49-log-351

[2022-03-03T08:30:07.004Z] === FAIL: cdc/sink TestMysqlSinkWorker (0.62s)

[2022-03-03T08:30:07.004Z] ==================

[2022-03-03T08:30:07.004Z] WARNING: DATA RACE

[2022-03-03T08:30:07.004Z] Read at 0x00c0008128b0 by goroutine 126:

[2022-03-03T08:30:07.004Z]   internal/race.Read()

[2022-03-03T08:30:07.004Z]       /usr/local/go/src/internal/race/race.go:37 +0x206

[2022-03-03T08:30:07.004Z]   sync.(*WaitGroup).Add()

[2022-03-03T08:30:07.004Z]       /usr/local/go/src/sync/waitgroup.go:71 +0x219

[2022-03-03T08:30:07.004Z]   github.com/pingcap/tiflow/cdc/sink.(*mysqlSinkWorker).appendFinishTxn()

[2022-03-03T08:30:07.004Z]       /home/jenkins/agent/workspace/ut-check/tiflow/cdc/sink/mysql_worker.go:71 +0x5d

[2022-03-03T08:30:07.004Z]   github.com/pingcap/tiflow/cdc/sink.(*mysqlSink).broadcastFinishTxn()

[2022-03-03T08:30:07.004Z]       /home/jenkins/agent/workspace/ut-check/tiflow/cdc/sink/mysql.go:429 +0xd1

[2022-03-03T08:30:07.004Z]   github.com/pingcap/tiflow/cdc/sink.(*mysqlSink).notifyAndWaitExec()

[2022-03-03T08:30:07.004Z]       /home/jenkins/agent/workspace/ut-check/tiflow/cdc/sink/mysql.go:407 +0x6d

[2022-03-03T08:30:07.004Z]   github.com/pingcap/tiflow/cdc/sink.(*mysqlSink).dispatchAndExecTxns()

[2022-03-03T08:30:07.004Z]       /home/jenkins/agent/workspace/ut-check/tiflow/cdc/sink/mysql.go:462 +0x2e9

[2022-03-03T08:30:07.004Z]   github.com/pingcap/tiflow/cdc/sink.(*mysqlSink).flushRowChangedEvents()

[2022-03-03T08:30:07.004Z]       /home/jenkins/agent/workspace/ut-check/tiflow/cdc/sink/mysql.go:277 +0x38e

[2022-03-03T08:30:07.004Z] 

[2022-03-03T08:30:07.004Z] Previous write at 0x00c0008128b0 by goroutine 140:

[2022-03-03T08:30:07.004Z]   internal/race.Write()

[2022-03-03T08:30:07.004Z]       /usr/local/go/src/internal/race/race.go:41 +0x125

[2022-03-03T08:30:07.005Z]   sync.(*WaitGroup).Wait()

[2022-03-03T08:30:07.005Z]       /usr/local/go/src/sync/waitgroup.go:128 +0x126

[2022-03-03T08:30:07.005Z]   github.com/pingcap/tiflow/cdc/sink.(*mysqlSink).notifyAndWaitExec.func1()

[2022-03-03T08:30:07.005Z]       /home/jenkins/agent/workspace/ut-check/tiflow/cdc/sink/mysql.go:411 +0x5a

[2022-03-03T08:30:07.005Z] 

[2022-03-03T08:30:07.005Z] Goroutine 126 (running) created at:

[2022-03-03T08:30:07.005Z]   github.com/pingcap/tiflow/cdc/sink.newMySQLSink()

[2022-03-03T08:30:07.005Z]       /home/jenkins/agent/workspace/ut-check/tiflow/cdc/sink/mysql.go:208 +0x1a65

[2022-03-03T08:30:07.005Z]   github.com/pingcap/tiflow/cdc/sink.TestMySQLSinkFlushResolvedTs()

[2022-03-03T08:30:07.005Z]       /home/jenkins/agent/workspace/ut-check/tiflow/cdc/sink/mysql_test.go:1174 +0x397

[2022-03-03T08:30:07.005Z]   testing.tRunner()

[2022-03-03T08:30:07.005Z]       /usr/local/go/src/testing/testing.go:1193 +0x202

[2022-03-03T08:30:07.005Z] 

[2022-03-03T08:30:07.005Z] Goroutine 140 (finished) created at:

[2022-03-03T08:30:07.005Z]   github.com/pingcap/tiflow/cdc/sink.(*mysqlSink).notifyAndWaitExec()

[2022-03-03T08:30:07.005Z]       /home/jenkins/agent/workspace/ut-check/tiflow/cdc/sink/mysql.go:410 +0xf1

[2022-03-03T08:30:07.005Z]   github.com/pingcap/tiflow/cdc/sink.(*mysqlSink).dispatchAndExecTxns()

[2022-03-03T08:30:07.005Z]       /home/jenkins/agent/workspace/ut-check/tiflow/cdc/sink/mysql.go:462 +0x2e9

[2022-03-03T08:30:07.005Z]   github.com/pingcap/tiflow/cdc/sink.(*mysqlSink).flushRowChangedEvents()

[2022-03-03T08:30:07.005Z]       /home/jenkins/agent/workspace/ut-check/tiflow/cdc/sink/mysql.go:277 +0x38e

[2022-03-03T08:30:07.005Z] ==================

[2022-03-03T08:30:07.005Z]     testing.go:1092: race detected during execution of test

Anything else we need to know

  • Does this test exist for other branches as well?

  • Has there been a high frequency of failure lately?

@overvenus overvenus added component/test Unit tests and integration tests component. area/ticdc Issues or PRs related to TiCDC. labels Mar 3, 2022
@sdojjy sdojjy added type/bug The issue is confirmed as a bug. type/enhancement The issue or PR belongs to an enhancement. and removed type/bug The issue is confirmed as a bug. labels Mar 9, 2022
ti-chi-bot pushed a commit that referenced this issue Mar 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ticdc Issues or PRs related to TiCDC. component/test Unit tests and integration tests component. type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants