You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@yunikorn.apache.org by "Wilfred Spiegelenburg (Jira)" <ji...@apache.org> on 2022/11/29 09:24:00 UTC

[jira] [Created] (YUNIKORN-1433) data race detected in unit test

Wilfred Spiegelenburg created YUNIKORN-1433:
-----------------------------------------------

             Summary: data race detected in unit test
                 Key: YUNIKORN-1433
                 URL: https://issues.apache.org/jira/browse/YUNIKORN-1433
             Project: Apache YuniKorn
          Issue Type: Task
          Components: shim - kubernetes
            Reporter: Wilfred Spiegelenburg
         Attachments: logs_1085.zip

 

Data race detected in a k8shim unit test race log:
{code:java}
==================
WARNING: DATA RACE
Read at 0x00c00561c450 by goroutine 90:
  github.com/apache/yunikorn-k8shim/pkg/cache.(*Application).getTasks()
      /home/runner/work/yunikorn-k8shim/yunikorn-k8shim/pkg/cache/application.go:294 +0xa4
  github.com/apache/yunikorn-k8shim/pkg/cache.(*Application).postAppAccepted()
      /home/runner/work/yunikorn-k8shim/yunikorn-k8shim/pkg/cache/application.go:508 +0x17e
  github.com/apache/yunikorn-k8shim/pkg/cache.(*Application).Schedule()
      /home/runner/work/yunikorn-k8shim/yunikorn-k8shim/pkg/cache/application.go:358 +0x552
  github.com/apache/yunikorn-k8shim/pkg/shim.(*KubernetesShim).schedule()
      /home/runner/work/yunikorn-k8shim/yunikorn-k8shim/pkg/shim/scheduler.go:274 +0xbc
  github.com/apache/yunikorn-k8shim/pkg/shim.(*KubernetesShim).schedule-fm()
      <autogenerated>:1 +0x39
  k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1()
      /home/runner/go/pkg/mod/k8s.io/apimachinery@v0.23.14/pkg/util/wait/wait.go:155 +0x48
  k8s.io/apimachinery/pkg/util/wait.BackoffUntil()
      /home/runner/go/pkg/mod/k8s.io/apimachinery@v0.23.14/pkg/util/wait/wait.go:156 +0xce
  k8s.io/apimachinery/pkg/util/wait.JitterUntil()
      /home/runner/go/pkg/mod/k8s.io/apimachinery@v0.23.14/pkg/util/wait/wait.go:133 +0x104
  k8s.io/apimachinery/pkg/util/wait.Until()
      /home/runner/go/pkg/mod/k8s.io/apimachinery@v0.23.14/pkg/util/wait/wait.go:90 +0x48
  github.com/apache/yunikorn-k8shim/pkg/shim.(*KubernetesShim).doScheduling.func1()
      /home/runner/work/yunikorn-k8shim/yunikorn-k8shim/pkg/shim/scheduler.go:204 +0x58
Previous write at 0x00c00561c450 by goroutine 74:
  runtime.mapassign_faststr()
      /opt/hostedtoolcache/go/1.18.8/x64/src/runtime/map_faststr.go:203 +0x0
  github.com/apache/yunikorn-k8shim/pkg/cache.(*Application).addTask()
      /home/runner/work/yunikorn-k8shim/yunikorn-k8shim/pkg/cache/application.go:241 +0x184
  github.com/apache/yunikorn-k8shim/pkg/cache.(*Context).AddTask()
      /home/runner/work/yunikorn-k8shim/yunikorn-k8shim/pkg/cache/context.go:766 +0x49c
  github.com/apache/yunikorn-k8shim/pkg/shim.(*MockScheduler).addTask()
      /home/runner/work/yunikorn-k8shim/yunikorn-k8shim/pkg/shim/scheduler_mock_test.go:111 +0x524
  github.com/apache/yunikorn-k8shim/pkg/shim.TestRejectApplications()
      /home/runner/work/yunikorn-k8shim/yunikorn-k8shim/pkg/shim/scheduler_test.go:148 +0x906
  testing.tRunner()
      /opt/hostedtoolcache/go/1.18.8/x64/src/testing/testing.go:1439 +0x213
  testing.(*T).Run.func1()
      /opt/hostedtoolcache/go/1.18.8/x64/src/testing/testing.go:1486 +0x47
Goroutine 90 (running) created at:
  github.com/apache/yunikorn-k8shim/pkg/shim.(*KubernetesShim).doScheduling()
      /home/runner/work/yunikorn-k8shim/yunikorn-k8shim/pkg/shim/scheduler.go:204 +0x1b6
  github.com/apache/yunikorn-k8shim/pkg/shim.newSchedulerState.func4()
      /home/runner/work/yunikorn-k8shim/yunikorn-k8shim/pkg/shim/scheduler_state.go:166 +0x84
  github.com/looplab/fsm.(*FSM).enterStateCallbacks()
      /home/runner/go/pkg/mod/github.com/looplab/fsm@v0.1.0/fsm.go:403 +0xb6
  github.com/looplab/fsm.(*FSM).Event.func1()
      /home/runner/go/pkg/mod/github.com/looplab/fsm@v0.1.0/fsm.go:308 +0xa8
  github.com/looplab/fsm.transitionerStruct.transition()
      /home/runner/go/pkg/mod/github.com/looplab/fsm@v0.1.0/fsm.go:354 +0x99
  github.com/looplab/fsm.(*transitionerStruct).transition()
      <autogenerated>:1 +0x29
  github.com/looplab/fsm.(*FSM).doTransition()
      /home/runner/go/pkg/mod/github.com/looplab/fsm@v0.1.0/fsm.go:339 +0x701
  github.com/looplab/fsm.(*FSM).Event()
      /home/runner/go/pkg/mod/github.com/looplab/fsm@v0.1.0/fsm.go:321 +0x6da
  github.com/apache/yunikorn-k8shim/pkg/shim.(*KubernetesShim).handle()
      /home/runner/work/yunikorn-k8shim/yunikorn-k8shim/pkg/shim/scheduler.go:257 +0x19c
  github.com/apache/yunikorn-k8shim/pkg/shim.(*KubernetesShim).SchedulerEventHandler.func1()
      /home/runner/work/yunikorn-k8shim/yunikorn-k8shim/pkg/shim/scheduler.go:118 +0xec
  github.com/apache/yunikorn-k8shim/pkg/dispatcher.Start.func1()
      /home/runner/work/yunikorn-k8shim/yunikorn-k8shim/pkg/dispatcher/dispatcher.go:201 +0x58b
Goroutine 74 (running) created at:
  testing.(*T).Run()
      /opt/hostedtoolcache/go/1.18.8/x64/src/testing/testing.go:1486 +0x724
  testing.runTests.func1()
      /opt/hostedtoolcache/go/1.18.8/x64/src/testing/testing.go:1839 +0x99
  testing.tRunner()
      /opt/hostedtoolcache/go/1.18.8/x64/src/testing/testing.go:1439 +0x213
  testing.runTests()
      /opt/hostedtoolcache/go/1.18.8/x64/src/testing/testing.go:1837 +0x7e4
  testing.(*M).Run()
      /opt/hostedtoolcache/go/1.18.8/x64/src/testing/testing.go:1719 +0xa71
  main.main()
      _testmain.go:103 +0x3a9
==================
{code}
 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@yunikorn.apache.org
For additional commands, e-mail: issues-help@yunikorn.apache.org