Skip to content

[Bug]: TestCreateQueueFullFallback DATA RACE #23581

Closed

Description

@gouhongshen

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Branch Name

main

Commit ID

latest

Other Environment Information

- Hardware parameters:
- OS type:
- Others:

Actual Behavior

https://github.com/matrixorigin/matrixone/actions/runs/21237169761/job/61107477149?pr=23571

=== RUN   TestCreateQueueFullFallback
==================
WARNING: DATA RACE
Write at 0x00c000131b30 by goroutine 240:
  runtime.mapassign_faststr()
      /opt/hostedtoolcache/go/1.25.4/x64/src/internal/runtime/maps/runtime_faststr_swiss.go:263 +0x0
  github.com/matrixorigin/matrixone/pkg/common/morpc.(*client).closeIdleBackends()
      /home/runner/work/matrixone/matrixone/pkg/common/morpc/client.go:1082 +0x20a
  github.com/matrixorigin/matrixone/pkg/common/morpc.(*clientGCManager).doGCIdle()
      /home/runner/work/matrixone/matrixone/pkg/common/morpc/client_gc.go:443 +0x2b0
  github.com/matrixorigin/matrixone/pkg/common/morpc.(*clientGCManager).runGCIdleLoop()
      /home/runner/work/matrixone/matrixone/pkg/common/morpc/client_gc.go:333 +0x2fa
  github.com/matrixorigin/matrixone/pkg/common/morpc.(*clientGCManager).ensureStartedLocked.gowrap1()
      /home/runner/work/matrixone/matrixone/pkg/common/morpc/client_gc.go:241 +0x33

Previous read at 0x00c000131b30 by goroutine 469:
  runtime.mapaccess1_faststr()
      /opt/hostedtoolcache/go/1.25.4/x64/src/internal/runtime/maps/runtime_faststr_swiss.go:103 +0x0
  github.com/matrixorigin/matrixone/pkg/common/morpc.TestCreateQueueFullFallback()
      /home/runner/work/matrixone/matrixone/pkg/common/morpc/client_autocreate_test.go:143 +0x615
  testing.tRunner()
      /opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1934 +0x21c
  testing.(*T).Run.gowrap1()
      /opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1997 +0x44

Goroutine 240 (running) created at:
  github.com/matrixorigin/matrixone/pkg/common/morpc.(*clientGCManager).ensureStartedLocked()
      /home/runner/work/matrixone/matrixone/pkg/common/morpc/client_gc.go:241 +0xd9
  github.com/matrixorigin/matrixone/pkg/common/morpc.init.0()
      /home/runner/work/matrixone/matrixone/pkg/common/morpc/client_gc.go:259 +0x4a

Goroutine 469 (running) created at:
  testing.(*T).Run()
      /opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1997 +0x9d2
  testing.runTests.func1()
      /opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:2477 +0x85
  testing.tRunner()
      /opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1934 +0x21c
  testing.runTests()
      /opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:2475 +0x96c
  testing.(*M).Run()
      /opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:2337 +0xed4
  main.main()
      _testmain.go:451 +0x164
==================
==================
WARNING: DATA RACE
Write at 0x00c00026c178 by goroutine 240:
  github.com/matrixorigin/matrixone/pkg/common/morpc.(*client).closeIdleBackends()
      /home/runner/work/matrixone/matrixone/pkg/common/morpc/client.go:1082 +0x219
  github.com/matrixorigin/matrixone/pkg/common/morpc.(*clientGCManager).doGCIdle()
      /home/runner/work/matrixone/matrixone/pkg/common/morpc/client_gc.go:443 +0x2b0
  github.com/matrixorigin/matrixone/pkg/common/morpc.(*clientGCManager).runGCIdleLoop()
      /home/runner/work/matrixone/matrixone/pkg/common/morpc/client_gc.go:333 +0x2fa
  github.com/matrixorigin/matrixone/pkg/common/morpc.(*clientGCManager).ensureStartedLocked.gowrap1()
      /home/runner/work/matrixone/matrixone/pkg/common/morpc/client_gc.go:241 +0x33

