Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: UT TestAppendAndGC2 failed with DATA RACE #19813

Open
1 task done
sukki37 opened this issue Nov 5, 2024 · 0 comments
Open
1 task done

[Bug]: UT TestAppendAndGC2 failed with DATA RACE #19813

sukki37 opened this issue Nov 5, 2024 · 0 comments
Assignees
Labels
bug/ut kind/bug Something isn't working severity/s0 Extreme impact: Cause the application to break down and seriously affect the use
Milestone

Comments

@sukki37
Copy link
Contributor

sukki37 commented Nov 5, 2024

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Branch Name

2.0-dev

Commit ID

during one pr

Other Environment Information

- Hardware parameters:
- OS type:
- Others:

Actual Behavior

https://github.com/matrixorigin/matrixone/actions/runs/11679981568/job/32522056175?pr=19768

job-logs.txt.zip

==================
WARNING: DATA RACE
Write at 0x00c004d46a20 by goroutine 8239:
  runtime.mapassign_fast64()
      /opt/hostedtoolcache/go/1.23.0/x64/src/runtime/map_fast64.go:113 +0x0
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver.(*vInfo).onLog()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver/vinfo.go:112 +0xaf
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver.(*vInfo).logLoop()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver/vinfo.go:102 +0x91
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver.newVInfo.gowrap1()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver/vinfo.go:69 +0x33

Previous write at 0x00c004d46a20 by goroutine 8139:
  runtime.mapassign_fast64()
      /opt/hostedtoolcache/go/1.23.0/x64/src/runtime/map_fast64.go:113 +0x0
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver.(*vInfo).onReplay()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver/vinfo.go:83 +0x2cd
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver.(*replayer).replayHandler()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver/replay.go:95 +0x21d
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver.(*vFile).Replay()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver/vfile.go:247 +0x34
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver.(*rotateFile).Replay()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver/file.go:185 +0x2c1
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver.(*baseStore).Replay()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver/store.go:273 +0x20a
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/logstore/store.(*StoreImpl).Replay()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/logstore/store/replay.go:22 +0x132
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/wal.(*walDriver).Replay()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/wal/driver.go:86 +0xb6
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/db/test.TestAppendAndGC2()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/db/test/db_test.go:6493 +0x11b5
  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

Goroutine 8239 (running) created at:
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver.newVInfo()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver/vinfo.go:69 +0x386
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver.OpenRotateFile()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver/file.go:131 +0xa38
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver.NewBaseStore()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver/store.go:77 +0xb04
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/logstore/store.NewStoreWithBatchStoreDriver()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/logstore/store/store.go:55 +0x52
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/wal.NewDriverWithBatchStore()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/wal/driver.go:57 +0xbc
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/db.Open()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/db/open.go:132 +0x1472
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/db/testutil.(*TestEngine).Restart()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/db/testutil/engine.go:97 +0x18f
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/db/test.TestAppendAndGC2()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/db/test/db_test.go:[647](https://github.com/matrixorigin/matrixone/actions/runs/11679981568/job/32522056175?pr=19768#step:9:648)1 +0x1087
  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

Goroutine 8139 (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:2034 +0xf17
  main.main()
      _testmain.go:463 +0x164
==================
2024/11/05 08:30:41.038087 +0000 INFO dbutils/mem.go:107 HeapInfo:TotalAlloc:6814MB Sys:438MB HeapAlloc:104MB HeapSys:425MB HeapIdle:312MB HeapReleased:258MB HeapInuse:113MB NextGC:153MB NumGC:78 PauseNs:172444886
2024/11/05 08:30:41.038602 +0000 INFO dbutils/mem.go:107 HeapInfo:TotalAlloc:6814MB Sys:438MB HeapAlloc:104MB HeapSys:425MB HeapIdle:312MB HeapReleased:258MB HeapInuse:113MB NextGC:153MB NumGC:78 PauseNs:172444886
==================
WARNING: DATA RACE
Read at 0x00c004ae6048 by goroutine 8139:
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/common.(*ClosedIntervals).TryMerge()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/common/intervals.go:46 +0x53
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver.(*replayer).updateaddrs()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver/replay.go:57 +0x1f7
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver.(*replayer).onReplayEntry()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver/replay.go:75 +0x10f
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver.(*replayer).replayHandler()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver/replay.go:92 +0x1f5
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver.(*vFile).Replay()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver/vfile.go:247 +0x34
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver.(*rotateFile).Replay()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver/file.go:185 +0x2c1
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver.(*baseStore).Replay()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver/store.go:273 +0x20a
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/logstore/store.(*StoreImpl).Replay()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/logstore/store/replay.go:22 +0x132
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/wal.(*walDriver).Replay()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/wal/driver.go:86 +0xb6
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/db/test.TestAppendAndGC2()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/db/test/db_test.go:[649](https://github.com/matrixorigin/matrixone/actions/runs/11679981568/job/32522056175?pr=19768#step:9:650)3 +0x11b5
  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 write at 0x00c004ae6048 by goroutine 8244:
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/common.(*ClosedIntervals).TryMerge()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/common/intervals.go:46 +0xf1
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver.(*syncBase).OnEntryReceived()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver/syncbase.go:83 +0x3e4
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver.(*baseStore).onPostCommits()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver/store.go:122 +0x98
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver.(*baseStore).onPostCommits-fm()
      <autogenerated>:1 +0x51
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/logstore/sm.(*safeQueue).Start.func1()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/logstore/sm/safeq.go:89 +0x3a1

Goroutine 8139 (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:2034 +0xf17
  main.main()
      _testmain.go:463 +0x164

Goroutine 8244 (running) created at:
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/logstore/sm.(*safeQueue).Start()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/logstore/sm/safeq.go:68 +0x1a4
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver.(*baseStore).start()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver/store.go:90 +0xdd
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver.NewBaseStore()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/logstore/driver/batchstoredriver/store.go:82 +0xc48
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/logstore/store.NewStoreWithBatchStoreDriver()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/logstore/store/store.go:55 +0x52
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/wal.NewDriverWithBatchStore()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/wal/driver.go:57 +0xbc
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/db.Open()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/db/open.go:132 +0x1472
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/db/testutil.(*TestEngine).Restart()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/db/testutil/engine.go:97 +0x18f
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/db/test.TestAppendAndGC2()
      /home/runner/work/matrixone/matrixone/pkg/vm/engine/tae/db/test/db_test.go:6471 +0x1087
  testing.tRunner()
      /opt/hostedtoolcache/go/1.23.0/x64/src/testing/testing.go:1[690](https://github.com/matrixorigin/matrixone/actions/runs/11679981568/job/32522056175?pr=19768#step:9:691) +0x226
  testing.(*T).Run.gowrap1()
      /opt/hostedtoolcache/go/1.23.0/x64/src/testing/testing.go:1743 +0x44
==================

Expected Behavior

No response

Steps to Reproduce

run ut

Additional information

No response

@sukki37 sukki37 added kind/bug Something isn't working needs-triage labels Nov 5, 2024
@sukki37 sukki37 added bug/ut severity/s0 Extreme impact: Cause the application to break down and seriously affect the use and removed needs-triage labels Nov 5, 2024
@sukki37 sukki37 assigned LeftHandCold and unassigned matrix-meow Nov 5, 2024
@sukki37 sukki37 added this to the 2.0.1 milestone Nov 5, 2024
This was referenced Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/ut kind/bug Something isn't working severity/s0 Extreme impact: Cause the application to break down and seriously affect the use
Projects
None yet
Development

No branches or pull requests

3 participants