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

[Bug]: internal error: panic runtime error: index out of range [0] with length 0 when running prepared statment [select xxx for update] #21334

Open
1 task done
aressu1985 opened this issue Jan 23, 2025 · 0 comments
Assignees
Labels
kind/bug Something isn't working phase/testing severity/s0 Extreme impact: Cause the application to break down and seriously affect the use
Milestone

Comments

@aressu1985
Copy link
Contributor

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Branch Name

2.0-dev

Commit ID

1d2305a

Other Environment Information

- Hardware parameters:standlone
- OS type:
- Others:

Actual Behavior

Statement : SELECT * FROM task WHERE id =? ORDER BY task.id LIMIT 1 FOR UPDATE
Parameters : [126]
ErrorCode : 20101
ErrorMessage : internal error: panic runtime error: index out of range [0] with length 0:
runtime.goPanicIndex
/Users/sudong/go/pkg/mod/golang.org/[email protected]/src/runtime/panic.go:115
github.com/matrixorigin/matrixone/pkg/sql/colexec/top.(*container).sort
/Users/sudong/Program/MatrixOrigin/mo-2.0/matrixone/pkg/sql/colexec/top/top.go:302
github.com/matrixorigin/matrixone/pkg/sql/colexec/top.(*container).processBatch
/Users/sudong/Program/MatrixOrigin/mo-2.0/matrixone/pkg/sql/colexec/top/top.go:253
github.com/matrixorigin/matrixone/pkg/sql/colexec/top.(*container).build
/Users/sudong/Program/MatrixOrigin/mo-2.0/matrixone/pkg/sql/colexec/top/top.go:228
github.com/matrixorigin/matrixone/pkg/sql/colexec/top.(*Top).Call
/Users/sudong/Program/MatrixOrigin/mo-2.0/matrixone/pkg/sql/colexec/top/top.go:144
github.com/matrixorigin/matrixone/pkg/vm.ChildrenCall
/Users/sudong/Program/MatrixOrigin/mo-2.0/matrixone/pkg/vm/types.go:499
github.com/matrixorigin/matrixone/pkg/sql/colexec/projection.(*Projection).Call
/Users/sudong/Program/MatrixOrigin/mo-2.0/matrixone/pkg/sql/colexec/projection/projection.go:68
github.com/matrixorigin/matrixone/pkg/vm.ChildrenCall
/Users/sudong/Program/MatrixOrigin/mo-2.0/matrixone/pkg/vm/types.go:499
github.com/matrixorigin/matrixone/pkg/sql/colexec/projection.(*Projection).Call
/Users/sudong/Program/MatrixOrigin/mo-2.0/matrixone/pkg/sql/colexec/projection/projection.go:68
github.com/matrixorigin/matrixone/pkg/vm.ChildrenCall

server.log

case:

test.zip

Expected Behavior

No response

Steps to Reproduce

1. git clone mo-load https://github.com/matrixorigin/mo-load.git
2. run mo service
3. create database and table
   create database test;
   uset test;
   CREATE TABLE `task` ( `id` bigint NOT NULL AUTO_INCREMENT, `source_connector_id` bigint NOT NULL, `task_log_id` bigint NOT NULL DEFAULT 0, `name` varchar(255) NOT NULL, `creator` varchar(255) NOT NULL, `uid` varchar(255) NOT NULL, `db_status` tinyint NOT NULL, `interval` bigint DEFAULT NULL, `load_interval_type` tinyint NOT NULL, `task_filter_mode` tinyint NOT NULL, `task_meta` varchar(255) NOT NULL, `folder_id` bigint NOT NULL, `folder_name` varchar(255) NOT NULL, `start_time` bigint DEFAULT NULL, `end_time` bigint DEFAULT NULL, `create_time` bigint NOT NULL, `update_time` bigint NOT NULL, PRIMARY KEY (`id`) );

4. insert some data to this table
5. cd mo-load/cases and unzip test.zip
5. cd mo-load and run
   ./run.sh -c cases/test -t 10 -d 2 -i 2 --mode=1 --psmode=true -b test

Additional information

No response

@aressu1985 aressu1985 added kind/bug Something isn't working needs-triage severity/s0 Extreme impact: Cause the application to break down and seriously affect the use labels Jan 23, 2025
@aressu1985 aressu1985 added this to the 2.0.2 milestone Jan 23, 2025
@ouyuanning ouyuanning assigned ouyuanning and unassigned matrix-meow Jan 23, 2025
@ouyuanning ouyuanning assigned aressu1985 and unassigned ouyuanning Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working phase/testing severity/s0 Extreme impact: Cause the application to break down and seriously affect the use
Projects
None yet
Development

No branches or pull requests

3 participants