Previous read at 0x00c00026c178 by goroutine 469:
  github.com/matrixorigin/matrixone/pkg/common/morpc.TestCreateQueueFullFallback()
      /home/runner/work/matrixone/matrixone/pkg/common/morpc/client_autocreate_test.go:143 +0x624
  testing.tRunner()
      /opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1934 +0x21c
  testing.(*T).Run.gowrap1()
      /opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1997 +0x44

Goroutine 240 (running) created at:
  github.com/matrixorigin/matrixone/pkg/common/morpc.(*clientGCManager).ensureStartedLocked()
      /home/runner/work/matrixone/matrixone/pkg/common/morpc/client_gc.go:241 +0xd9
  github.com/matrixorigin/matrixone/pkg/common/morpc.init.0()
      /home/runner/work/matrixone/matrixone/pkg/common/morpc/client_gc.go:259 +0x4a

Goroutine 469 (running) created at:
  testing.(*T).Run()
      /opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1997 +0x9d2
  testing.runTests.func1()
      /opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:2477 +0x85
  testing.tRunner()
      /opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1934 +0x21c
  testing.runTests()
      /opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:2475 +0x96c
  testing.(*M).Run()
      /opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:2337 +0xed4
  main.main()
      _testmain.go:451 +0x164
==================
==================
WARNING: DATA RACE
Write at 0x00c00026c1a0 by goroutine 240:
  github.com/matrixorigin/matrixone/pkg/common/morpc.(*client).closeIdleBackends()
      /home/runner/work/matrixone/matrixone/pkg/common/morpc/client.go:1082 +0x219
  github.com/matrixorigin/matrixone/pkg/common/morpc.(*clientGCManager).doGCIdle()
      /home/runner/work/matrixone/matrixone/pkg/common/morpc/client_gc.go:443 +0x2b0
  github.com/matrixorigin/matrixone/pkg/common/morpc.(*clientGCManager).runGCIdleLoop()
      /home/runner/work/matrixone/matrixone/pkg/common/morpc/client_gc.go:333 +0x2fa
  github.com/matrixorigin/matrixone/pkg/common/morpc.(*clientGCManager).ensureStartedLocked.gowrap1()
      /home/runner/work/matrixone/matrixone/pkg/common/morpc/client_gc.go:241 +0x33

Previous read at 0x00c00026c1a0 by goroutine 469:
  github.com/matrixorigin/matrixone/pkg/common/morpc.TestCreateQueueFullFallback()
      /home/runner/work/matrixone/matrixone/pkg/common/morpc/client_autocreate_test.go:146 +0x6d9
  testing.tRunner()
      /opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1934 +0x21c
  testing.(*T).Run.gowrap1()
      /opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1997 +0x44

Goroutine 240 (running) created at:
  github.com/matrixorigin/matrixone/pkg/common/morpc.(*clientGCManager).ensureStartedLocked()
      /home/runner/work/matrixone/matrixone/pkg/common/morpc/client_gc.go:241 +0xd9
  github.com/matrixorigin/matrixone/pkg/common/morpc.init.0()
      /home/runner/work/matrixone/matrixone/pkg/common/morpc/client_gc.go:259 +0x4a

Goroutine 469 (running) created at:
  testing.(*T).Run()
      /opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1997 +0x9d2
  testing.runTests.func1()
      /opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:2477 +0x85
  testing.tRunner()
      /opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:1934 +0x21c
  testing.runTests()
      /opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:2475 +0x96c
  testing.(*M).Run()
      /opt/hostedtoolcache/go/1.25.4/x64/src/testing/testing.go:2337 +0xed4
  main.main()
      _testmain.go:451 +0x164
==================

Expected Behavior

No response

Steps to Reproduce

see above

Additional information

No response

Activity

  1. added
    kind/bug
    on Jan 22, 2026
  2. gouhongshen commented on Jan 22, 2026

    @gouhongshen
    ContributorAuthor

    repro:

    MORPC_GC_IDLE_INTERVAL=1ms go test -race ./pkg/common/morpc/ -run TestCreateQueueFullFallback -count=100
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions