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 github.com/pingcap/tidb/br/pkg/lightning.TestGetDeleteTask #29726

Closed
Tracked by #25899
VelocityLight opened this issue Nov 12, 2021 · 3 comments
Closed
Tracked by #25899
Labels
component/test severity/major type/bug The issue is confirmed as a bug.

Comments

@VelocityLight
Copy link

VelocityLight commented Nov 12, 2021

Bug Report

WARNING: DATA RACE
Read at 0x00c000f9e2d0 by goroutine 62:
  github.com/pingcap/tidb/br/pkg/lightning.(*Lightning).handleGetTask()
      /home/jenkins/agent/workspace/atom-ut/tidb/br/pkg/lightning/lightning.go:420 +0x78
  github.com/pingcap/tidb/br/pkg/lightning.(*Lightning).handleTask()
      /home/jenkins/agent/workspace/atom-ut/tidb/br/pkg/lightning/lightning.go:396 +0x430
  github.com/pingcap/tidb/br/pkg/lightning.(*Lightning).handleTask-fm()
      /home/jenkins/agent/workspace/atom-ut/tidb/br/pkg/lightning/lightning.go:384 +0x68
  net/http.HandlerFunc.ServeHTTP()
      /usr/local/go/src/net/http/server.go:2069 +0x51
  net/http.StripPrefix.func1()
      /usr/local/go/src/net/http/server.go:2112 +0x535
  net/http.HandlerFunc.ServeHTTP()
      /usr/local/go/src/net/http/server.go:2069 +0x51
  net/http.(*ServeMux).ServeHTTP()
      /usr/local/go/src/net/http/server.go:2448 +0xaf
  net/http.serverHandler.ServeHTTP()
      /usr/local/go/src/net/http/server.go:2887 +0xca
  net/http.(*conn).serve()
      /usr/local/go/src/net/http/server.go:1952 +0x87d

Previous write at 0x00c000f9e2d0 by goroutine 57:
  github.com/pingcap/tidb/br/pkg/lightning.(*Lightning).RunServer()
      /home/jenkins/agent/workspace/atom-ut/tidb/br/pkg/lightning/lightning.go:205 +0x1e5
  github.com/pingcap/tidb/br/pkg/lightning.TestGetDeleteTask.func3()
      /home/jenkins/agent/workspace/atom-ut/tidb/br/pkg/lightning/lightning_server_serial_test.go:178 +0x4b

Goroutine 62 (running) created at:
  net/http.(*Server).Serve()
      /usr/local/go/src/net/http/server.go:3013 +0x644
  github.com/pingcap/tidb/br/pkg/lightning.(*Lightning).goServe.func2()
      /home/jenkins/agent/workspace/atom-ut/tidb/br/pkg/lightning/lightning.go:179 +0x8d

Goroutine 57 (running) created at:
  github.com/pingcap/tidb/br/pkg/lightning.TestGetDeleteTask()
      /home/jenkins/agent/workspace/atom-ut/tidb/br/pkg/lightning/lightning_server_serial_test.go:177 +0x1eb
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:1193 +0x202
==================
==================
WARNING: DATA RACE
Read at 0x00c000bcf9a0 by goroutine 62:
  github.com/pingcap/tidb/br/pkg/lightning/config.(*List).AllIDs()
      /home/jenkins/agent/workspace/atom-ut/tidb/br/pkg/lightning/config/configlist.go:121 +0x6e
  github.com/pingcap/tidb/br/pkg/lightning.(*Lightning).handleGetTask()
      /home/jenkins/agent/workspace/atom-ut/tidb/br/pkg/lightning/lightning.go:421 +0xc7
  github.com/pingcap/tidb/br/pkg/lightning.(*Lightning).handleTask()
      /home/jenkins/agent/workspace/atom-ut/tidb/br/pkg/lightning/lightning.go:396 +0x430
  github.com/pingcap/tidb/br/pkg/lightning.(*Lightning).handleTask-fm()
      /home/jenkins/agent/workspace/atom-ut/tidb/br/pkg/lightning/lightning.go:384 +0x68
  net/http.HandlerFunc.ServeHTTP()
      /usr/local/go/src/net/http/server.go:2069 +0x51
  net/http.StripPrefix.func1()
      /usr/local/go/src/net/http/server.go:2112 +0x535
  net/http.HandlerFunc.ServeHTTP()
      /usr/local/go/src/net/http/server.go:2069 +0x51
  net/http.(*ServeMux).ServeHTTP()
      /usr/local/go/src/net/http/server.go:2448 +0xaf
  net/http.serverHandler.ServeHTTP()
      /usr/local/go/src/net/http/server.go:2887 +0xca
  net/http.(*conn).serve()
      /usr/local/go/src/net/http/server.go:1952 +0x87d

Previous write at 0x00c000bcf9a0 by goroutine 57:
  github.com/pingcap/tidb/br/pkg/lightning/config.NewConfigList()
      /home/jenkins/agent/workspace/atom-ut/tidb/br/pkg/lightning/config/configlist.go:41 +0x144
  github.com/pingcap/tidb/br/pkg/lightning.(*Lightning).RunServer()
      /home/jenkins/agent/workspace/atom-ut/tidb/br/pkg/lightning/lightning.go:205 +0x1c7
  github.com/pingcap/tidb/br/pkg/lightning.TestGetDeleteTask.func3()
      /home/jenkins/agent/workspace/atom-ut/tidb/br/pkg/lightning/lightning_server_serial_test.go:178 +0x4b

Goroutine 62 (running) created at:
  net/http.(*Server).Serve()
      /usr/local/go/src/net/http/server.go:3013 +0x644
  github.com/pingcap/tidb/br/pkg/lightning.(*Lightning).goServe.func2()
      /home/jenkins/agent/workspace/atom-ut/tidb/br/pkg/lightning/lightning.go:179 +0x8d

Goroutine 57 (running) created at:
  github.com/pingcap/tidb/br/pkg/lightning.TestGetDeleteTask()
      /home/jenkins/agent/workspace/atom-ut/tidb/br/pkg/lightning/lightning_server_serial_test.go:177 +0x1eb
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:1193 +0x202
==================
==================
WARNING: DATA RACE
Read at 0x00c000f9c440 by goroutine 62:
  github.com/pingcap/tidb/br/pkg/lightning/config.(*List).AllIDs()
      /home/jenkins/agent/workspace/atom-ut/tidb/br/pkg/lightning/config/configlist.go:121 +0x8c
  github.com/pingcap/tidb/br/pkg/lightning.(*Lightning).handleGetTask()
      /home/jenkins/agent/workspace/atom-ut/tidb/br/pkg/lightning/lightning.go:421 +0xc7
  github.com/pingcap/tidb/br/pkg/lightning.(*Lightning).handleTask()
      /home/jenkins/agent/workspace/atom-ut/tidb/br/pkg/lightning/lightning.go:396 +0x430
  github.com/pingcap/tidb/br/pkg/lightning.(*Lightning).handleTask-fm()
      /home/jenkins/agent/workspace/atom-ut/tidb/br/pkg/lightning/lightning.go:384 +0x68
  net/http.HandlerFunc.ServeHTTP()
      /usr/local/go/src/net/http/server.go:2069 +0x51
  net/http.StripPrefix.func1()
      /usr/local/go/src/net/http/server.go:2112 +0x535
  net/http.HandlerFunc.ServeHTTP()
      /usr/local/go/src/net/http/server.go:2069 +0x51
  net/http.(*ServeMux).ServeHTTP()
      /usr/local/go/src/net/http/server.go:2448 +0xaf
  net/http.serverHandler.ServeHTTP()
      /usr/local/go/src/net/http/server.go:2887 +0xca
  net/http.(*conn).serve()
      /usr/local/go/src/net/http/server.go:1952 +0x87d

Previous write at 0x00c000f9c440 by goroutine 57:
  sync.NewCond()
      /usr/local/go/src/sync/cond.go:33 +0xa5
  github.com/pingcap/tidb/br/pkg/lightning/config.NewConfigList()
      /home/jenkins/agent/workspace/atom-ut/tidb/br/pkg/lightning/config/configlist.go:42 +0x5d
  github.com/pingcap/tidb/br/pkg/lightning.(*Lightning).RunServer()
      /home/jenkins/agent/workspace/atom-ut/tidb/br/pkg/lightning/lightning.go:205 +0x1c7
  github.com/pingcap/tidb/br/pkg/lightning.TestGetDeleteTask.func3()
      /home/jenkins/agent/workspace/atom-ut/tidb/br/pkg/lightning/lightning_server_serial_test.go:178 +0x4b

Goroutine 62 (running) created at:
  net/http.(*Server).Serve()
      /usr/local/go/src/net/http/server.go:3013 +0x644
  github.com/pingcap/tidb/br/pkg/lightning.(*Lightning).goServe.func2()
      /home/jenkins/agent/workspace/atom-ut/tidb/br/pkg/lightning/lightning.go:179 +0x8d

Goroutine 57 (running) created at:
  github.com/pingcap/tidb/br/pkg/lightning.TestGetDeleteTask()
      /home/jenkins/agent/workspace/atom-ut/tidb/br/pkg/lightning/lightning_server_serial_test.go:177 +0x1eb
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:1193 +0x202
==================
[2021/11/12 12:18:09.612 +08:00] [INFO] [info.go:49] ["Welcome to TiDB-Lightning"] [release-version=v5.0.0-master] [git-hash=None] [git-branch=None] [go-version=go1.16.4] [utc-build-time=None] [race-enabled=true]
[2021/11/12 12:18:09.711 +08:00] [INFO] [info.go:49] ["Welcome to TiDB-Lightning"] [release-version=v5.0.0-master] [git-hash=None] [git-branch=None] [go-version=go1.16.4] [utc-build-time=None] [race-enabled=true]
    testing.go:1092: race detected during execution of test
--- FAIL: TestGetDeleteTask (0.61s)

1. Minimal reproduce step (Required)

https://ci.pingcap.net/job/atom-ut/1199/testReport/github/com_pingcap_tidb_br_pkg_lightning/TestGetDeleteTask/

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

3. What did you see instead (Required)

4. What is your TiDB version? (Required)

@hawkingrei
Copy link
Member

hawkingrei commented Nov 21, 2021

it has been fixed in #29836 .

/close

@ti-chi-bot
Copy link
Member

@hawkingrei: Closing this issue.

In response to this:

it have been fixed in #29836 .

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@github-actions
Copy link

Please check whether the issue should be labeled with 'affects-x.y' or 'fixes-x.y.z', and then remove 'needs-more-info' label.

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

No branches or pull requests

4 participants