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 stuck during analyze table #40255

Closed
fubinzh opened this issue Dec 30, 2022 · 5 comments
Closed

TiDB stuck during analyze table #40255

fubinzh opened this issue Dec 30, 2022 · 5 comments
Assignees
Labels
found/automation Found by automation tests 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

@fubinzh
Copy link

fubinzh commented Dec 30, 2022

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  1. Run sysbench oltp_insert workload with 10 tables, 500000 records each

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

  1. TiDB should works normally.

3. What did you see instead (Required)

analyze table seems stuck, and I am not able to connect mysql cli.

/ # grep expensivequery.go /var/lib/tidb/log/tidb.log | head -n3
[2022/12/30 03:35:43.489 +00:00] [WARN] [expensivequery.go:118] [expensive_query] [cost_time=60.015435935s] [conn_id=9140029055469355011] [txn_start_ts=0] [mem_max="124141468 Bytes (118.4 MB)"] [sql="analyze table `workload`.`sbtest5`"]
[2022/12/30 03:36:43.489 +00:00] [WARN] [expensivequery.go:118] [expensive_query] [cost_time=120.015578973s] [conn_id=9140029055469355011] [txn_start_ts=0] [mem_max="124141468 Bytes (118.4 MB)"] [sql="analyze table `workload`.`sbtest5`"]
[2022/12/30 03:37:43.589 +00:00] [WARN] [expensivequery.go:118] [expensive_query] [cost_time=180.115062225s] [conn_id=9140029055469355011] [txn_start_ts=0] [mem_max="124141468 Bytes (118.4 MB)"] [sql="analyze table `workload`.`sbtest5`"]
/ # grep expensivequery.go /var/lib/tidb/log/tidb.log | tail -n3
[2022/12/30 06:21:54.489 +00:00] [WARN] [expensivequery.go:118] [expensive_query] [cost_time=10031.014959535s] [conn_id=9140029055469355011] [txn_start_ts=0] [mem_max="124141468 Bytes (118.4 MB)"] [sql="analyze table `workload`.`sbtest5`"]
[2022/12/30 06:22:54.489 +00:00] [WARN] [expensivequery.go:118] [expensive_query] [cost_time=10091.015379688s] [conn_id=9140029055469355011] [txn_start_ts=0] [mem_max="124141468 Bytes (118.4 MB)"] [sql="analyze table `workload`.`sbtest5`"]
[2022/12/30 06:23:54.588 +00:00] [WARN] [expensivequery.go:118] [expensive_query] [cost_time=10151.114798166s] [conn_id=9140029055469355011] [txn_start_ts=0] [mem_max="124141468 Bytes (118.4 MB)"] [sql="analyze table `workload`.`sbtest5`"]

4. What is your TiDB version? (Required)

Release Version: v6.6.0-alpha
Edition: Community
Git Commit Hash: 1a7b395
Git Branch: heads/refs/tags/v6.6.0-alpha
UTC Build Time: 2022-12-29 11:49:16
GoVersion: go1.19.3
Race Enabled: false
TiKV Min Version: 6.2.0-alpha
Check Table Before Drop: false
Store: unistore

@fubinzh fubinzh added the type/bug The issue is confirmed as a bug. label Dec 30, 2022
@fubinzh
Copy link
Author

fubinzh commented Dec 30, 2022

img_v2_4f03a40d-7db8-4e68-9f62-264dc2166eeg

@xuyifangreeneyes
Copy link
Contributor

@xuyifangreeneyes
Copy link
Contributor

ANALYZE seems stuck at gp.(*Pool).Go. @tiancaiamao could you please help take a look?

@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
@xuyifangreeneyes
Copy link
Contributor

It is related to tikv/client-go#652.

@tiancaiamao
Copy link
Contributor

client-go updated by #40350, so fixed by that one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
found/automation Found by automation tests 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