Skip to content

DATA RACE in the TestInterruptedDuringSort #50679

@hawkingrei

Description

@hawkingrei

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 0x00c02ca2a000 by goroutine 168555:
  github.com/pingcap/tidb/pkg/executor/sortexec.TestInterruptedDuringSort()
      pkg/executor/sortexec/sortexec_pkg_test.go:71 +0x719
  sort.partition_func()
      GOROOT/src/sort/zsortfunc.go:157 +0x1a8
  sort.pdqsort_func()
      GOROOT/src/sort/zsortfunc.go:114 +0x2a4
  sort.Slice()
      GOROOT/src/sort/slice.go:26 +0x1cf
  github.com/pingcap/tidb/pkg/executor/sortexec.(*sortPartition).sortNoLock()
      pkg/executor/sortexec/sort_partition.go:184 +0x210
  github.com/pingcap/tidb/pkg/executor/sortexec.(*sortPartition).sort()
      pkg/executor/sortexec/sort_partition.go:163 +0x9c
  github.com/pingcap/tidb/pkg/executor/sortexec.TestInterruptedDuringSort()
      pkg/executor/sortexec/sortexec_pkg_test.go:70 +0x6f7
  testing.tRunner()
      GOROOT/src/testing/testing.go:1595 +0x261
  testing.(*T).Run.func1()
      GOROOT/src/testing/testing.go:1648 +0x44
Previous write at 0x00c02ca2a000 by goroutine 168556:
  github.com/pingcap/tidb/pkg/executor/sortexec.TestInterruptedDuringSort.func1()
      pkg/executor/sortexec/sortexec_pkg_test.go:68 +0x87
Goroutine 168555 (running) created at:
  testing.(*T).Run()
      GOROOT/src/testing/testing.go:1648 +0x845
  testing.runTests.func1()
      GOROOT/src/testing/testing.go:2054 +0x84
  testing.tRunner()
      GOROOT/src/testing/testing.go:1595 +0x261
  testing.runTests()
      GOROOT/src/testing/testing.go:2052 +0x8ad
  testing.(*M).Run()
      GOROOT/src/testing/testing.go:1925 +0xcd7
  main.main()
      bazel-out/k8-fastbuild/bin/pkg/executor/sortexec/sortexec_test_/testmain.go:135 +0x5d1
Goroutine 168556 (finished) created at:
  github.com/pingcap/tidb/pkg/executor/sortexec.TestInterruptedDuringSort()
      pkg/executor/sortexec/sortexec_pkg_test.go:65 +0x6ea
  testing.tRunner()
      GOROOT/src/testing/testing.go:1595 +0x261
  testing.(*T).Run.func1()
      GOROOT/src/testing/testing.go:1648 +0x44 

https://tiprow.hawkingrei.com/view/gs/pingcapprow/logs/tidb_data_race/1749800443132776448#1:build-log.txt%3A21085

4. What is your TiDB version? (Required)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions