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

index out of range [0] with length 0 in (*Column).IsNull #53550

Closed
ycybfhb opened this issue May 25, 2024 · 1 comment
Closed

index out of range [0] with length 0 in (*Column).IsNull #53550

ycybfhb opened this issue May 25, 2024 · 1 comment

Comments

@ycybfhb
Copy link

ycybfhb commented May 25, 2024

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

First execute the following valid.sql
valid.txt
Then a crash occurs when executing the error.sql below
error.txt

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

Expect no crashes

3. What did you see instead (Required)

runtime error: index out of range [0] with length 0

tidb.log:

[2024/05/24 13:37:49.623 +00:00] [ERROR] [agg_util.go:93] ["parallel hash aggregation panicked"] [error="runtime error: index out of range [0] with length 0"] [stack="github.com/pingcap/tidb/pkg/executor/aggregate.recoveryHashAgg
	/workspace/source/tidb/pkg/executor/aggregate/agg_util.go:93
github.com/pingcap/tidb/pkg/executor/aggregate.(*HashAggPartialWorker).run.func1
	/workspace/source/tidb/pkg/executor/aggregate/agg_hash_partial_worker.go:194
runtime.gopanic
	/usr/local/go/src/runtime/panic.go:914
runtime.goPanicIndex
	/usr/local/go/src/runtime/panic.go:114
github.com/pingcap/tidb/pkg/util/chunk.(*Column).IsNull
	/workspace/source/tidb/pkg/util/chunk/column.go:180
github.com/pingcap/tidb/pkg/util/codec.HashGroupKey
	/workspace/source/tidb/pkg/util/codec/codec.go:1247
github.com/pingcap/tidb/pkg/executor/aggregate.GetGroupKey
	/workspace/source/tidb/pkg/executor/aggregate/agg_util.go:149
github.com/pingcap/tidb/pkg/executor/aggregate.(*HashAggPartialWorker).updatePartialResult
	/workspace/source/tidb/pkg/executor/aggregate/agg_hash_partial_worker.go:260
github.com/pingcap/tidb/pkg/executor/aggregate.(*HashAggPartialWorker).fetchChunkAndProcess
	/workspace/source/tidb/pkg/executor/aggregate/agg_hash_partial_worker.go:108
github.com/pingcap/tidb/pkg/executor/aggregate.(*HashAggPartialWorker).run
	/workspace/source/tidb/pkg/executor/aggregate/agg_hash_partial_worker.go:210"]

4. What is your TiDB version? (Required)

+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version()                                                                                                                                                                                                                                                   |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v8.2.0-alpha-216-gfe5858b
Edition: Community
Git Commit Hash: fe5858b00cd63808ac414c6e102a353778b0aaa7
Git Branch: HEAD
UTC Build Time: 2024-05-23 01:44:42
GoVersion: go1.21.10
Race Enabled: false
Check Table Before Drop: false
Store: tikv |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

We are the BASS team from the School of Cyber Science and Technology at Beihang University. Our main focus is on system software security, operating systems, and program analysis research, as well as the development of automated program testing frameworks for detecting software defects. Using our self-developed database vulnerability testing tool, we have identified the above-mentioned vulnerabilities in TiDB that may lead to database crashes.

@guo-shaoge
Copy link
Collaborator

dup with #53713

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants