pingcap / pingcap/tidb

DATA RACE in the updateNetworkTrafficStatsAndMetrics

Open
#65,068 5 comments 0 reactions 1 assignee Claimed by @nolouch View on GitHub
component/test severity/moderate sig/execution sig/sql-infra type/bug
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Bug Report

Please answer these questions before submitting your issue. Thanks!

### 1. Minimal reproduce step (Required)

```
cd tests/integrationtest
./run-tests.sh -r planner/core/integration
```

![Image](https://github.com/user-attachments/assets/14aaeffa-9330-4ff9-9d4b-5fcd1756b1b8)

### 2. What did you expect to see? (Required)
success
### 3. What did you see instead (Required)

```
==================
WARNING: DATA RACE
Read at 0x00c00d96f340 by goroutine 16377:
github.com/pingcap/tidb/pkg/executor.(*ExecStmt).updateNetworkTrafficStatsAndMetrics()
/Users/weizhenwang/devel/opensource/tidb/pkg/executor/adapter.go:1794 +0x80
github.com/pingcap/tidb/pkg/executor.(*ExecStmt).FinishExecuteStmt()
/Users/weizhenwang/devel/opensource/tidb/pkg/executor/adapter.go:1508 +0x3b8
github.com/pingcap/tidb/pkg/executor.(*ExecStmt).CloseRecordSet()
```

[integration-test.log](https://github.com/user-attachments/files/24185428/integration-test.log)

### 4. What is your TiDB version? (Required)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.