Skip to content

[Bug]: ut TestDoRebalance failed #20137

Closed

Description

@daviszhen

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Branch Name

in pr branch

Commit ID

lastest

Other Environment Information

- Hardware parameters:
- OS type:
- Others:

Actual Behavior

[TEST]: TestDoRebalance
[START_AT]: 2024-11-18T02:41:57Z
[END_AT]: 2024-11-18T02:41:57Z
[RESULT]: fail
[ELAPSED]: 0.57
[OUTPUTS]:
=== RUN   TestDoRebalance
{"level":"error","ts":"2024-11-18 02:41:57.253","caller":"[email protected]/session.go:515","msg":"close conneciton failed","session-id":28,"error":"close unix /tmp/151570967.sock->@: use of closed network connection"}
{"level":"error","ts":"2024-11-18 02:41:57.355","caller":"[email protected]/session.go:515","msg":"close conneciton failed","session-id":30,"error":"close unix /tmp/251930879.sock->@: use of closed network connection"}
2024/11/18 02:41:57.359540 +0000 INFO cn-service transfer begin {"uuid": "", "conn ID": 0}
2024/11/18 02:41:57.359658 +0000 INFO cn-service build connection with new server {"uuid": "", "conn ID": 0, "prev addr": "/tmp/151570967.sock"}
2024/11/18 02:41:57.36[32](https://github.com/matrixorigin/matrixone/actions/runs/11884663264/job/33113208563?pr=20135#step:9:33)77 +0000 ERROR frontend/mysql_buffer.go:277 close conn error {"error": "close unix @->/tmp/151570967.sock: use of closed network connection"}
==================
WARNING: DATA RACE
Write at 0x00c002a56990 by goroutine 918:
  github.com/matrixorigin/matrixone/pkg/proxy.(*router).Connect()
      /home/runner/work/matrixone/matrixone/pkg/proxy/router.go:250 +0x144
  github.com/matrixorigin/matrixone/pkg/proxy.testStartClient()
      /home/runner/work/matrixone/matrixone/pkg/proxy/client_conn_test.go:197 +0x39c
  github.com/matrixorigin/matrixone/pkg/proxy.testStartNClients()
      /home/runner/work/matrixone/matrixone/pkg/proxy/client_conn_test.go:216 +0xef
  github.com/matrixorigin/matrixone/pkg/proxy.TestDoRebalance()
      /home/runner/work/matrixone/matrixone/pkg/proxy/rebalancer_test.go:[33](https://github.com/matrixorigin/matrixone/actions/runs/11884663264/job/33113208563?pr=20135#step:9:34)1 +0x1534
  testing.tRunner()
      /opt/hostedtoolcache/go/1.23.0/x64/src/testing/testing.go:1690 +0x226
  testing.(*T).Run.gowrap1()
      /opt/hostedtoolcache/go/1.23.0/x64/src/testing/testing.go:1743 +0x44

Previous read at 0x00c002a56990 by goroutine 921:
  github.com/matrixorigin/matrixone/pkg/proxy.(*connManager).disconnect()
      /home/runner/work/matrixone/matrixone/pkg/proxy/conn_manager.go:212 +0x2e4
  github.com/matrixorigin/matrixone/pkg/proxy.(*serverConn).Close()
      /home/runner/work/matrixone/matrixone/pkg/proxy/server_conn.go:274 +0xfc
  github.com/matrixorigin/matrixone/pkg/proxy.(*tunnel).replaceServerConn()
      /home/runner/work/matrixone/matrixone/pkg/proxy/tunnel.go:286 +0x154
  github.com/matrixorigin/matrixone/pkg/proxy.(*tunnel).doReplaceConnection()
      /home/runner/work/matrixone/matrixone/pkg/proxy/tunnel.go:381 +0x204
  github.com/matrixorigin/matrixone/pkg/proxy.(*tunnel).transfer()
      /home/runner/work/matrixone/matrixone/pkg/proxy/tunnel.go:416 +0x293
  github.com/matrixorigin/matrixone/pkg/proxy.(*rebalancer).handleTransfer()
      /home/runner/work/matrixone/matrixone/pkg/proxy/rebalancer.go:243 +0x1a5
  github.com/matrixorigin/matrixone/pkg/proxy.(*rebalancer).handleTransfer-fm()
      <autogenerated>:1 +0x47
  github.com/matrixorigin/matrixone/pkg/common/stopper.(*Stopper).doRunCancelableTask.func1()
      /home/runner/work/matrixone/matrixone/pkg/common/stopper/stopper.go:277 +0xce

Goroutine 918 (running) created at:
  testing.(*T).Run()
      /opt/hostedtoolcache/go/1.23.0/x64/src/testing/testing.go:1743 +0x825
  testing.runTests.func1()
      /opt/hostedtoolcache/go/1.23.0/x64/src/testing/testing.go:2168 +0x85
  testing.tRunner()
      /opt/hostedtoolcache/go/1.23.0/x64/src/testing/testing.go:1690 +0x226
  testing.runTests()
      /opt/hostedtoolcache/go/1.23.0/x64/src/testing/testing.go:2166 +0x8be
  testing.(*M).Run()
      /opt/hostedtoolcache/go/1.23.0/x64/src/testing/testing.go:20[34](https://github.com/matrixorigin/matrixone/actions/runs/11884663264/job/33113208563?pr=20135#step:9:35) +0xf17
  main.main()
      _testmain.go:249 +0x164

Goroutine 921 (running) created at:
  github.com/matrixorigin/matrixone/pkg/common/stopper.(*Stopper).doRunCancelableTask()
      /home/runner/work/matrixone/matrixone/pkg/common/stopper/stopper.go:272 +0x164
  github.com/matrixorigin/matrixone/pkg/common/stopper.(*Stopper).RunNamedTask()
      /home/runner/work/matrixone/matrixone/pkg/common/stopper/stopper.go:175 +0x18c
  github.com/matrixorigin/matrixone/pkg/proxy.newRebalancer()
      /home/runner/work/matrixone/matrixone/pkg/proxy/rebalancer.go:109 +0x817
  github.com/matrixorigin/matrixone/pkg/proxy.testRebalancer()
      /home/runner/work/matrixone/matrixone/pkg/proxy/rebalancer_test.go:44 +0x197
  github.com/matrixorigin/matrixone/pkg/proxy.newTestProxyHandler()
      /home/runner/work/matrixone/matrixone/pkg/proxy/handler_test.go:65 +0x24e
  github.com/matrixorigin/matrixone/pkg/proxy.TestDoRebalance()
      /home/runner/work/matrixone/matrixone/pkg/proxy/rebalancer_test.go:262 +0xe7
  testing.tRunner()
      /opt/hostedtoolcache/go/1.23.0/x64/src/testing/testing.go:1690 +0x226
  testing.(*T).Run.gowrap1()
      /opt/hostedtoolcache/go/1.23.0/x64/src/testing/testing.go:1743 +0x44
==================
{"level":"error","ts":"2024-11-18 02:41:57.[36](https://github.com/matrixorigin/matrixone/actions/runs/11884663264/job/33113208563?pr=20135#step:9:37)3","caller":"[email protected]/session.go:515","msg":"close conneciton failed","session-id":29,"error":"close unix /tmp/151570967.sock->@: use of closed network connection"}
2024/11/18 02:41:57.366597 +0000 INFO cn-service transfer to a new CN server {"uuid": "", "conn ID": 0, "addr": "/tmp/251930879.sock"}
2024/11/18 02:41:57.366803 +0000 INFO cn-service set tunnel transfer intent {"uuid": "", "conn ID": 0, "value": false}
2024/11/18 02:41:57.366930 +0000 INFO cn-service transfer end {"uuid": "", "conn ID": 0}
{"level":"error","ts":"2024-11-18 02:41:57.571","caller":"[email protected]/session.go:515","msg":"close conneciton failed","session-id":33,"error":"close unix /tmp/251930879.sock->@: use of closed network connection"}
{"level":"error","ts":"2024-11-18 02:41:57.579","caller":"[email protected]/session.go:515","msg":"close conneciton failed","session-id":32,"error":"close unix /tmp/151570967.sock->@: use of closed network connection"}
{"level":"error","ts":"2024-11-18 02:41:57.579","caller":"[email protected]/session.go:515","msg":"close conneciton failed","session-id":31,"error":"close unix /tmp/151570967.sock->@: use of closed network connection"}
{"level":"error","ts":"2024-11-18 02:41:57.595","caller":"[email protected]/session.go:515","msg":"close conneciton failed","session-id":34,"error":"close unix /tmp/151570967.sock->@: use of closed network connection"}
2024/11/18 02:41:57.665693 +0000 INFO cn-service.mo-cluster refresh cluster details task stopped {"uuid": ""}
2024/11/18 02:41:57.699490 +0000 INFO cn-service scaling runner ended {"uuid": ""}
2024/11/18 02:41:57.699618 +0000 INFO cn-service rebalancer runner ended {"uuid": ""}
2024/11/18 02:41:57.699664 +0000 INFO cn-service rebalancer transfer ended. {"uuid": ""}
    testing.go:1[39](https://github.com/matrixorigin/matrixone/actions/runs/11884663264/job/33113208563?pr=20135#step:9:40)9: race detected during execution of test
--- FAIL: TestDoRebalance (0.57s)

Expected Behavior

ni error

Steps to Reproduce

https://github.com/matrixorigin/matrixone/actions/runs/11884663264/job/33113208563?pr=20135

Additional information

No response

Activity

  1. added
    kind/bug
    on Nov 18, 2024
  2. added this to the 2.0.1 milestone on Nov 18, 2024
  3. added
    severity/s0
    and removed on Nov 19, 2024
  4. volgariver6 commented on Nov 21, 2024

    @volgariver6
    Contributor

    尚未处理

  5. volgariver6 commented on Nov 24, 2024

    @volgariver6
    Contributor

    fixed

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

Metadata

Metadata

Assignees

Labels

bug/utkind/bugseverity/s0

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions