-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
3. What did you see instead (Required)
WARNING: DATA RACE
Read at 0x00c000ac1f50 by goroutine 144:
slices.insertionSortCmpFunc[go.shape.*uint8]()
GOROOT/src/slices/zsortanyfunc.go:12 +0xfd
slices.pdqsortCmpFunc[go.shape.*uint8]()
GOROOT/src/slices/zsortanyfunc.go:73 +0x6c8
slices.SortFunc[go.shape.[]*github.com/pingcap/tidb/store/pdtypes.Region,go.shape.*uint8]()
GOROOT/src/slices/sort.go:28 +0xc6
github.com/pingcap/tidb/store/pdtypes.(*RegionTree).ScanRange()
store/pdtypes/region_tree.go:55 +0x7b
github.com/pingcap/tidb/br/pkg/lightning/backend/local.(*testSplitClient).ScanRegions()
br/pkg/lightning/backend/local/localhelper_test.go:257 +0x1cf
github.com/pingcap/tidb/br/pkg/restore/split.PaginateScanRegion.func1()
br/pkg/restore/split/split.go:106 +0x1b6
github.com/pingcap/tidb/br/pkg/utils.WithRetry.func1()
br/pkg/utils/retry.go:57 +0x41
github.com/pingcap/tidb/br/pkg/utils.WithRetryV2[go.shape.struct {}]()
br/pkg/utils/retry.go:75 +0xe1
github.com/pingcap/tidb/br/pkg/utils.WithRetry()
br/pkg/utils/retry.go:56 +0x8c
github.com/pingcap/tidb/br/pkg/restore/split.PaginateScanRegion()
br/pkg/restore/split/split.go:101 +0x28f
github.com/pingcap/tidb/br/pkg/lightning/backend/local.(*Backend).generateJobForRange()
br/pkg/lightning/backend/local/local.go:1264 +0x2ec
github.com/pingcap/tidb/br/pkg/lightning/backend/local.(*Backend).generateAndSendJob.func1()
br/pkg/lightning/backend/local/local.go:1196 +0x1f9
golang.org/x/sync/errgroup.(*Group).Go.func1()
external/org_golang_x_sync/errgroup/errgroup.go:75 +0x76
Previous write at 0x00c000ac1f50 by goroutine 145:
slices.insertionSortCmpFunc[go.shape.*uint8]()
GOROOT/src/slices/zsortanyfunc.go:13 +0x211
slices.pdqsortCmpFunc[go.shape.*uint8]()
GOROOT/src/slices/zsortanyfunc.go:73 +0x6c8
slices.SortFunc[go.shape.[]*github.com/pingcap/tidb/store/pdtypes.Region,go.shape.*uint8]()
GOROOT/src/slices/sort.go:28 +0xc6
github.com/pingcap/tidb/store/pdtypes.(*RegionTree).ScanRange()
store/pdtypes/region_tree.go:55 +0x7b
github.com/pingcap/tidb/br/pkg/lightning/backend/local.(*testSplitClient).ScanRegions()
br/pkg/lightning/backend/local/localhelper_test.go:257 +0x1cf
github.com/pingcap/tidb/br/pkg/restore/split.PaginateScanRegion.func1()
br/pkg/restore/split/split.go:106 +0x1b6
github.com/pingcap/tidb/br/pkg/utils.WithRetry.func1()
br/pkg/utils/retry.go:57 +0x41
github.com/pingcap/tidb/br/pkg/utils.WithRetryV2[go.shape.struct {}]()
br/pkg/utils/retry.go:75 +0xe1
github.com/pingcap/tidb/br/pkg/utils.WithRetry()
br/pkg/utils/retry.go:56 +0x8c
github.com/pingcap/tidb/br/pkg/restore/split.PaginateScanRegion()
br/pkg/restore/split/split.go:101 +0x28f
github.com/pingcap/tidb/br/pkg/lightning/backend/local.(*Backend).generateJobForRange()
br/pkg/lightning/backend/local/local.go:1264 +0x2ec
github.com/pingcap/tidb/br/pkg/lightning/backend/local.(*Backend).generateAndSendJob.func1()
br/pkg/lightning/backend/local/local.go:1196 +0x1f9
golang.org/x/sync/errgroup.(*Group).Go.func1()
external/org_golang_x_sync/errgroup/errgroup.go:75 +0x76
Goroutine 144 (running) created at:
golang.org/x/sync/errgroup.(*Group).Go()
external/org_golang_x_sync/errgroup/errgroup.go:72 +0x124
github.com/pingcap/tidb/br/pkg/lightning/backend/local.(*Backend).generateAndSendJob()
br/pkg/lightning/backend/local/local.go:1190 +0x4ae
github.com/pingcap/tidb/br/pkg/lightning/backend/local.(*Backend).prepareAndSendJob()
br/pkg/lightning/backend/local/local.go:1134 +0xa18
github.com/pingcap/tidb/br/pkg/lightning/backend/local.(*Backend).doImport()
br/pkg/lightning/backend/local/local.go:1645 +0x7e6
github.com/pingcap/tidb/br/pkg/lightning/backend/local.(*Backend).ImportEngine()
br/pkg/lightning/backend/local/local.go:1531 +0x12fd
github.com/pingcap/tidb/br/pkg/lightning/backend/local.TestExternalEngine.func3()
br/pkg/lightning/backend/local/local_test.go:2224 +0x124
Goroutine 145 (finished) created at:
golang.org/x/sync/errgroup.(*Group).Go()
external/org_golang_x_sync/errgroup/errgroup.go:72 +0x124
github.com/pingcap/tidb/br/pkg/lightning/backend/local.(*Backend).generateAndSendJob()
br/pkg/lightning/backend/local/local.go:1190 +0x4ae
github.com/pingcap/tidb/br/pkg/lightning/backend/local.(*Backend).prepareAndSendJob()
br/pkg/lightning/backend/local/local.go:1134 +0xa18
github.com/pingcap/tidb/br/pkg/lightning/backend/local.(*Backend).doImport()
br/pkg/lightning/backend/local/local.go:1645 +0x7e6
github.com/pingcap/tidb/br/pkg/lightning/backend/local.(*Backend).ImportEngine()
br/pkg/lightning/backend/local/local.go:1531 +0x12fd
github.com/pingcap/tidb/br/pkg/lightning/backend/local.TestExternalEngine.func3()
br/pkg/lightning/backend/local/local_test.go:2224 +0x124