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

Analyze table failed with column type Enum #28051

Closed
yuqi1129 opened this issue Sep 15, 2021 · 7 comments
Closed

Analyze table failed with column type Enum #28051

yuqi1129 opened this issue Sep 15, 2021 · 7 comments
Labels
severity/major sig/planner SIG: Planner type/bug The issue is confirmed as a bug.

Comments

@yuqi1129
Copy link
Contributor

yuqi1129 commented Sep 15, 2021

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Branch 5.1.1

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

3. What did you see instead (Required)

user@host > analyze table `fms`.`t_srv_sales`
    -> ;
ERROR 1105 (HY000): analyze worker panic
Wed Sep 15 10:08:33 2021

and the stack is

[2021/09/15 10:08:30.545 +08:00] [ERROR] [analyze.go:1235] ["analyze worker panicked"] [stack="goroutine 16349283 [running]:\ngithub.com/pingcap/tidb/executor.(*AnalyzeColumnsExec).subBuildWorker.func1(0xc029082000, 0xc017a56100, 0x0)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/analyze.go:1233 +0x105\npanic(0x3550540, 0xc32f438000)\n\t/usr/local/go/src/runtime/panic.go:965 +0x1b9\ngithub.com/pingcap/tidb/util/chunk.(*Column).getNameValue(0xc05665e070, 0x1, 0x8, 0x20300900000001, 0xc0c8b9d730)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/util/chunk/column.go:572 +0x1a8\ngithub.com/pingcap/tidb/util/chunk.(*Column).GetEnum(...)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/util/chunk/column.go:544\ngithub.com/pingcap/tidb/util/chunk.Row.GetEnum(0xc025a9c000, 0x1, 0x0, 0xc0137e0006, 0xc090282078, 0x7f8ae3e19f78)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/util/chunk/row.go:96 +0x4b\ngithub.com/pingcap/tidb/util/chunk.Row.GetDatum(0xc025a9c000, 0x1, 0x0, 0xc02968d680, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/util/chunk/row.go:180 +0xa7c\ngithub.com/pingcap/tidb/statistics.(*Histogram).GetUpper(0xc05665e0e0, 0x0, 0xc0027d41e0)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/statistics/histogram.go:123 +0x9e\ngithub.com/pingcap/tidb/statistics.buildHist(0xc01c618300, 0xc05665e0e0, 0xc2ae680000, 0x186a0, 0x186a0, 0x467d83b, 0x2, 0x100, 0x0, 0xc03a4d6180, ...)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/statistics/builder.go:160 +0x169\ngithub.com/pingcap/tidb/statistics.BuildHistAndTopN(0x3c52b10, 0xc0018fc000, 0x100, 0x1f4, 0x3, 0xc027d511a0, 0xc0026d5ae8, 0xc018be1101, 0xc002588bf0, 0x10dfeaa, ...)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/statistics/builder.go:364 +0x12cd\ngithub.com/pingcap/tidb/executor.(*AnalyzeColumnsExec).subBuildWorker(0xc017a56100, 0xc029082000, 0xc029082060, 0xc00138c480, 0x42, 0x42, 0xc00138c6c0, 0x42, 0x42, 0xc02b414000, ...)\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/analyze.go:1330 +0x8b7\ncreated by github.com/pingcap/tidb/executor.(*AnalyzeColumnsExec).buildSamplingStats\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/analyze.go:934 +0x10f2\n"]

4. What is your TiDB version? (Required)

V5.1.1

@yuqi1129 yuqi1129 added the type/bug The issue is confirmed as a bug. label Sep 15, 2021
@winoros
Copy link
Member

winoros commented Sep 15, 2021

@yuqi1129 Could you provide some detailed information?
It seems that this one cannot be reproduced easily.

@yuqi1129
Copy link
Contributor Author

@winoros,i will add more detail about table schema and other information
Currently, the following log will appear periodical
image

@winoros
Copy link
Member

winoros commented Sep 17, 2021

@yuqi1129 I've tried some simple table structures to reproduce the case. But haven't reproduced it. Maybe it's related to the data inserted.

@winoros
Copy link
Member

winoros commented Oct 11, 2021

@yuqi1129 The panic is fixed via #27301, which is merged in v5.1.2

@yuqi1129
Copy link
Contributor Author

@winoros Thanks for your notification, i will close this issue later

@winoros
Copy link
Member

winoros commented Oct 27, 2021

Hi, we are closed for now. If you have any questions, you can reply here or just open a new issue.

@github-actions
Copy link

github-actions bot commented Nov 1, 2021

Please check whether the issue should be labeled with 'affects-x.y' or 'fixes-x.y.z', and then remove 'needs-more-info' label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/major sig/planner SIG: Planner type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

4 participants