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 the NewTiKVSender #33310

Closed
hawkingrei opened this issue Mar 22, 2022 · 0 comments · Fixed by #33313
Closed

DATA RACE in the NewTiKVSender #33310

hawkingrei opened this issue Mar 22, 2022 · 0 comments · Fixed by #33313
Assignees
Labels
affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects 5.4.x versions. affects-6.0 component/br This issue is related to BR of TiDB. component/test severity/minor type/bug The issue is confirmed as a bug.

Comments

@hawkingrei
Copy link
Member

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

==================
WARNING: DATA RACE
Read at 0x00c01540cb60 by goroutine 146:
  github.com/pingcap/tidb/br/pkg/restore_test.(*fakeRestorer).RestoreFiles()
      /go/tidb/br/pkg/restore/split_test.go:593 +0x94
  github.com/pingcap/tidb/br/pkg/restore.(*tikvSender).restoreWorker.func2()
      /go/tidb/br/pkg/restore/pipeline_items.go:382 +0x10f
  golang.org/x/sync/errgroup.(*Group).Go.func1()
      /home/prow/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:57 +0x96
Previous write at 0x00c01540cb60 by goroutine 20:
  github.com/pingcap/tidb/br/pkg/restore_test.(*fakeRestorer).RestoreFiles()
      /go/tidb/br/pkg/restore/split_test.go:593 +0x144
  github.com/pingcap/tidb/br/pkg/restore.(*tikvSender).restoreWorker.func2()
      /go/tidb/br/pkg/restore/pipeline_items.go:382 +0x10f
  golang.org/x/sync/errgroup.(*Group).Go.func1()
      /home/prow/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:57 +0x96
Goroutine 146 (running) created at:
  golang.org/x/sync/errgroup.(*Group).Go()
      /home/prow/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:54 +0xf0
  github.com/pingcap/tidb/br/pkg/restore.(*tikvSender).restoreWorker()
      /go/tidb/br/pkg/restore/pipeline_items.go:381 +0x1b3
  github.com/pingcap/tidb/br/pkg/restore.NewTiKVSender·dwrap·24()
      /go/tidb/br/pkg/restore/pipeline_items.go:250 +0x64
Goroutine 20 (running) created at:
  golang.org/x/sync/errgroup.(*Group).Go()
      /home/prow/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:54 +0xf0
  github.com/pingcap/tidb/br/pkg/restore.(*tikvSender).restoreWorker()
      /go/tidb/br/pkg/restore/pipeline_items.go:381 +0x1b3
  github.com/pingcap/tidb/br/pkg/restore.NewTiKVSender·dwrap·24()
      /go/tidb/br/pkg/restore/pipeline_items.go:250 +0x64
==================
==================
WARNING: DATA RACE
Read at 0x00c01543a0a0 by goroutine 146:
  runtime.growslice()
      /usr/local/go/src/runtime/slice.go:162 +0x0
  github.com/pingcap/tidb/br/pkg/restore_test.(*fakeRestorer).RestoreFiles()
      /go/tidb/br/pkg/restore/split_test.go:593 +0xd5
  github.com/pingcap/tidb/br/pkg/restore.(*tikvSender).restoreWorker.func2()
      /go/tidb/br/pkg/restore/pipeline_items.go:382 +0x10f
  golang.org/x/sync/errgroup.(*Group).Go.func1()
      /home/prow/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:57 +0x96
Previous write at 0x00c01543a0a0 by goroutine 20:
  runtime.slicecopy()
      /usr/local/go/src/runtime/slice.go:284 +0x0
  github.com/pingcap/tidb/br/pkg/restore_test.(*fakeRestorer).RestoreFiles()
      /go/tidb/br/pkg/restore/split_test.go:593 +0x136
  github.com/pingcap/tidb/br/pkg/restore.(*tikvSender).restoreWorker.func2()
      /go/tidb/br/pkg/restore/pipeline_items.go:382 +0x10f
  golang.org/x/sync/errgroup.(*Group).Go.func1()
      /home/prow/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:57 +0x96
Goroutine 146 (running) created at:
  golang.org/x/sync/errgroup.(*Group).Go()
      /home/prow/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:54 +0xf0
  github.com/pingcap/tidb/br/pkg/restore.(*tikvSender).restoreWorker()
      /go/tidb/br/pkg/restore/pipeline_items.go:381 +0x1b3
  github.com/pingcap/tidb/br/pkg/restore.NewTiKVSender·dwrap·24()
      /go/tidb/br/pkg/restore/pipeline_items.go:250 +0x64
Goroutine 20 (running) created at:
  golang.org/x/sync/errgroup.(*Group).Go()
      /home/prow/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:54 +0xf0
  github.com/pingcap/tidb/br/pkg/restore.(*tikvSender).restoreWorker()
      /go/tidb/br/pkg/restore/pipeline_items.go:381 +0x1b3
  github.com/pingcap/tidb/br/pkg/restore.NewTiKVSender·dwrap·24()
      /go/tidb/br/pkg/restore/pipeline_items.go:250 +0x64
================== 

2. What did you expect to see? (Required)

3. What did you see instead (Required)

4. What is your TiDB version? (Required)

@hawkingrei hawkingrei added the type/bug The issue is confirmed as a bug. label Mar 22, 2022
@YuJuncen YuJuncen self-assigned this Mar 22, 2022
YuJuncen added a commit to YuJuncen/tidb that referenced this issue Mar 22, 2022
Signed-off-by: Yu Juncen <[email protected]>
@YuJuncen YuJuncen added affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects 5.4.x versions. affects-6.0 labels Mar 22, 2022
YuJuncen added a commit to ti-srebot/tidb that referenced this issue Mar 25, 2022
@tiancaiamao tiancaiamao added component/br This issue is related to BR of TiDB. component/test labels Apr 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects 5.4.x versions. affects-6.0 component/br This issue is related to BR of TiDB. component/test severity/minor type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants