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 pkg/executor/aggregate.(*HashAggExec).Close() #51254

Closed
Tracked by #41316
hawkingrei opened this issue Feb 22, 2024 · 0 comments · Fixed by #51342
Closed
Tracked by #41316

DATA RACE in the pkg/executor/aggregate.(*HashAggExec).Close() #51254

hawkingrei opened this issue Feb 22, 2024 · 0 comments · Fixed by #51342
Labels
component/test severity/major sig/execution SIG execution 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)

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

3. What did you see instead (Required)

==================
WARNING: DATA RACE
Write at 0x00c000a403f8 by goroutine 63:
  github.com/pingcap/tidb/pkg/executor/aggregate.(*HashAggExec).Close()
      pkg/executor/aggregate/agg_hash_executor.go:204 +0x91a
  pkg/executor/aggregate/aggregate_test_test.randomFailTest.func1.1()
      pkg/executor/aggregate/agg_spill_test.go:319 +0x2e
  sync.(*Once).doSlow()
      GOROOT/src/sync/once.go:74 +0xf0
  sync.(*Once).Do()
      GOROOT/src/sync/once.go:65 +0x44
  pkg/executor/aggregate/aggregate_test_test.randomFailTest.func1()
      pkg/executor/aggregate/agg_spill_test.go:318 +0x93
Previous read at 0x00c000a403f8 by goroutine 59:
  github.com/pingcap/tidb/pkg/executor/aggregate.(*HashAggExec).parallelExec()
      pkg/executor/aggregate/agg_hash_executor.go:596 +0x204
  github.com/pingcap/tidb/pkg/executor/aggregate.(*HashAggExec).Next()
      pkg/executor/aggregate/agg_hash_executor.go:410 +0x144
  pkg/executor/aggregate/aggregate_test_test.randomFailTest()
      pkg/executor/aggregate/agg_spill_test.go:325 +0x2fc
  pkg/executor/aggregate/aggregate_test_test.TestRandomFail()
      pkg/executor/aggregate/agg_spill_test.go:426 +0x488
  github.com/pingcap/failpoint.parseTerm()
      external/com_github_pingcap_failpoint/terms.go:149 +0x364
  github.com/pingcap/failpoint.parse()
      external/com_github_pingcap_failpoint/terms.go:126 +0xa5
  github.com/pingcap/failpoint.newTerms()
      external/com_github_pingcap_failpoint/terms.go:98 +0x3e
  github.com/pingcap/failpoint.(*Failpoint).Enable()
      external/com_github_pingcap_failpoint/failpoint.go:54 +0x3e
  github.com/pingcap/failpoint.(*Failpoints).Enable()
      external/com_github_pingcap_failpoint/failpoints.go:105 +0x296
  github.com/pingcap/failpoint.Enable()
      external/com_github_pingcap_failpoint/failpoints.go:222 +0xb3
  pkg/executor/aggregate/aggregate_test_test.TestRandomFail()
      pkg/executor/aggregate/agg_spill_test.go:400 +0x8f
  github.com/pingcap/failpoint.parseTerm()
      external/com_github_pingcap_failpoint/terms.go:149 +0x364
  github.com/pingcap/failpoint.parse()
      external/com_github_pingcap_failpoint/terms.go:126 +0xa5
  github.com/pingcap/failpoint.newTerms()
      external/com_github_pingcap_failpoint/terms.go:98 +0x3e
  github.com/pingcap/failpoint.(*Failpoint).Enable()
      external/com_github_pingcap_failpoint/failpoint.go:54 +0x3e
  github.com/pingcap/failpoint.(*Failpoints).Enable()
      external/com_github_pingcap_failpoint/failpoints.go:105 +0x296
  github.com/pingcap/failpoint.Enable()
      external/com_github_pingcap_failpoint/failpoints.go:222 +0x8e
  pkg/executor/aggregate/aggregate_test_test.TestRandomFail()
      pkg/executor/aggregate/agg_spill_test.go:399 +0x6a
  testing.tRunner()
      GOROOT/src/testing/testing.go:1595 +0x261
  testing.(*T).Run.func1()
      GOROOT/src/testing/testing.go:1648 +0x44
Goroutine 63 (running) created at:
  pkg/executor/aggregate/aggregate_test_test.randomFailTest()
      pkg/executor/aggregate/agg_spill_test.go:316 +0x2c4
  pkg/executor/aggregate/aggregate_test_test.TestRandomFail()
      pkg/executor/aggregate/agg_spill_test.go:426 +0x488
  github.com/pingcap/failpoint.parseTerm()
      external/com_github_pingcap_failpoint/terms.go:149 +0x364
  github.com/pingcap/failpoint.parse()
      external/com_github_pingcap_failpoint/terms.go:126 +0xa5
  github.com/pingcap/failpoint.newTerms()
      external/com_github_pingcap_failpoint/terms.go:98 +0x3e
  github.com/pingcap/failpoint.(*Failpoint).Enable()
      external/com_github_pingcap_failpoint/failpoint.go:54 +0x3e
  github.com/pingcap/failpoint.(*Failpoints).Enable()
      external/com_github_pingcap_failpoint/failpoints.go:105 +0x296
  github.com/pingcap/failpoint.Enable()
      external/com_github_pingcap_failpoint/failpoints.go:222 +0xb3
  pkg/executor/aggregate/aggregate_test_test.TestRandomFail()
      pkg/executor/aggregate/agg_spill_test.go:400 +0x8f
  github.com/pingcap/failpoint.parseTerm()
      external/com_github_pingcap_failpoint/terms.go:149 +0x364
  github.com/pingcap/failpoint.parse()
      external/com_github_pingcap_failpoint/terms.go:126 +0xa5
  github.com/pingcap/failpoint.newTerms()
      external/com_github_pingcap_failpoint/terms.go:98 +0x3e
  github.com/pingcap/failpoint.(*Failpoint).Enable()
      external/com_github_pingcap_failpoint/failpoint.go:54 +0x3e
  github.com/pingcap/failpoint.(*Failpoints).Enable()
      external/com_github_pingcap_failpoint/failpoints.go:105 +0x296
  github.com/pingcap/failpoint.Enable()
      external/com_github_pingcap_failpoint/failpoints.go:222 +0x8e
  pkg/executor/aggregate/aggregate_test_test.TestRandomFail()
      pkg/executor/aggregate/agg_spill_test.go:399 +0x6a
  testing.tRunner()
      GOROOT/src/testing/testing.go:1595 +0x261
  testing.(*T).Run.func1()
      GOROOT/src/testing/testing.go:1648 +0x44
Goroutine 59 (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/aggregate/aggregate_test_/testmain.go:125 +0x5d1
================== 

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

4. What is your TiDB version? (Required)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/test severity/major sig/execution SIG execution type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants