Repository navigation
Labels
Milestone
Description
Is there an existing issue for the same bug?
- I have checked the existing issues.
Branch Name
3.0-dev / v3.0.11-6a0394c4f-2026-05-11
Commit ID
Other Environment Information
- Hardware parameters: IDC bare-metal, 14P
- OS type: Linux
- MO version: v3.0.11-6a0394c4f-2026-05-11
- Scenario: After tenant upgrade DDL (902 tenants, drop/create information_schema.statistics)Actual Behavior
TN panics with nil pointer dereference in MergeScheduler.doSched at scheduler.go:1048.
The panic occurs because a.supps[todo.table.ID()] returns nil (the table was dropped during tenant upgrade DDL), but doSched accesses supp.mergingTaskCnt without a nil check.
Panic stack:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x2d604ae]
goroutine 9080 [running]:
github.com/matrixorigin/matrixone/pkg/vm/engine/tae/db/merge.(*MergeScheduler).doSched(0xc094790a00, 0xc02577b8c0)
/go/src/github.com/matrixorigin/matrixone/pkg/vm/engine/tae/db/merge/scheduler.go:1048 +0x1ee
github.com/matrixorigin/matrixone/pkg/vm/engine/tae/db/merge.(*MergeScheduler).handleMainLoop(0xc094790a00)
/go/src/github.com/matrixorigin/matrixone/pkg/vm/engine/tae/db/merge/scheduler.go:788 +0x56a
created by github.com/matrixorigin/matrixone/pkg/vm/engine/tae/db/merge.(*MergeScheduler).Start in goroutine 1007
/go/src/github.com/matrixorigin/matrixone/pkg/vm/engine/tae/db/merge/scheduler.go:153 +0xc5
Relevant code at line 1048:
supp := a.supps[todo.table.ID()]
now := a.clock.Now()
// this table is merging, postpone the task
if supp.mergingTaskCnt > 0 { // <-- line 1048, supp is nil here
a.pq.Update(todo, now.Add(a.baseInterval/2))
return
}Expected Behavior
doSched should check supp == nil and return early (similar to the fix in dispatchMsg from #22697).
Steps to Reproduce
- Deploy MO cluster with many tenants (900+)
- Trigger tenant upgrade that performs mass DDL (drop/create
information_schema.statisticsfor each tenant) - TN merge scheduler picks up a todo item for a table that was just dropped
a.supps[todo.table.ID()]returns nil → panic
Additional information
This is the same class of bug as #22695 / #22697, but in a different code path. PR #22697 added a nil check in dispatchMsg, but missed the same pattern in doSched. The fix should be:
supp := a.supps[todo.table.ID()]
if supp == nil {
// table has been dropped and removed from supps, skip
return
}cc @aptend
Activity
xzxiong commentedon May 18, 2026
Workaround
Disable merge scheduler globally via
mo_ctlto prevent repeated TN panics until the fix is available:Note: Disabling merge will cause object accumulation over time. Re-enable once the fix is available.
fix: skip stale merge scheduler todo (#24466)
aptend commentedon May 21, 2026
fixed