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 panic with enum column(version2) #28705

Closed
wjhuang2016 opened this issue Oct 11, 2021 · 3 comments
Closed

analyze panic with enum column(version2) #28705

wjhuang2016 opened this issue Oct 11, 2021 · 3 comments
Assignees
Labels
duplicate Issues or pull requests already exists. severity/major sig/planner SIG: Planner type/bug The issue is confirmed as a bug.

Comments

@wjhuang2016
Copy link
Member

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

create a table with enum column.
insert many data, 100 000 rows.
analyze table

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

No error.

3. What did you see instead (Required)

[analyze.go:1235] ["analyze worker panicked"] [stack="goroutine 190694 [running]:\ngithub.com/pingcap/tidb/executor.(*AnalyzeColumnsExec).subBuildWorker.func1(0xc02b216000, 0xc000d10a00, 0x1)\n\t/Users/pingcap/workspace/optimization-build-tidb-darwin-amd@4/go/src/github.com/pingcap/tidb/executor/analyze.go:1233 +0x105\npanic(0x647d000, 0xc000cca2b8)\n\t/usr/local/Cellar/go/1.16.5/libexec/src/runtime/panic.go:965 +0x1b9\ngithub.com/pingcap/tidb/util/chunk.(*Column).getNameValue(0xc052862000, 0x1, 0x8, 0x20300a00000001, 0xc000df1730)\n\t/Users/pingcap/workspace/optimization-build-tidb-darwin-amd@4/go/src/github.com/pingcap/tidb/util/chunk/column.go:572 +0x1a8\ngithub.com/pingcap/tidb/util/chunk.(*Column).GetEnum(...)\n\t/Users/pingcap/workspace/optimization-build-tidb-darwin-amd@4/go/src/github.com/pingcap/tidb/util/chunk/column.go:544\ngithub.com/pingcap/tidb/util/chunk.Row.GetEnum(0xc02a2bafa0, 0x1, 0x0, 0xc01f102003, 0xc02bba5420, 0x32a7e0b0)\n\t/Users/pingcap/workspace/optimization-build-tidb-darwin-amd@4/go/src/github.com/pingcap/tidb/util/chunk/row.go:96 +0x4b\ngithub.com/pingcap/tidb/util/chunk.Row.GetDatum(0xc02a2bafa0, 0x1, 0x0, 0xc02a358660, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)\n\t/Users/pingcap/workspace/optimization-build-tidb-darwin-amd@4/go/src/github.com/pingcap/tidb/util/chunk/row.go:180 +0xa7c\ngithub.com/pingcap/tidb/statistics.(*Histogram).GetUpper(0xc052862070, 0x0, 0xc02b5157a0)\n\t/Users/pingcap/workspace/optimization-build-tidb-darwin-amd@4/go/src/github.com/pingcap/tidb/statistics/histogram.go:123 +0x9e\ngithub.com/pingcap/tidb/statistics.buildHist(0xc00188e900, 0xc052862070, 0xc03f408000, 0x186a0, 0x186a0, 0x2df07, 0x2, 0x100, 0x0, 0xc02e666690, ...)\n\t/Users/pingcap/workspace/optimization-build-tidb-darwin-amd@4/go/src/github.com/pingcap/tidb/statistics/builder.go:160 +0x169\ngithub.com/pingcap/tidb/statistics.BuildHistAndTopN(0x6b7db10, 0xc000e21180, 0x100, 0x1f4, 0x3, 0xc02e064660, 0xc000ef3368, 0xc052f76401, 0xc000e68150, 0xc00116a000, ...)\n\t/Users/pingcap/workspace/optimization-build-tidb-darwin-amd@4/go/src/github.com/pingcap/tidb/statistics/builder.go:364 +0x12cd\ngithub.com/pingcap/tidb/executor.(*AnalyzeColumnsExec).subBuildWorker(0xc000d10a00, 0xc02b216000, 0xc02b216060, 0xc00175c000, 0x44, 0x44, 0xc00175c480, 0x44, 0x44, 0xc0016de000, ...)\n\t/Users/pingcap/workspace/optimization-build-tidb-darwin-amd@4/go/src/github.com/pingcap/tidb/executor/analyze.go:1330 +0x8b7\ncreated by github.com/pingcap/tidb/executor.(*AnalyzeColumnsExec).buildSamplingStats\n\t/Users/pingcap/workspace/optimization-build-tidb-darwin-amd@4/go/src/github.com/pingcap/tidb/executor/analyze.go:934 +0x10f2\n"]

4. What is your TiDB version? (Required)

5.1.1

@wjhuang2016 wjhuang2016 added the type/bug The issue is confirmed as a bug. label Oct 11, 2021
@knightXun
Copy link

/assign @knightXun

@winoros
Copy link
Member

winoros commented Oct 14, 2021

Duplicate one with #28051

@winoros winoros closed this as completed Oct 14, 2021
@github-actions
Copy link

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

@winoros winoros added the duplicate Issues or pull requests already exists. label Oct 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issues or pull requests already exists. 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