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

updateStatsWorker got runtime error: index out of range #7148

Closed
darren opened this issue Jul 25, 2018 · 3 comments · Fixed by #7152
Closed

updateStatsWorker got runtime error: index out of range #7148

darren opened this issue Jul 25, 2018 · 3 comments · Fixed by #7152
Labels
type/bug The issue is confirmed as a bug.

Comments

@darren
Copy link
Contributor

darren commented Jul 25, 2018

tidb version:

Release Version: v2.1.0-beta-107-g8b913c95e
Git Commit Hash: 8b913c95efc168a5b0811ecd2baa4f7c41385a30
Git Branch: master
UTC Build Time: 2018-07-25 06:32:03
GoVersion: go version go1.10.3 darwin/amd64
Race Enabled: false
TiKV Min Version: 2.1.0-alpha.1-ff3dd160846b7d1aed9079c389fc188f7f5ea13e

stack:

2018/07/25 14:38:39.464 domain.go:750: [error] updateStatsWorker, runtime error: index out of range, goroutine 112 [running]:                                                                                                                             
github.com/pingcap/tidb/util.GetStack(0xc4203933f0, 0x1d52d80, 0x2a056d0)                                                                                                                                                                                 
        /Users/darren/Sources/go/src/github.com/pingcap/tidb/util/misc.go:52 +0x74
github.com/pingcap/tidb/domain.recoverInDomain(0x1f2ec97, 0x11, 0x1790000)
        /Users/darren/Sources/go/src/github.com/pingcap/tidb/domain/domain.go:749 +0x62
panic(0x1d52d80, 0x2a056d0)
        /usr/local/Cellar/go/1.10.3/libexec/src/runtime/panic.go:502 +0x229
github.com/pingcap/tidb/util/chunk.Row.GetString(...)
        /Users/darren/Sources/go/src/github.com/pingcap/tidb/util/chunk/row.go:71
github.com/pingcap/tidb/util/chunk.Compare(0xc4452da8a0, 0xc4, 0x0, 0xc449469580, 0x0)
        /Users/darren/Sources/go/src/github.com/pingcap/tidb/util/chunk/compare.go:188 +0xc4c
github.com/pingcap/tidb/util/chunk.(*Chunk).LowerBound.func1(0xc4, 0x0)
        /Users/darren/Sources/go/src/github.com/pingcap/tidb/util/chunk/compare.go:216 +0x4f
sort.Search(0x188, 0xc420393768, 0x1e18b01)
        /usr/local/Cellar/go/1.10.3/libexec/src/sort/search.go:66 +0x58
github.com/pingcap/tidb/util/chunk.(*Chunk).LowerBound(0xc4452da8a0, 0x0, 0xc449469580, 0xffffffffffffffff, 0x0)
        /Users/darren/Sources/go/src/github.com/pingcap/tidb/util/chunk/compare.go:215 +0x93
github.com/pingcap/tidb/statistics.buildBucketFeedback(0xc445175680, 0xc4448f6900, 0xc4291da8f0, 0x0)
        /Users/darren/Sources/go/src/github.com/pingcap/tidb/statistics/feedback.go:224 +0xe5
github.com/pingcap/tidb/statistics.splitBuckets(0xc445175680, 0xc4448f6900, 0xc42ccd4900, 0xc42ccd4900, 0xc420393a40, 0x1010788, 0x90, 0x1ec6240, 0x1)                                                                                                   
        /Users/darren/Sources/go/src/github.com/pingcap/tidb/statistics/feedback.go:504 +0x50
github.com/pingcap/tidb/statistics.UpdateHistogram(0xc445175680, 0xc4448f6900, 0x1)
        /Users/darren/Sources/go/src/github.com/pingcap/tidb/statistics/feedback.go:537 +0x39
github.com/pingcap/tidb/statistics.(*Handle).UpdateStatsByLocalFeedback(0xc420526200, 0x20474e0, 0xc43390a930)
        /Users/darren/Sources/go/src/github.com/pingcap/tidb/statistics/update.go:432 +0x43f
github.com/pingcap/tidb/domain.(*Domain).updateStatsWorker(0xc4202b9400, 0x205d020, 0xc42040c0e0, 0x203fce0, 0xc4201642e0)
        /Users/darren/Sources/go/src/github.com/pingcap/tidb/domain/domain.go:684 +0x80d
created by github.com/pingcap/tidb/domain.(*Domain).UpdateTableStatsLoop
        /Users/darren/Sources/go/src/github.com/pingcap/tidb/domain/domain.go:606 +0x146
@zimulala
Copy link
Contributor

PTAL @lamxTyler

@zimulala
Copy link
Contributor

@darren
Thanks for your report!

@alivxxx
Copy link
Contributor

alivxxx commented Jul 25, 2018

@darren Thanks for your feedback! It will be fixed soon.

@zimulala zimulala added the type/bug The issue is confirmed as a bug. label Jul 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants