Skip to content

[Bug]: pessimistic mode:pipeline hung #10882

Closed

Description

@Ariznawlll

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Environment

- Version or commit-id (e.g. v0.1.0 or 8b23a93): bd7286d622d9be1b84a64822e2a143dc74c4e0f3
- Hardware parameters:
- OS type:
- Others:

Actual Behavior

can not repro locally.

https://github.com/matrixorigin/matrixone/actions/runs/5667925051/job/15357619317?pr=10877
the wrong case path:matrixone/matrixone/test/distributed/cases/dml/update/update_index.test [row:26]

https://github.com/matrixorigin/matrixone/actions/runs/5668123547/job/15358200827?pr=10881
the wrong case path:matrixone/matrixone/test/distributed/cases/dml/delete/delete_index.test [row:117]

https://github.com/matrixorigin/matrixone/actions/runs/5688079541/job/15417430315?pr=10894 [row:312]

https://github.com/matrixorigin/matrixone/actions/runs/5717238289/job/15490561744?pr=10937 [row:156]

https://github.com/matrixorigin/matrixone/actions/runs/5725316420/job/15513581631?pr=10917

Expected Behavior

image image image image image

Steps to Reproduce

No response

Additional information

No response

Activity

  1. added
    kind/bug
    severity/s0
    on Jul 27, 2023
  2. added this to the 1.0.0 milestone on Jul 27, 2023
  3. zhangxu19830126 commented on Jul 30, 2023

    @zhangxu19830126
    Contributor
  4. changed the title [-][Bug]: pessimistic mode:run bvt on ci wating for lock[/-] [+][Bug]: pessimistic mode:pipeline hung[/+] on Jul 30, 2023
  5. added and removed
    severity/s0
    on Jul 31, 2023
  6. m-schen commented on Jul 31, 2023

    @m-schen
    Contributor

    还在处理其他s-1,让qx帮忙先处理一下试试。暂不用换owner.

  7. 17 remaining items

  8. m-schen commented on Aug 10, 2023

    @m-schen
    Contributor

    已修复,可验证。
    卡住的原因是
    当pipeline为 A -> B 且由B(接收方)结束了pipeline时,清理B的过程中会尝试继续从A收取数据,直到收到nil(结束的标记)。
    由于A的上下文继承于B,会同步结束,导致A不一定会发出nil数据(select case done : case send走了第一个case)。因此卡死(与协程的调度有关,因此偶现)。

    pr 11099和这个没有关系,后续会单独提。

  9. sukki37 commented on Aug 10, 2023

    @sukki37
    Contributor
  10. dongdongyang33 commented on Aug 10, 2023

    @dongdongyang33
    Contributor

    已修复,可验证。 卡住的原因是 当pipeline为 A -> B 且由B(接收方)结束了pipeline时,清理B的过程中会尝试继续从A收取数据,直到收到nil(结束的标记)。 由于A的上下文继承于B,会同步结束,导致A不一定会发出nil数据(select case done : case send走了第一个case)。因此卡死(与协程的调度有关,因此偶现)。

    pr 11099和这个没有关系,后续会单独提。

    应该不是这个原因?
    虽然会不小心走到没有发送 nil 的路径(设计上这是出错关闭的路径)但是最终一定会关闭 channel。清理的过程是收到 nil 或者发现 channel 关闭都可以退出,所以不应该会卡住。
    不过可能会收到很多误报的 children pipeline closed unexpectedly

  11. m-schen commented on Aug 11, 2023

    @m-schen
    Contributor
    image 这个pr没有包含修复的代码,因此卡住了。
  12. assigned and unassigned on Aug 11, 2023
  13. m-schen commented on Aug 11, 2023

    @m-schen
    Contributor

    已修复,可验证。 卡住的原因是 当pipeline为 A -> B 且由B(接收方)结束了pipeline时,清理B的过程中会尝试继续从A收取数据,直到收到nil(结束的标记)。 由于A的上下文继承于B,会同步结束,导致A不一定会发出nil数据(select case done : case send走了第一个case)。因此卡死(与协程的调度有关,因此偶现)。
    pr 11099和这个没有关系,后续会单独提。

    应该不是这个原因? 虽然会不小心走到没有发送 nil 的路径(设计上这是出错关闭的路径)但是最终一定会关闭 channel。清理的过程是收到 nil 或者发现 channel 关闭都可以退出,所以不应该会卡住。 不过可能会收到很多误报的 children pipeline closed unexpectedly

    我实际定位出卡死的地方是这里。卡死时只剩下接收方在等待数据,发送方的pipeline的协程已经全部结束了。可能用close去控制漏掉了些什么东西,也可能是之前clean pipeline前没有全部的地方调用cancel去防止产生新数据导致的。这个我还不能十分肯定。用close控制逻辑上是没有问题的,感觉是具体代码实现上有问题。need check.

  14. sukki37 commented on Aug 11, 2023

    @sukki37
    Contributor

    repro: https://github.com/matrixorigin/matrixone/actions/runs/5818682422/job/15775588094 image

    @m-schen, please continue to fix this one.

    my mistake, this bug hasn't been reproduced after #11137, so this issue can be downgraded and continue to be observed for a while.

  15. added
    severity/s1
    and removed on Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bugseverity/s1

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions