Weiwei Yang created YUNIKORN-499:
------------------------------------

             Summary: UT failures - TestApplicationScheduling
                 Key: YUNIKORN-499
                 URL: https://issues.apache.org/jira/browse/YUNIKORN-499
             Project: Apache YuniKorn
          Issue Type: Bug
          Components: shim - kubernetes
            Reporter: Weiwei Yang


UT failed because of data race:

{code}
2021-01-05T01:15:31.019Z        DEBUG   rmproxy/rmproxy.go:63   enqueue event   
{"event": 
{"RmID":"my-kube-cluster","AcceptedApplications":[],"RejectedApplications":[],"UpdatedApplications":[{"applicationID":"app0001","state":"Accepted","stateTransitionTimestamp":1609809331019221832,"message":"Status
 change triggered by the event : RunApplication"}]}, "currentQueueSize": 0}
2021-01-05T01:15:31.019Z        INFO    objects/application.go:351      Ask 
added successfully to application   {"appID": "app0001", "ask": "task0001", 
"pendingDelta": "map[memory:1]"}
==================
WARNING: DATA RACE
Write at 0x00c006646f60 by goroutine 57:
  runtime.mapassign_faststr()
      
/home/travis/.gimme/versions/go1.15.linux.amd64/src/runtime/map_faststr.go:202 
+0x0
  
github.com/apache/incubator-yunikorn-core/pkg/common/resources.(*Resource).AddTo()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/common/resources/resources.go:159
 +0x1d8
  
github.com/apache/incubator-yunikorn-core/pkg/scheduler/objects.(*Application).AddAllocationAsk()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/scheduler/objects/application.go:348
 +0x3d1
  
github.com/apache/incubator-yunikorn-core/pkg/scheduler.(*ClusterContext).processAsks()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/scheduler/context.go:658
 +0x1fc
  
github.com/apache/incubator-yunikorn-core/pkg/scheduler.(*ClusterContext).processAllocations()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/scheduler/context.go:614
 +0x204
  
github.com/apache/incubator-yunikorn-core/pkg/scheduler.(*ClusterContext).processRMUpdateEvent()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/scheduler/context.go:229
 +0x76
  
github.com/apache/incubator-yunikorn-core/pkg/scheduler.(*Scheduler).handleRMEvent()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/scheduler/scheduler.go:112
 +0x3f8
Previous read at 0x00c006646f60 by goroutine 59:
  runtime.mapiterinit()
      /home/travis/.gimme/versions/go1.15.linux.amd64/src/runtime/map.go:797 
+0x0
  
github.com/apache/incubator-yunikorn-core/pkg/common/resources.StrictlyGreaterThanZero()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/common/resources/resources.go:732
 +0xb1
  
github.com/apache/incubator-yunikorn-core/pkg/scheduler/objects.filterOnPendingResources()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/scheduler/objects/sorters.go:84
 +0x168
  
github.com/apache/incubator-yunikorn-core/pkg/scheduler/objects.sortApplications()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/scheduler/objects/sorters.go:60
 +0x2a4
  
github.com/apache/incubator-yunikorn-core/pkg/scheduler/objects.(*Queue).sortApplications()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/scheduler/objects/queue.go:747
 +0xa7
  
github.com/apache/incubator-yunikorn-core/pkg/scheduler/objects.(*Queue).TryAllocate()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/scheduler/objects/queue.go:872
 +0x91
  
github.com/apache/incubator-yunikorn-core/pkg/scheduler/objects.(*Queue).TryAllocate()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/scheduler/objects/queue.go:885
 +0x671
  
github.com/apache/incubator-yunikorn-core/pkg/scheduler.(*PartitionContext).tryAllocate()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/scheduler/partition.go:685
 +0xba
  
github.com/apache/incubator-yunikorn-core/pkg/scheduler.(*ClusterContext).schedule()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/scheduler/context.go:118
 +0x8d2
  
github.com/apache/incubator-yunikorn-core/pkg/scheduler.(*Scheduler).internalSchedule()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/scheduler/scheduler.go:70
 +0x4b
Goroutine 57 (running) created at:
  
github.com/apache/incubator-yunikorn-core/pkg/scheduler.(*Scheduler).StartService()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/scheduler/scheduler.go:54
 +0xa4
  
github.com/apache/incubator-yunikorn-core/pkg/entrypoint.startAllServicesWithParameters()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/entrypoint/entrypoint.go:83
 +0x337
  github.com/apache/incubator-yunikorn-core/pkg/entrypoint.StartAllServices()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/entrypoint/entrypoint.go:42
 +0x77
  github.com/apache/incubator-yunikorn-k8shim/pkg/shim.(*MockScheduler).init()
      
/home/travis/gopath/src/github.com/apache/incubator-yunikorn-k8shim/pkg/shim/scheduler_mock_test.go:61
 +0xf6
  
github.com/apache/incubator-yunikorn-k8shim/pkg/shim.TestApplicationScheduling()
      
/home/travis/gopath/src/github.com/apache/incubator-yunikorn-k8shim/pkg/shim/scheduler_test.go:61
 +0x89
  testing.tRunner()
      
/home/travis/.gimme/versions/go1.15.linux.amd64/src/testing/testing.go:1108 
+0x202
Goroutine 59 (running) created at:
  
github.com/apache/incubator-yunikorn-core/pkg/scheduler.(*Scheduler).StartService()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/scheduler/scheduler.go:61
 +0x1d9
  
github.com/apache/incubator-yunikorn-core/pkg/entrypoint.startAllServicesWithParameters()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/entrypoint/entrypoint.go:83
 +0x337
  github.com/apache/incubator-yunikorn-core/pkg/entrypoint.StartAllServices()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/entrypoint/entrypoint.go:42
 +0x77
  github.com/apache/incubator-yunikorn-k8shim/pkg/shim.(*MockScheduler).init()
      
/home/travis/gopath/src/github.com/apache/incubator-yunikorn-k8shim/pkg/shim/scheduler_mock_test.go:61
 +0xf6
  
github.com/apache/incubator-yunikorn-k8shim/pkg/shim.TestApplicationScheduling()
      
/home/travis/gopath/src/github.com/apache/incubator-yunikorn-k8shim/pkg/shim/scheduler_test.go:61
 +0x89
  testing.tRunner()
      
/home/travis/.gimme/versions/go1.15.linux.amd64/src/testing/testing.go:1108 
+0x202
==================
==================
WARNING: DATA RACE
Write at 0x00c004f834d8 by goroutine 57:
  
github.com/apache/incubator-yunikorn-core/pkg/common/resources.(*Resource).AddTo()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/common/resources/resources.go:159
 +0x1ed
  
github.com/apache/incubator-yunikorn-core/pkg/scheduler/objects.(*Application).AddAllocationAsk()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/scheduler/objects/application.go:348
 +0x3d1
  
github.com/apache/incubator-yunikorn-core/pkg/scheduler.(*ClusterContext).processAsks()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/scheduler/context.go:658
 +0x1fc
  
github.com/apache/incubator-yunikorn-core/pkg/scheduler.(*ClusterContext).processAllocations()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/scheduler/context.go:614
 +0x204
  
github.com/apache/incubator-yunikorn-core/pkg/scheduler.(*ClusterContext).processRMUpdateEvent()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/scheduler/context.go:229
 +0x76
  
github.com/apache/incubator-yunikorn-core/pkg/scheduler.(*Scheduler).handleRMEvent()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/scheduler/scheduler.go:112
 +0x3f8
Previous read at 0x00c004f834d8 by goroutine 59:
  
github.com/apache/incubator-yunikorn-core/pkg/common/resources.StrictlyGreaterThanZero()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/common/resources/resources.go:732
 +0xf7
  
github.com/apache/incubator-yunikorn-core/pkg/scheduler/objects.filterOnPendingResources()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/scheduler/objects/sorters.go:84
 +0x168
  
github.com/apache/incubator-yunikorn-core/pkg/scheduler/objects.sortApplications()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/scheduler/objects/sorters.go:60
 +0x2a4
  
github.com/apache/incubator-yunikorn-core/pkg/scheduler/objects.(*Queue).sortApplications()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/scheduler/objects/queue.go:747
 +0xa7
  
github.com/apache/incubator-yunikorn-core/pkg/scheduler/objects.(*Queue).TryAllocate()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/scheduler/objects/queue.go:872
 +0x91
  
github.com/apache/incubator-yunikorn-core/pkg/scheduler/objects.(*Queue).TryAllocate()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/scheduler/objects/queue.go:885
 +0x671
  
github.com/apache/incubator-yunikorn-core/pkg/scheduler.(*PartitionContext).tryAllocate()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/scheduler/partition.go:685
 +0xba
  
github.com/apache/incubator-yunikorn-core/pkg/scheduler.(*ClusterContext).schedule()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/scheduler/context.go:118
 +0x8d2
  
github.com/apache/incubator-yunikorn-core/pkg/scheduler.(*Scheduler).internalSchedule()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/scheduler/scheduler.go:70
 +0x4b
Goroutine 57 (running) created at:
  
github.com/apache/incubator-yunikorn-core/pkg/scheduler.(*Scheduler).StartService()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/scheduler/scheduler.go:54
 +0xa4
  
github.com/apache/incubator-yunikorn-core/pkg/entrypoint.startAllServicesWithParameters()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/entrypoint/entrypoint.go:83
 +0x337
  github.com/apache/incubator-yunikorn-core/pkg/entrypoint.StartAllServices()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/entrypoint/entrypoint.go:42
 +0x77
  github.com/apache/incubator-yunikorn-k8shim/pkg/shim.(*MockScheduler).init()
      
/home/travis/gopath/src/github.com/apache/incubator-yunikorn-k8shim/pkg/shim/scheduler_mock_test.go:61
 +0xf6
  
github.com/apache/incubator-yunikorn-k8shim/pkg/shim.TestApplicationScheduling()
      
/home/travis/gopath/src/github.com/apache/incubator-yunikorn-k8shim/pkg/shim/scheduler_test.go:61
 +0x89
  testing.tRunner()
      
/home/travis/.gimme/versions/go1.15.linux.amd64/src/testing/testing.go:1108 
+0x202
Goroutine 59 (running) created at:
  
github.com/apache/incubator-yunikorn-core/pkg/scheduler.(*Scheduler).StartService()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/scheduler/scheduler.go:61
 +0x1d9
  
github.com/apache/incubator-yunikorn-core/pkg/entrypoint.startAllServicesWithParameters()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/entrypoint/entrypoint.go:83
 +0x337
  github.com/apache/incubator-yunikorn-core/pkg/entrypoint.StartAllServices()
      
/home/travis/gopath/pkg/mod/github.com/apache/[email protected]/pkg/entrypoint/entrypoint.go:42
 +0x77
  github.com/apache/incubator-yunikorn-k8shim/pkg/shim.(*MockScheduler).init()
      
/home/travis/gopath/src/github.com/apache/incubator-yunikorn-k8shim/pkg/shim/scheduler_mock_test.go:61
 +0xf6
  
github.com/apache/incubator-yunikorn-k8shim/pkg/shim.TestApplicationScheduling()
      
/home/travis/gopath/src/github.com/apache/incubator-yunikorn-k8shim/pkg/shim/scheduler_test.go:61
 +0x89
  testing.tRunner()
      
/home/travis/.gimme/versions/go1.15.linux.amd64/src/testing/testing.go:1108 
+0x202
==================
{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to