You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: BUG: 'read incr record invalid' causes the CN to crash. #11957
- Version or commit-id (e.g. v0.1.0 or 8b23a93): https://github.com/matrixorigin/matrixone/commit/02535ea0156d4ab38435f064175c83d78c37bc05- Hardware parameters:
- OS type:
- Others:
{"level":"FATAL","time":"2023/09/28 15:22:54.049461 +0000","name":"cn-service.incrservice","caller":"incrservice/store_sql.go:115","msg":"BUG: read incr record invalid","uuid":"33383364-3261-6530-6166-613335626665","fetch-sql":"select offset, step from mo_increment_columns where table_id = 272389 and col_name = 'task_id' for update","account":0,"table":272389,"col":"task_id","rows":0,"stacktrace":"github.com/matrixorigin/matrixone/pkg/incrservice.(*sqlStore).Allocate.func1\n\t/go/src/github.com/matrixorigin/matrixone/pkg/incrservice/store_sql.go:115\ngithub.com/matrixorigin/matrixone/pkg/sql/compile.(*sqlExecutor).ExecTxn\n\t/go/src/github.com/matrixorigin/matrixone/pkg/sql/compile/sql_executor.go:105\ngithub.com/matrixorigin/matrixone/pkg/incrservice.(*sqlStore).Allocate\n\t/go/src/github.com/matrixorigin/matrixone/pkg/incrservice/store_sql.go:98\ngithub.com/matrixorigin/matrixone/pkg/incrservice.(*allocator).doAllocate\n\t/go/src/github.com/matrixorigin/matrixone/pkg/incrservice/allocator.go:143\ngithub.com/matrixorigin/matrixone/pkg/incrservice.(*allocator).run\n\t/go/src/github.com/matrixorigin/matrixone/pkg/incrservice/allocator.go:130\ngithub.com/matrixorigin/matrixone/pkg/common/stopper.(*Stopper).doRunCancelableTask.func1\n\t/go/src/github.com/matrixorigin/matrixone/pkg/common/stopper/stopper.go:259"}
After adding more logs, it is found that the data does exist in memory: read mem [272429, __mo_fake_pk_col, 1696225224196494546-0], but the data cannot be read when querying the transaction's snapshots: 1696225226739831838-1. @triump2020@reusee
Activity
fengttt commentedon Sep 29, 2023
May not be related, but at stopper.go #11964
sukki37 commentedon Oct 2, 2023
After adding more logs, it is found that the data does exist in memory: read mem [272429, __mo_fake_pk_col, 1696225224196494546-0], but the data cannot be read when querying the transaction's snapshots: 1696225226739831838-1. @triump2020 @reusee
http://47.97.80.230/explore?orgId=1&left=%7B%22datasource%22:%22P3C839627617F91E0%22,%22queries%22:%5B%7B%22refId%22:%22A%22,%22expr%22:%22%7Bnamespace%3D%5C%22freetier-02%5C%22%7D%20%7C%20pod%20%3D%20%60default-cn-k9kfn%60%22,%22queryType%22:%22range%22,%22datasource%22:%7B%22type%22:%22loki%22,%22uid%22:%22P3C839627617F91E0%22%7D,%22editorMode%22:%22builder%22%7D%5D,%22range%22:%7B%22from%22:%221696225200000%22,%22to%22:%221696225260000%22%7D%7D
sukki37 commentedon Oct 2, 2023
another scenario is that there is no data in memory, but the query transaction shows 22 blocks
Explore-logs-2023-10-02 18_32_49.txt
LeftHandCold commentedon Oct 3, 2023
The root cause is that ctx has "deadline" before sql exec(), and exec() did not return error, so FATAL
LeftHandCold commentedon Oct 3, 2023
Repro steps:
1: https://github.com/matrixorigin/matrixone/blob/main/pkg/incrservice/store_sql.go#L101
Add TriggerFault in front of Exec(fetchSQL), then make build & start mo
LeftHandCold commentedon Oct 3, 2023
Adding TriggerFault in lock_op.go/doLock can also reproduce the bug
fix heartbeat context deadline not set (#11968)
fix heartbeat context deadline not set (#11968)
zhangxu19830126 commentedon Oct 7, 2023
fixed
fix heartbeat context deadline not set (#11968)
zhangxu19830126 commentedon Oct 8, 2023
还有有问题,需要继续看
zhangxu19830126 commentedon Oct 10, 2023
本地已经fix了
zhangxu19830126 commentedon Oct 11, 2023
fixed
sukki37 commentedon Oct 12, 2023
After the upgrade, the issue hasn't reproduced, so we've downgraded it for further observation.
fix heartbeat context deadline not set (matrixorigin#11968)