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 to Checkpoint.globalPointSaveTime #4314

Closed
lance6716 opened this issue Jan 13, 2022 · 1 comment · Fixed by #4419
Closed

data race to Checkpoint.globalPointSaveTime #4314

lance6716 opened this issue Jan 13, 2022 · 1 comment · Fixed by #4419
Assignees
Labels
area/dm Issues or PRs related to DM. severity/minor type/bug The issue is confirmed as a bug.

Comments

@lance6716
Copy link
Contributor

What did you do?

start a task

What did you expect to see?

no race

What did you see instead?

WARNING: DATA RACE
Write at 0x00c000f8caf0 by goroutine 41:
  github.com/pingcap/tiflow/dm/syncer.(*RemoteCheckPoint).FlushPointsExcept()
      /home/lance/Projects/ticdc/dm/syncer/checkpoint.go:691 +0x116f
  github.com/pingcap/tiflow/dm/syncer.(*checkpointFlushWorker).Run()
      /home/lance/Projects/ticdc/dm/syncer/checkpoint_flush_worker.go:90 +0x8f1
  github.com/pingcap/tiflow/dm/syncer.(*Syncer).Run.func3()
      /home/lance/Projects/ticdc/dm/syncer/syncer.go:1474 +0xd1

Previous read at 0x00c000f8caf0 by goroutine 169:
  runtime.racereadrange()
      <autogenerated>:1 +0x1b
  github.com/pingcap/tiflow/dm/syncer.(*Syncer).checkShouldFlush()
      /home/lance/Projects/ticdc/dm/syncer/syncer.go:976 +0x82
  github.com/pingcap/tiflow/dm/syncer.(*Syncer).handleRowsEvent()
      /home/lance/Projects/ticdc/dm/syncer/syncer.go:2350 +0x4157
  github.com/pingcap/tiflow/dm/syncer.(*Syncer).Run()
      /home/lance/Projects/ticdc/dm/syncer/syncer.go:2010 +0x7d87
  github.com/pingcap/tiflow/dm/syncer.(*Syncer).Process()
      /home/lance/Projects/ticdc/dm/syncer/syncer.go:673 +0x7c7
  github.com/pingcap/tiflow/dm/dm/worker.(*SubTask).run·dwrap·56()
      /home/lance/Projects/ticdc/dm/dm/worker/subtask.go:250 +0x75

Goroutine 41 (running) created at:
  github.com/pingcap/tiflow/dm/syncer.(*Syncer).Run()
      /home/lance/Projects/ticdc/dm/syncer/syncer.go:1472 +0x587
  github.com/pingcap/tiflow/dm/syncer.(*Syncer).Process()
      /home/lance/Projects/ticdc/dm/syncer/syncer.go:673 +0x7c7
  github.com/pingcap/tiflow/dm/dm/worker.(*SubTask).run·dwrap·56()
      /home/lance/Projects/ticdc/dm/dm/worker/subtask.go:250 +0x75

Goroutine 169 (running) created at:
  github.com/pingcap/tiflow/dm/dm/worker.(*SubTask).run()
      /home/lance/Projects/ticdc/dm/dm/worker/subtask.go:250 +0x75b
  github.com/pingcap/tiflow/dm/dm/worker.(*SubTask).fetchResultAndUpdateStage()
      /home/lance/Projects/ticdc/dm/dm/worker/subtask.go:324 +0xa8b
  github.com/pingcap/tiflow/dm/dm/worker.(*SubTask).run·dwrap·55()
      /home/lance/Projects/ticdc/dm/dm/worker/subtask.go:249 +0x47
==================

Versions of the cluster

DM version (run dmctl -V or dm-worker -V or dm-master -V):

master

Upstream MySQL/MariaDB server version:

(paste upstream MySQL/MariaDB server version here)

Downstream TiDB cluster version (execute SELECT tidb_version(); in a MySQL client):

(paste TiDB cluster version here)

How did you deploy DM: tiup or manually?

(leave TiUP or manually here)

Other interesting information (system version, hardware config, etc):

>
>

current status of DM cluster (execute query-status <task-name> in dmctl)

(paste current status of DM cluster here)
@lance6716 lance6716 added type/bug The issue is confirmed as a bug. area/dm Issues or PRs related to DM. severity/minor labels Jan 13, 2022
@buchuitoudegou
Copy link
Contributor

Would u mind adding the task config to reproduce it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dm Issues or PRs related to DM. severity/minor type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants