Skip to content

DATA RACE in the TestCPUValue #40125

Closed
@hawkingrei

Description

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

==================
WARNING: DATA RACE
Read at 0x00c0002615d0 by goroutine 21:
  github.com/pingcap/tidb/util/cpu.(*Observer).observe()
      util/cpu/cpu.go:94 +0x364
  github.com/pingcap/tidb/util/cpu.(*Observer).Start.func1()
      util/cpu/cpu.go:69 +0x23a
Previous write at 0x00c0002615d0 by goroutine 10:
  github.com/pingcap/tidb/util/cpu.(*Observer).observe()
      util/cpu/cpu.go:99 +0x3bc
  github.com/pingcap/tidb/util/cpu.(*Observer).Start.func1()
      util/cpu/cpu.go:69 +0x23a
Goroutine 21 (running) created at:
  github.com/pingcap/tidb/util/cpu.(*Observer).Start()
      util/cpu/cpu.go:60 +0xa6
  github.com/pingcap/tidb/util/cpu.TestCPUValue()
      util/cpu/cpu_test.go:45 +0x19b
  testing.tRunner()
      GOROOT/src/testing/testing.go:1446 +0x216
  testing.(*T).Run.func1()
      GOROOT/src/testing/testing.go:1493 +0x47
Goroutine 10 (running) created at:
  github.com/pingcap/tidb/util/cpu.(*Observer).Start()
      util/cpu/cpu.go:60 +0xa6
  github.com/pingcap/tidb/util/cpu.TestCPUValue()
      util/cpu/cpu_test.go:28 +0x4e
  testing.tRunner()
      GOROOT/src/testing/testing.go:1446 +0x216
  testing.(*T).Run.func1()
      GOROOT/src/testing/testing.go:1493 +0x47
================== 

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

3. What did you see instead (Required)

4. What is your TiDB version? (Required)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions