Skip to content

[Bug]: restore from pitr report 'FATAL' error. #19357

Closed

Description

@Ariznawlll

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Branch Name

main

Commit ID

b6cb831

Other Environment Information

- Hardware parameters:
- OS type:
- Others:

Actual Behavior

tke测试环境,里面有数据大约2T
集群配置: https://github.com/matrixorigin/mo-nightly-regression/blob/main/.github/workflows/big-data-test.yml

pitr的创建信息(时间是UTC时间,UTC+8时间为2024-10-13 20:23:28):
image

恢复执行的sql:(执行这条sql的时间大约在UTC+8时间2024-10-15 13:06:07)
restore from pitr p01 "2024-10-14 05:22:29";(UTC时间,对应utc+8时间为"2024-10-14 13:22:29")

大约执行了5h+后报错
image

Lost connection时间点对应的日志里面有FATAL错误:
企业微信截图_e3304c9e-1ad0-4f88-a3d0-2cd91df60aa0

log: https://grafana.ci.matrixorigin.cn/explore?panes=%7B%22iwM%22:%7B%22datasource%22:%22loki%22,%22queries%22:%5B%7B%22refId%22:%22A%22,%22expr%22:%22%7Bnamespace%3D%5C%22mo-big-data-20241013%5C%22%7D%20%7C%3D%20%60FATAL%60%22,%22queryType%22:%22range%22,%22datasource%22:%7B%22type%22:%22loki%22,%22uid%22:%22loki%22%7D,%22editorMode%22:%22builder%22%7D%5D,%22range%22:%7B%22from%22:%221728988680000%22,%22to%22:%221728988800000%22%7D%7D%7D&schemaVersion=1&orgId=1

Expected Behavior

No response

Steps to Reproduce

create pitr p01 range 1 'd';

restore from pitr p01 "2024-10-14 05:22:29";

Additional information

No response

Activity

  1. added
    kind/bug
    on Oct 15, 2024
  2. added this to the 2.0.0 milestone on Oct 15, 2024
  3. sukki37 commented on Oct 15, 2024

    @sukki37
    Contributor

    similar to #19288, the result of the query based on the primary key returns 0 rows.

    {"level":"FATAL","time":"2024/10/15 10:39:28.348482 +0000","name":"cn-service","caller":"incrservice/store_sql.go:153","msg":"BUG: read incr record invalid","service":"30663632-6334-6633-3961-313239613832","uuid":"30663632-6334-6633-3961-313239613832","fetch-sql":"select offset, step from mo_increment_columns where table_id = 272927 and col_name = '__mo_fake_pk_col' for update","account":0,"table":272927,"col":"__mo_fake_pk_col","rows":0,"cost":"63.832666ms","ctx-done":false,"stacktrace":"github.com/matrixorigin/matrixone/pkg/incrservice.(*sqlStore).Allocate.func2\n\t/go/src/github.com/matrixorigin/matrixone/pkg/incrservice/store_sql.go:153\ngithub.com/matrixorigin/matrixone/pkg/sql/compile.(*sqlExecutor).ExecTxn\n\t/go/src/github.com/matrixorigin/matrixone/pkg/sql/compile/sql_executor.go:134\ngithub.com/matrixorigin/matrixone/pkg/incrservice.(*sqlStore).Allocate\n\t/go/src/github.com/matrixorigin/matrixone/pkg/incrservice/store_sql.go:129\ngithub.com/matrixorigin/matrixone/pkg/incrservice.(*allocator).doAllocate\n\t/go/src/github.com/matrixorigin/matrixone/pkg/incrservice/allocator.go:173\ngithub.com/matrixorigin/matrixone/pkg/incrservice.(*allocator).run\n\t/go/src/github.com/matrixorigin/matrixone/pkg/incrservice/allocator.go:160\ngithub.com/matrixorigin/matrixone/pkg/common/stopper.(*Stopper).doRunCancelableTask.func1\n\t/go/src/github.com/matrixorigin/matrixone/pkg/common/stopper/stopper.go:277"}

  4. aptend commented on Oct 17, 2024

    @aptend
    Contributor

    The log indicates:

    • The prolonged restore transaction 481c93f16e7a211117fe1ab03e64c04e took over five hours before it failed, involving a large workspace.
    • Despite the insert SQL statement(insert into mo_increment_columns(table_id, col_name, col_index, offset, step) values(272927, '__mo_fake_pk_col', 25, 0, 1)) executing successfully less than 200ms earlier, the subsequent select SQL statement could not retrieve that record from the workspace.

    This issue has not been reproduced locally. Let's see what the newly added log can tell upon reproduction in the big-data test

  5. aptend commented on Oct 18, 2024

    @aptend
    Contributor

    After conducting some tests, it seems that the issue is not related to S3 flushing. Instead, the txnOffset seems to be worthy of further investigation

  6. aptend commented on Oct 21, 2024

    @aptend
    Contributor

    No luck in reproducing the issue.

  7. Ariznawlll commented on Oct 22, 2024

    @Ariznawlll
    CollaboratorAuthor

    Same restore operation to repro this issue,but mo oom unfortunately, details in issue #19511

  8. aptend commented on Oct 23, 2024

    @aptend
    Contributor

    No repro yet, consider downgrading its severity

  9. added
    severity/s0
    and removed on Oct 23, 2024
  10. aressu1985 commented on Oct 24, 2024

    @aressu1985
    Contributor

    一致复现不了,先降级处理

  11. added
    severity/s1
    on Oct 24, 2024
  12. removed
    severity/s0
    on Oct 29, 2024
  13. XuPeng-SH commented on Nov 1, 2024

    @XuPeng-SH
    Contributor

    fixed

  14. Ariznawlll commented on Nov 2, 2024

    @Ariznawlll
    CollaboratorAuthor

    fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bugphase/testingseverity/s1

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions