Uploaded image for project: 'Apache YuniKorn'
  1. Apache YuniKorn
  2. YUNIKORN-1754

Data race in TestStoreWithLimitedSize

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.3.0
    • core - common, test - unit
    • None

    Description

      Data race was detected in a unit test.

      ==================
      WARNING: DATA RACE
      Write at 0x00000114c570 by goroutine 48:
        github.com/apache/yunikorn-core/pkg/events.TestStoreWithLimitedSize()
            /home/bacskop/repos/incubator-yunikorn-core/pkg/events/event_store_test.go:59 +0x46
        testing.tRunner()
            /snap/go/current/src/testing/testing.go:1576 +0x216
        testing.(*T).Run.func1()
            /snap/go/current/src/testing/testing.go:1629 +0x47
      
      Previous read at 0x00000114c570 by goroutine 42:
        github.com/apache/yunikorn-core/pkg/events.(*defaultEventStore).CollectEvents()
            /home/bacskop/repos/incubator-yunikorn-core/pkg/events/event_store.go:73 +0x165
        github.com/apache/yunikorn-core/pkg/events.(*shimPublisher).StartService.func1()
            /home/bacskop/repos/incubator-yunikorn-core/pkg/events/event_publisher.go:68 +0x101
      
      Goroutine 48 (running) created at:
        testing.(*T).Run()
            /snap/go/current/src/testing/testing.go:1629 +0x805
        testing.runTests.func1()
            /snap/go/current/src/testing/testing.go:2036 +0x8d
        testing.tRunner()
            /snap/go/current/src/testing/testing.go:1576 +0x216
        testing.runTests()
            /snap/go/current/src/testing/testing.go:2034 +0x87c
        testing.(*M).Run()
            /snap/go/current/src/testing/testing.go:1906 +0xb44
        main.main()
            _testmain.go:102 +0x2fc
      
      Goroutine 42 (running) created at:
        github.com/apache/yunikorn-core/pkg/events.(*shimPublisher).StartService()
            /home/bacskop/repos/incubator-yunikorn-core/pkg/events/event_publisher.go:63 +0xd6
        github.com/apache/yunikorn-core/pkg/events.TestNoFillWithoutEventPluginRegistered()
            /home/bacskop/repos/incubator-yunikorn-core/pkg/events/event_publisher_test.go:94 +0x295
        testing.tRunner()
            /snap/go/current/src/testing/testing.go:1576 +0x216
        testing.(*T).Run.func1()
            /snap/go/current/src/testing/testing.go:1629 +0x47
      ==================
      --- FAIL: TestStoreWithLimitedSize (0.00s)
          testing.go:1446: race detected during execution of test
      
       

       

      Attachments

        Activity

          People

            pbacsko Peter Bacsko
            pbacsko Peter Bacsko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: