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

*: fix data race at the aggressiveLockingDirty #913

Merged
merged 2 commits into from
Oct 8, 2023

Conversation

hawkingrei
Copy link
Member

==================
WARNING: DATA RACE
Write at 0x00c005466990 by goroutine 34508:
  github.com/tikv/client-go/v2/txnkv/transaction.(*KVTxn).lockKeys()
      external/com_github_tikv_client_go_v2/txnkv/transaction/txn.go:1236 +0x2f04
  github.com/tikv/client-go/v2/txnkv/transaction.(*KVTxn).LockKeysFunc()
      external/com_github_tikv_client_go_v2/txnkv/transaction/txn.go:919 +0x11d
  github.com/pingcap/tidb/store/driver/txn.(*tikvTxn).LockKeysFunc()
      store/driver/txn/txn_driver.go:91 +0xb0
  github.com/pingcap/tidb/session.(*LazyTxn).LockKeysFunc()
      session/txn.go:476 +0x38b
  github.com/pingcap/tidb/session.(*LazyTxn).LockKeys()
      session/txn.go:451 +0x86
  github.com/pingcap/tidb/executor.doLockKeys()
      executor/executor.go:1303 +0x30d
  github.com/pingcap/tidb/executor.(*SelectLockExec).Next()
      executor/executor.go:1235 +0x7a4
  github.com/pingcap/tidb/executor.Next()
      executor/executor.go:253 +0x335
  github.com/pingcap/tidb/executor.(*UnionExec).resultPuller()
      executor/executor.go:1907 +0x984
  github.com/pingcap/tidb/executor.(*UnionExec).initialize.func1()
      executor/executor.go:1860 +0x64
Previous read at 0x00c005466990 by goroutine 34509:
  github.com/tikv/client-go/v2/txnkv/transaction.(*KVTxn).IsReadOnly()
      external/com_github_tikv_client_go_v2/txnkv/transaction/txn.go:1394 +0xc4
  github.com/pingcap/tidb/store/driver/txn.(*tikvTxn).IsReadOnly()
      <autogenerated>:1 +0x29
  github.com/pingcap/tidb/session.(*LazyTxn).IsReadOnly()
      <autogenerated>:1 +0x4c
  github.com/pingcap/tidb/executor.(*PointGetExecutor).get()
      executor/point_get.go:461 +0xea
  github.com/pingcap/tidb/executor.(*PointGetExecutor).getAndLock()
      executor/point_get.go:359 +0x1ba
  github.com/pingcap/tidb/executor.(*PointGetExecutor).Next()
      executor/point_get.go:311 +0xe34
  github.com/pingcap/tidb/executor.Next()
      executor/executor.go:253 +0x335
  github.com/pingcap/tidb/executor.(*SelectLockExec).Next()
      executor/executor.go:1184 +0xeb
  github.com/pingcap/tidb/executor.Next()
      executor/executor.go:253 +0x335
  github.com/pingcap/tidb/executor.(*UnionExec).resultPuller()
      executor/executor.go:1907 +0x984
  github.com/pingcap/tidb/executor.(*UnionExec).initialize.func1()
      executor/executor.go:1860 +0x64
Goroutine 34508 (running) created at:
  github.com/pingcap/tidb/executor.(*UnionExec).initialize()
      executor/executor.go:1860 +0x4f7
  github.com/pingcap/tidb/executor.(*UnionExec).Next()
      executor/executor.go:1933 +0xca
  github.com/pingcap/tidb/executor.Next()
      executor/executor.go:253 +0x335
  github.com/pingcap/tidb/executor.(*HashAggExec).fetchChildData()
      executor/aggregate.go:822 +0x324
  github.com/pingcap/tidb/executor.(*HashAggExec).prepare4ParallelExec.func3()
      executor/aggregate.go:859 +0x64
Goroutine 34509 (running) created at:
  github.com/pingcap/tidb/executor.(*UnionExec).initialize()
      executor/executor.go:1860 +0x4f7
  github.com/pingcap/tidb/executor.(*UnionExec).Next()
      executor/executor.go:1933 +0xca
  github.com/pingcap/tidb/executor.Next()
      executor/executor.go:253 +0x335
  github.com/pingcap/tidb/executor.(*HashAggExec).fetchChildData()
      executor/aggregate.go:822 +0x324
  github.com/pingcap/tidb/executor.(*HashAggExec).prepare4ParallelExec.func3()
      executor/aggregate.go:859 +0x64
================== 

@disksing disksing merged commit 18a8414 into tikv:master Oct 8, 2023
10 checks passed
@hawkingrei hawkingrei deleted the fix_data_race_20230726 branch October 8, 2023 06:40
iosmanthus added a commit that referenced this pull request Dec 20, 2023
Co-authored-by: cfzjywxk <[email protected]>
Co-authored-by: cfzjywxk <[email protected]>
Co-authored-by: disksing <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: zzm <[email protected]>
Co-authored-by: husharp <[email protected]>
Co-authored-by: you06 <[email protected]>
Co-authored-by: buffer <[email protected]>
Co-authored-by: 3pointer <[email protected]>
Co-authored-by: buffer <[email protected]>
Co-authored-by: husharp <[email protected]>
Co-authored-by: crazycs520 <[email protected]>
Co-authored-by: Smilencer <[email protected]>
Co-authored-by: ShuNing <[email protected]>
Co-authored-by: zyguan <[email protected]>
Co-authored-by: Jack Yu <[email protected]>
Co-authored-by: Weizhen Wang <[email protected]>
Co-authored-by: lucasliang <[email protected]>
Co-authored-by: healthwaite <[email protected]>
Co-authored-by: xufei <[email protected]>
Co-authored-by: JmPotato <[email protected]>
Co-authored-by: ekexium <[email protected]>
Co-authored-by: 山岚 <[email protected]>
Co-authored-by: glorv <[email protected]>
Co-authored-by: Yongbo Jiang <[email protected]>
resolve locks interface for tidb gc_worker (#945)
fix some issues of replica selector (#910)  (#942)
fix some issues of replica selector (#910)
fix issue of configure kv timeout not work when disable batch client (#980)
fix batch-client wait too long and add some metrics (#973)
fix batch-client wait too long and add some metrics (#973)" (#984)
fix data race at the aggressiveLockingDirty (#913)
fix MinSafeTS might be set to MaxUint64 permanently (#994)
fix: fix invalid nil pointer when trying to record Store.SlownessStat. (#1017)
Fix batch client batchSendLoop panic (#1021)
fix request source tag unset (#1025)
Fix comment of `SuspendTime` (#1057)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants