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 IsDDLJobInQueue #35868

Closed
hawkingrei opened this issue Jun 30, 2022 · 0 comments · Fixed by #35865
Closed

DATA RACE in the IsDDLJobInQueue #35868

hawkingrei opened this issue Jun 30, 2022 · 0 comments · Fixed by #35865
Labels
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
Write at 0x00c005d5d768 by goroutine 110:
  github.com/pingcap/tidb/executor.ResetContextOfStmt()
      /go/tidb/executor/executor.go:1985 +0x2f6f
  github.com/pingcap/tidb/session.(*session).ExecuteStmt()
      /go/tidb/session/session.go:1906 +0x384
  github.com/pingcap/tidb/session.(*session).Execute()
      /go/tidb/session/session.go:1515 +0x478
  github.com/pingcap/tidb/server.TestConnExecutionTimeout()
      /go/tidb/server/conn_test.go:736 +0xae8
  github.com/pingcap/failpoint.(*Failpoint).Enable()
      /home/prow/go/pkg/mod/github.com/pingcap/failpoint@v0.0.0-20220423142525-ae43b7f4e5c3/failpoint.go:54 +0x44
  github.com/pingcap/failpoint.(*Failpoints).Enable()
      /home/prow/go/pkg/mod/github.com/pingcap/failpoint@v0.0.0-20220423142525-ae43b7f4e5c3/failpoints.go:105 +0x276
  github.com/pingcap/failpoint.Enable()
      /home/prow/go/pkg/mod/github.com/pingcap/failpoint@v0.0.0-20220423142525-ae43b7f4e5c3/failpoints.go:222 +0xb0
  github.com/pingcap/tidb/server.TestConnExecutionTimeout()
      /go/tidb/server/conn_test.go:688 +0xb1
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:1439 +0x213
  testing.(*T).Run.func1()
      /usr/local/go/src/testing/testing.go:1486 +0x47
Previous read at 0x00c005d5d768 by goroutine 150:
  github.com/pingcap/tidb/server.killConn()
      /go/tidb/server/server.go:725 +0x12a
  github.com/pingcap/tidb/server.(*Server).Kill()
      /go/tidb/server/server.go:704 +0x471
  github.com/pingcap/tidb/util/expensivequery.(*Handle).Run()
      /go/tidb/util/expensivequery/expensivequery.go:76 +0x7e2
  github.com/pingcap/tidb/server.TestConnExecutionTimeout.func1()
      /go/tidb/server/conn_test.go:715 +0x39
Goroutine 110 (running) created at:
  testing.(*T).Run()
      /usr/local/go/src/testing/testing.go:1486 +0x724
  testing.runTests.func1()
      /usr/local/go/src/testing/testing.go:1839 +0x99
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:1439 +0x213
  testing.runTests()
      /usr/local/go/src/testing/testing.go:1837 +0x7e4
  testing.(*M).Run()
      /usr/local/go/src/testing/testing.go:1719 +0xa71
  go.uber.org/goleak.VerifyTestMain()
      /home/prow/go/pkg/mod/go.uber.org/goleak@v1.1.12/testmain.go:53 +0x59
  github.com/pingcap/tidb/server.TestMain()
      /go/tidb/server/main_test.go:73 +0xd84
  main.main()
      _testmain.go:281 +0x3f7
Goroutine 150 (running) created at:
  github.com/pingcap/tidb/server.TestConnExecutionTimeout()
      /go/tidb/server/conn_test.go:715 +0x779
  github.com/pingcap/failpoint.(*Failpoint).Enable()
      /home/prow/go/pkg/mod/github.com/pingcap/failpoint@v0.0.0-20220423142525-ae43b7f4e5c3/failpoint.go:54 +0x44
  github.com/pingcap/failpoint.(*Failpoints).Enable()
      /home/prow/go/pkg/mod/github.com/pingcap/failpoint@v0.0.0-20220423142525-ae43b7f4e5c3/failpoints.go:105 +0x276
  github.com/pingcap/failpoint.Enable()
      /home/prow/go/pkg/mod/github.com/pingcap/failpoint@v0.0.0-20220423142525-ae43b7f4e5c3/failpoints.go:222 +0xb0
  github.com/pingcap/tidb/server.TestConnExecutionTimeout()
      /go/tidb/server/conn_test.go:688 +0xb1
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:1439 +0x213
  testing.(*T).Run.func1()
      /usr/local/go/src/testing/testing.go:1486 +0x47
================== 

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 Jun 30, 2022
you06 added a commit to you06/tidb that referenced this issue Jul 1, 2022
Signed-off-by: you06 <you1474600@gmail.com>

fix tests

Signed-off-by: you06 <you1474600@gmail.com>

fix test

Signed-off-by: you06 <you1474600@gmail.com>

update

Signed-off-by: you06 <you1474600@gmail.com>

update bazel

Signed-off-by: you06 <you1474600@gmail.com>

fix test

Signed-off-by: you06 <you1474600@gmail.com>

fix test

Signed-off-by: you06 <you1474600@gmail.com>

update

Signed-off-by: you06 <you1474600@gmail.com>

update client-go

Signed-off-by: you06 <you1474600@gmail.com>

update client-go

Signed-off-by: you06 <you1474600@gmail.com>

update grafana

Signed-off-by: you06 <you1474600@gmail.com>

update bazel

Signed-off-by: you06 <you1474600@gmail.com>

display by stack

Signed-off-by: you06 <you1474600@gmail.com>

set request source for ctx of

Signed-off-by: you06 <you1474600@gmail.com>

address comment

Signed-off-by: you06 <you1474600@gmail.com>

address comment

Signed-off-by: you06 <you1474600@gmail.com>

parser, ddl: support decoding binary literal in set/enum (pingcap#35822)

close pingcap#31338

executor: fix a nil point when @@tidb_enable_collect_execution_info is off and cop cache is on (pingcap#35839)

close pingcap#35829

ddl: support drop columns for multi-schema change (pingcap#35737)

ref pingcap#14766

planner: don't push down predicates over table dual (pingcap#35669)

close pingcap#35527

*: Remove some useless staleness code (pingcap#35849)

close pingcap#35848

ddl: fix potential wrong column definition when setting default value (pingcap#35845)

close pingcap#35846

*: add timeout for test cases (pingcap#35844)

ddl: remove `onDropColumns` and `onAddColumns` (pingcap#35862)

ref pingcap#14766

*: Fix Dockerfile (pingcap#35835)

close pingcap#35828

server: refactor TestConnExecutionTimeout (pingcap#35865)

close pingcap#35868

fix test

Signed-off-by: you06 <you1474600@gmail.com>

fix lint

Signed-off-by: you06 <you1474600@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

1 participant