Repository navigation
Description
Description
Refs #29249. TAE restart/WAL replay can panic with ExpectedEOB after concurrent range-delete plus append activity. The existing regression test pkg/vm/engine/tae/db/test/db_test.go:TestDelete4 is skipped because it crashes occasionally; removing only that skip reproduces the crash on a clean latest main.
Environment
- Branch:
main - Commit:
f20f5ca147c44b012343d0f48dfcd84b6a5986a1 - OS: Debian Linux amd64
- Go: 1.26.4 local toolchain (the local probe temporarily used
go 1.26.0ingo.mod) GOMAXPROCS=2,GOFLAGS=-mod=mod,-p 1, no network service or external cluster
Actual Behavior
The process panics during the first restart/replay phase:
panic: ExpectedEOB
...
github.com/matrixorigin/matrixone/pkg/vm/engine/tae/txn/txnimpl.(*replayTxnStore).replayAppend
pkg/vm/engine/tae/txn/txnimpl/replaystore.go:259
The clean-main probe failed in 0.123s after the test process started. A second probe on the current #29249 cleanup tree reached the same panic and stack path. This is a process crash during recovery, not a test-only assertion failure.
Expected Behavior
Restart and WAL replay must complete without a process panic and must preserve the committed row state. If the replay record cannot be resolved, the path must return a controlled, diagnosable error with correct cleanup rather than panic or silently discard the append.
Steps to Reproduce
-
Check out
mainatf20f5ca147c44b012343d0f48dfcd84b6a5986a1. -
In
pkg/vm/engine/tae/db/test/db_test.go, temporarily remove the firstt.Skip(any("This case crashes occasionally, is being fixed, skip it for now"))inTestDelete4. -
Run with the repository CGo test environment,
GOMAXPROCS=2, and-p 1:go test -p 1 -count=1 -run '^TestDelete4$' ./pkg/vm/engine/tae/db/test
-
The test creates a one-row varchar-PK table, submits concurrent range-delete/append updates, then restarts the engine. Replay panics before the test can finish.
Additional information
The failure chain is concrete in the current code:
replayTxnStore.replayAppendcallsensureReplayAObject.ensureReplayAObjectreturnsOkExpectedEOBwhile resolving the append destination/table.replayAppendtreats every error other thanErrDebugReplayas fatal and panics at line 259.- The diagnostic catalog printed immediately before the panic contains only system tables, while the WAL command targets
BLK<1000-1000-...>for the user table.
The required fix should establish the correct catalog/WAL ordering or ownership for this replay record and keep the existing crash regression executable with a deterministic, minimal oracle. Do not simply remove the skip or swallow ExpectedEOB; verify data preservation and controlled failure semantics across restart.
Activity
XuPeng-SH commentedon Oct 8, 2026
This report is invalid as a production bug and should be closed.
The
ExpectedEOBreproduction came fromTestDelete4usingCreateRelAndAppend. That helper creates the user database/relation and appends user rows, but it does not persist the correspondingmo_tablesandmo_columnscatalog rows. After checkpoint/restart, replay therefore cannot resolve the user table; the resultingExpectedEOB/Unknown database dbis an invalid fixture, not evidence that a valid persisted database can reach this replay path.On clean
mainatf20f5ca147c44b012343d0f48dfcd84b6a5986a1, a minimal probe with the original helper reproducedUnknown database dbafter restart. Changing only the fixture to the existing system-catalog-awareCreateRelAndAppend2madeTestDelete4pass 5 consecutive runs (9.736s) without any production-code change.TestUpdatehas the same test-quality problem: after its skip is removed, it continues afterGetByFiltererrors and dereferences nil IDs/offsets from worker goroutines, so its panic is caused by the test itself and its unchecked expected write conflicts.No production replay fix is warranted from this report. The useful follow-up is to retain or replace the concurrent restart coverage with a valid, deterministic fixture and explicit error handling.
XuPeng-SH commentedon Oct 8, 2026
Closing as invalid production bug: the reported replay failure is caused by an incomplete test fixture, as documented in the preceding comment.