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

Data race in PlaceholderManager on cleanupTime

    XMLWordPrintableJSON

Details

    Description

      During a recent test run, a data race was detected in PlaceholderManager:

      ==================
      WARNING: DATA RACE
      Write at 0x00c0015a6618 by goroutine 55:
        github.com/apache/yunikorn-k8shim/pkg/cache.(*PlaceholderManager).setCleanupTime()
            /home/runner/work/yunikorn-k8shim/yunikorn-k8shim/pkg/cache/placeholder_manager.go:198 +0xa9
        runtime.call16()
            /opt/hostedtoolcache/go/1.16.15/x64/src/runtime/asm_amd64.s:550 +0x3d
        testing.(*T).FailNow()
            <autogenerated>:1 +0x44
        gotest.tools/assert.TestingT.FailNow-fm()
            /home/runner/go/pkg/mod/gotest.tools@v2.2.0+incompatible/assert/assert.go:83 +0x4f
        gotest.tools/assert.assert()
            /home/runner/go/pkg/mod/gotest.tools@v2.2.0+incompatible/assert/assert.go:137 +0x1fa
        gotest.tools/assert.Equal()
            /home/runner/go/pkg/mod/gotest.tools@v2.2.0+incompatible/assert/assert.go:260 +0x144
        github.com/apache/yunikorn-k8shim/pkg/cache.TestPlaceholderManagerCleanup()
            /home/runner/work/yunikorn-k8shim/yunikorn-k8shim/pkg/cache/placeholder_manager_test.go:370 +0x6b9
        testing.tRunner()
            /opt/hostedtoolcache/go/1.16.15/x64/src/testing/testing.go:1203 +0x202
      
      Previous read at 0x00c0015a6618 by goroutine 52:
        github.com/apache/yunikorn-k8shim/pkg/cache.(*PlaceholderManager).Start.func1()
            /home/runner/work/yunikorn-k8shim/yunikorn-k8shim/pkg/cache/placeholder_manager.go:165 +0xd9
      
      Goroutine 55 (running) created at:
        testing.(*T).Run()
            /opt/hostedtoolcache/go/1.16.15/x64/src/testing/testing.go:1248 +0x5d7
        testing.runTests.func1()
            /opt/hostedtoolcache/go/1.16.15/x64/src/testing/testing.go:1521 +0xa6
        testing.tRunner()
            /opt/hostedtoolcache/go/1.16.15/x64/src/testing/testing.go:1203 +0x202
        testing.runTests()
            /opt/hostedtoolcache/go/1.16.15/x64/src/testing/testing.go:1519 +0x612
        testing.(*M).Run()
            /opt/hostedtoolcache/go/1.16.15/x64/src/testing/testing.go:1427 +0x3b3
        main.main()
            _testmain.go:341 +0x356
      
      Goroutine 52 (running) created at:
        github.com/apache/yunikorn-k8shim/pkg/cache.(*PlaceholderManager).Start()
            /home/runner/work/yunikorn-k8shim/yunikorn-k8shim/pkg/cache/placeholder_manager.go:157 +0x1a6
        github.com/apache/yunikorn-k8shim/pkg/cache.TestPlaceholderManagerCleanup()
            /home/runner/work/yunikorn-k8shim/yunikorn-k8shim/pkg/cache/placeholder_manager_test.go:363 +0x3c4
        testing.tRunner()
            /opt/hostedtoolcache/go/1.16.15/x64/src/testing/testing.go:1203 +0x202
      ==================
      

      Attachments

        Issue Links

          Activity

            People

              ccondit Craig Condit
              ccondit Craig Condit
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: