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

TiDB stucked #40247

Closed
crazycs520 opened this issue Dec 30, 2022 · 3 comments
Closed

TiDB stucked #40247

crazycs520 opened this issue Dec 30, 2022 · 3 comments
Assignees
Labels
may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.0 may-affects-6.1 may-affects-6.2 may-affects-6.3 may-affects-6.4 severity/critical sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@crazycs520
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Related blocked goroutine is:

goroutine.tar.gz

goroutine 12626 [chan send, 9 minutes]:
github.com/tiancaiamao/gp.(*Pool).Go(0xc0006520c0, 0xc002ef41c0)
	/go/pkg/mod/github.com/tiancaiamao/gp@v0.0.0-20221221095600-1a473d1f9b4b/gp.go:33 +0xd5
github.com/tikv/client-go/v2/tikv.(*KVStore).Go(0xc00c53b860?, 0xc003a87ef0?)
	/go/pkg/mod/github.com/tikv/client-go/v2@v2.0.4-0.20221226080148-018c59dbd837/tikv/kv.go:139 +0x25
github.com/tikv/client-go/v2/txnkv/transaction.(*twoPhaseCommitter).doActionOnGroupMutations(0xc00c53b860, 0xc003a87ef0, {0x4ffa700, 0x74d2b00?}, {0xc00893fcc0, 0x6, 0x0?})
	/go/pkg/mod/github.com/tikv/client-go/v2@v2.0.4-0.20221226080148-018c59dbd837/txnkv/transaction/2pc.go:992 +0xf8d
github.com/tikv/client-go/v2/txnkv/transaction.(*twoPhaseCommitter).doActionOnMutations(0xc00c53b860, 0xc003635350?, {0x4ffa700?, 0x74d2b00}, {0x501cb78, 0xc0047efc80})
	/go/pkg/mod/github.com/tikv/client-go/v2@v2.0.4-0.20221226080148-018c59dbd837/txnkv/transaction/2pc.go:789 +0xc7
github.com/tikv/client-go/v2/txnkv/transaction.(*twoPhaseCommitter).commitMutations(0x1734ed2?, 0xc003a87ef0, {0x501cb78, 0xc0047efc80})
	/go/pkg/mod/github.com/tikv/client-go/v2@v2.0.4-0.20221226080148-018c59dbd837/txnkv/transaction/commit.go:222 +0x225
github.com/tikv/client-go/v2/txnkv/transaction.(*twoPhaseCommitter).commitTxn(0xc00c53b860, {0x4ffc690?, 0xc003635350}, 0xc003628c60)
	/go/pkg/mod/github.com/tikv/client-go/v2@v2.0.4-0.20221226080148-018c59dbd837/txnkv/transaction/2pc.go:1689 +0x1bc
github.com/tikv/client-go/v2/txnkv/transaction.(*twoPhaseCommitter).execute(0xc00c53b860, {0x4ffc690?, 0xc003635350})
	/go/pkg/mod/github.com/tikv/client-go/v2@v2.0.4-0.20221226080148-018c59dbd837/txnkv/transaction/2pc.go:1680 +0x28e9
github.com/tikv/client-go/v2/txnkv/transaction.(*KVTxn).Commit(0xc001cfdce0, {0x4ffc690, 0xc0036352f0?})
	/go/pkg/mod/github.com/tikv/client-go/v2@v2.0.4-0.20221226080148-018c59dbd837/txnkv/transaction/txn.go:502 +0xf05
github.com/pingcap/tidb/store/driver/txn.(*tikvTxn).Commit(0xc00cfbfa70, {0x4ffc690?, 0xc0036352f0?})
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/store/driver/txn/txn_driver.go:80 +0x2e
github.com/pingcap/tidb/session.(*LazyTxn).Commit(0xc002820a10, {0x4ffc690, 0xc0036352f0})
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/session/txn.go:408 +0x477
github.com/pingcap/tidb/session.(*session).commitTxnWithTemporaryData(0x4ffc690?, {0x4ffc690?, 0xc0036352f0?}, {0x503e220?, 0xc002820a10?})
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/session/session.go:839 +0x1b5
github.com/pingcap/tidb/session.(*session).doCommit(0xc002820a00, {0x4ffc690, 0xc003635290})
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/session/session.go:725 +0xd78
github.com/pingcap/tidb/session.(*session).doCommitWithRetry(0xc002820a00, {0x4ffc690, 0xc003635290})
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/session/session.go:971 +0x2c9
github.com/pingcap/tidb/session.(*session).CommitTxn(0xc002820a00, {0x4ffc690, 0xc005de39e0})
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/session/session.go:1101 +0x227
github.com/pingcap/tidb/session.autoCommitAfterStmt({0x4ffc690?, 0xc005de39e0?}, 0xc002820a00, {0x0?, 0x0?}, {0x500e340?, 0xc002d892c0})
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/session/tidb.go:283 +0x40c
github.com/pingcap/tidb/session.finishStmt({0x4ffc690, 0xc005de39e0}, 0xc002820a00, {0x0, 0x0}, {0x500e340, 0xc002d892c0?})
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/session/tidb.go:249 +0x25f
github.com/pingcap/tidb/session.runStmt({0x4ffc690, 0xc005de39e0}, 0xc002820a00, {0x500e340, 0xc002d892c0?})
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/session/session.go:2376 +0x80c
github.com/pingcap/tidb/session.(*session).ExecuteStmt(0xc002820a00, {0x4ffc690, 0xc005de39e0}, {0x50149d0?, 0xc00363a780})
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/session/session.go:2221 +0xab8
github.com/pingcap/tidb/session.(*session).ExecuteInternal(0xc002820a00, {0x4ffc690, 0xc005de39e0}, {0x4870412, 0x6}, {0x0, 0x0, 0x0})
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/session/session.go:1674 +0x3f2
github.com/pingcap/tidb/statistics/handle.finishTransaction({0x4ffc690?, 0xc005de39e0?}, {0x50038e0?, 0xc002820a00?}, {0x0?, 0x0?})
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/statistics/handle/ddl.go:341 +0xb5
github.com/pingcap/tidb/statistics/handle.(*Handle).DeleteTableStatsFromKV.func1()
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/statistics/handle/gc.go:268 +0x39
github.com/pingcap/tidb/statistics/handle.(*Handle).DeleteTableStatsFromKV(0xc00212d900, {0xc008471378, 0x1, 0xc00163fec0?})
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/statistics/handle/gc.go:305 +0xb47
github.com/pingcap/tidb/statistics/handle.(*Handle).gcTableStats(0xc00212d900, {0x5032ad8, 0xc0125cf860}, 0x5d)
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/statistics/handle/gc.go:87 +0x3aa
github.com/pingcap/tidb/statistics/handle.(*Handle).GCStats(0xc00212d900, {0x5032ad8, 0xc0125cf860}, 0x0?)
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/statistics/handle/gc.go:53 +0x57b
github.com/pingcap/tidb/domain.(*Domain).updateStatsWorker(0xc000cf6180, {0xc00098bf70?, 0xc0022f12c0?}, {0x501c908, 0xc0009ef7c0})
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/domain/domain.go:2073 +0xe33
github.com/pingcap/tidb/domain.(*Domain).UpdateTableStatsLoop.func1()
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/domain/domain.go:1905 +0x2d
github.com/pingcap/tidb/util.(*WaitGroupWrapper).Run.func1()
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/util/wait_group_wrapper.go:33 +0x5a
created by github.com/pingcap/tidb/util.(*WaitGroupWrapper).Run
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/util/wait_group_wrapper.go:31 +0x85

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

3. What did you see instead (Required)

4. What is your TiDB version? (Required)

./tidb-server -V
Release Version: v6.6.0-alpha
Edition: Community
Git Commit Hash: b94042c0b51fa78836282d0221bc1420786a8bbf
Git Branch: heads/refs/tags/v6.6.0-alpha
UTC Build Time: 2022-12-29 14:32:58
GoVersion: go1.19.3
Race Enabled: false
TiKV Min Version: 6.2.0-alpha
Check Table Before Drop: false
Store: unistore
@crazycs520 crazycs520 added the type/bug The issue is confirmed as a bug. label Dec 30, 2022
@crazycs520
Copy link
Contributor Author

@tiancaiamao PTAL

@crazycs520
Copy link
Contributor Author

Same issue with #40255

@ti-chi-bot ti-chi-bot added may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.0 may-affects-6.1 may-affects-6.2 may-affects-6.3 may-affects-6.4 labels Dec 30, 2022
@crazycs520 crazycs520 changed the title TiDB goroutine blocked TiDB stucked Dec 30, 2022
@cfzjywxk cfzjywxk added sig/sql-infra SIG: SQL Infra and removed sig/transaction SIG:Transaction labels Jan 31, 2023
@bb7133
Copy link
Member

bb7133 commented Feb 2, 2023

Close it since this is duplicated with #40255

@bb7133 bb7133 closed this as completed Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.0 may-affects-6.1 may-affects-6.2 may-affects-6.3 may-affects-6.4 severity/critical sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

6 participants