matrixorigin / matrixone

Hyperconverged cloud-edge native database
https://docs.matrixorigin.cn/en
Apache License 2.0
1.79k stars 277 forks source link

[Bug]: bvt failed in snapshot_restore_*: panic delete table failed #19787

Open qingxinhome opened 2 weeks ago

qingxinhome commented 2 weeks ago

Is there an existing issue for the same bug?

Branch Name

main

Commit ID

c64026ac2962f074ec5ec454df57d584431d7c81

Other Environment Information

- Hardware parameters:
- OS type:
- Others:

Actual Behavior

[ERROR]

[SQL STATEMENT]: restore account acc01 from snapshot snapshot_01; [EXPECT RESULT]: null [ACTUAL RESULT]: internal error: panic delete table failed: query failed: github.com/matrixorigin/matrixone/pkg/vm/engine/disttae.(txnDatabase).deleteTable /home/runner/work/matrixone/matrixone/head/pkg/vm/engine/disttae/txn_database.go:257 github.com/matrixorigin/matrixone/pkg/vm/engine/disttae.(txnDatabase).Delete /home/runner/work/matrixone/matrixone/head/pkg/vm/engine/disttae/txn_database.go:176 github.com/matrixorigin/matrixone/pkg/sql/compile.(Scope).DropTable /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/ddl.go:2534 github.com/matrixorigin/matrixone/pkg/sql/compile.(Compile).run /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/compile.go:382 github.com/matrixorigin/matrixone/pkg/sql/compile.(Compile).runOnce /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/compile.go:480 github.com/matrixorigin/matrixone/pkg/sql/compile.(Compile).Run /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/compile2.go:249 github.com/matrixorigin/matrixone/pkg/frontend.executeStatusStmtInBack /home/runner/work/matrixone/matrixone/head/pkg/frontend/back_status_stmt.go:35 github.com/matrixorigin/matrixone/pkg/frontend.executeStmtInBack /home/runner/work/matrixone/matrixone/head/pkg/frontend/back_exec.go:465 github.com/matrixorigin/matrixone/pkg/frontend.dispatchStmt /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:2643 github.com/matrixorigin/matrixone/pkg/frontend.executeStmtWithIncrStmt /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:2610 github.com/matrixorigin/matrixone/pkg/frontend.executeStmtWithWorkspace /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:2555 github.com/matrixorigin/matrixone/pkg/frontend.executeStmtWithTxn /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:2447 github.com/matrixorigin/matrixone/pkg/frontend.doComQueryInBack /home/runner/work/matrixone/matrixone/head/pkg/frontend/back_exec.go:375 github.com/matrixorigin/matrixone/pkg/frontend.(backExec).Exec /home/runner/work/matrixone/matrixone/head/pkg/frontend/back_exec.go:133 github.com/matrixorigin/matrixone/pkg/frontend.recreateTable /home/runner/work/matrixone/matrixone/head/pkg/frontend/snapshot.go:1066 github.com/matrixorigin/matrixone/pkg/frontend.restoreSystemDatabase /home/runner/work/matrixone/matrixone/head/pkg/frontend/snapshot.go:885 github.com/matrixorigin/matrixone/pkg/frontend.restoreToAccount /home/runner/work/matrixone/matrixone/head/pkg/frontend/snapshot.go:642 github.com/matrixorigin/matrixone/pkg/frontend.doRestoreSnapshot /home/runner/work/matrixone/matrixone/head/pkg/frontend/snapshot.go:470 github.com/matrixorigin/matrixone/pkg/frontend.handleRestoreSnapshot /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:1193 github.com/matrixorigin/matrixone/pkg/frontend.execInFrontend /home/runner/work/matrixone/matrixone/head/pkg/frontend/self_handle.go:414 github.com/matrixorigin/matrixone/pkg/frontend.executeStmt /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:2680 github.com/matrixorigin/matrixone/pkg/frontend.dispatchStmt /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:2641 github.com/matrixorigin/matrixone/pkg/frontend.executeStmtWithIncrStmt /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:2610 github.com/matrixorigin/matrixone/pkg/frontend.executeStmtWithWorkspace /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:2555 github.com/matrixorigin/matrixone/pkg/frontend.executeStmtWithTxn /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:2447 github.com/matrixorigin/matrixone/pkg/frontend.executeStmtWithResponse /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:2411 github.com/matrixorigin/matrixone/pkg/frontend.doComQuery /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:3041 github.com/matrixorigin/matrixone/pkg/frontend.ExecRequest /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:3118 github.com/matrixorigin/matrixone/pkg/frontend.(Routine).handleRequest /home/runner/work/matrixone/matrixone/head/pkg/frontend/routine.go:287 github.com/matrixorigin/matrixone/pkg/frontend.(RoutineManager).Handler /home/runner/work/matrixone/matrixone/head/pkg/frontend/routine_manager.go:385 github.com/matrixorigin/matrixone/pkg/frontend.(MOServer).handleRequest /home/runner/work/matrixone/matrixone/head/pkg/frontend/server.go:515 github.com/matrixorigin/matrixone/pkg/frontend.(*MOServer).handleMessage /home/runner/work/matrixone/matrixone/head/pkg/frontend/server.go:483

Expected Behavior

No response

Steps to Reproduce

https://github.com/matrixorigin/matrixone/actions/runs/11665808296/job/32479355499?pr=19751

Additional information

No response

YANGGMM commented 2 weeks ago

dup with https://github.com/matrixorigin/matrixone/issues/19524, plz @aptend

aptend commented 1 week ago

fixed

aptend commented 1 week ago

repro https://github.com/matrixorigin/matrixone/actions/runs/11783448377/job/32820709762?pr=19964

log.zip

aptend commented 1 week ago

To be clear, this issue was fixed in #19746

repro https://github.com/matrixorigin/matrixone/actions/runs/11783448377/job/32820709762?pr=19964

And this panic is not a reproduction of this issue but rather resembles issue #18985, which is related to reading incomplete data from the memory of mo_columns.

Anyway let's track the issue with mo_columns in this thread.

aptend commented 3 days ago

no repro

Ariznawlll commented 2 days ago

repro:https://github.com/matrixorigin/matrixone/actions/runs/11910771196/job/33190901208?pr=20171

XuPeng-SH commented 20 hours ago

fixed