Adam Antal created YUNIKORN-342:
-----------------------------------

             Summary: Data race in QueueInfo#addChildQueue
                 Key: YUNIKORN-342
                 URL: https://issues.apache.org/jira/browse/YUNIKORN-342
             Project: Apache YuniKorn
          Issue Type: Task
          Components: core - scheduler
            Reporter: Adam Antal


Found while developing YUNIKORN-332.
Details:
{noformat}
==================
WARNING: DATA RACE
Write at 0x00c0039ac4b0 by goroutine 41:
  
github.com/apache/incubator-yunikorn-core/pkg/cache.(*QueueInfo).addChildQueue()
      /Users/adamantal/git/yunikorn/yunikorn-core/pkg/cache/queue_info.go:229 
+0x469
  github.com/apache/incubator-yunikorn-core/pkg/cache.NewUnmanagedQueue()
      /Users/adamantal/git/yunikorn/yunikorn-core/pkg/cache/queue_info.go:115 
+0x2fc
  
github.com/apache/incubator-yunikorn-core/pkg/cache.(*PartitionInfo).CreateQueues()
      
/Users/adamantal/git/yunikorn/yunikorn-core/pkg/cache/partition_info.go:885 
+0x560
  
github.com/apache/incubator-yunikorn-core/pkg/scheduler/placement.(*AppPlacementManager).PlaceApplication()
      
/Users/adamantal/git/yunikorn/yunikorn-core/pkg/scheduler/placement/placement.go:171
 +0x103c
  
github.com/apache/incubator-yunikorn-core/pkg/scheduler.(*partitionSchedulingContext).addSchedulingApplication()
      
/Users/adamantal/git/yunikorn/yunikorn-core/pkg/scheduler/scheduling_partition.go:109
 +0xae8
2020-08-03T15:50:09.600+0200    DEBUG   scheduler/scheduler.go:230      
enqueued event  {"eventType": 
"*schedulerevent.SchedulerApplicationsUpdateEvent", "event": 
{"AddedApplications":[{"ApplicationID":"application-sleep-0002","Partition":"[mycluster]default","QueueName":"root.test","SubmissionTime":1596462609600378000}],"RemovedApplications":null},
 "currentQueueSize": 1}
  
github.com/apache/incubator-yunikorn-core/pkg/scheduler.(*ClusterSchedulingContext).addSchedulingApplication()
      
/Users/adamantal/git/yunikorn/yunikorn-core/pkg/scheduler/scheduling_context.go:114
 +0x1a8
  
github.com/apache/incubator-yunikorn-core/pkg/scheduler.(*Scheduler).addNewApplication()
      
/Users/adamantal/git/yunikorn/yunikorn-core/pkg/scheduler/scheduler.go:209 
+0x261
  
github.com/apache/incubator-yunikorn-core/pkg/scheduler.(*Scheduler).processApplicationUpdateEvent()
      
/Users/adamantal/git/yunikorn/yunikorn-core/pkg/scheduler/scheduler.go:447 
+0x9d7
  
github.com/apache/incubator-yunikorn-core/pkg/scheduler.(*Scheduler).handleSchedulerEvent()
      
/Users/adamantal/git/yunikorn/yunikorn-core/pkg/scheduler/scheduler.go:596 
+0x428

Previous read at 0x00c0039ac4b0 by goroutine 39:
  
github.com/apache/incubator-yunikorn-core/pkg/cache.(*PartitionInfo).getQueue()
      
/Users/adamantal/git/yunikorn/yunikorn-core/pkg/cache/partition_info.go:760 
+0x12d
  
github.com/apache/incubator-yunikorn-core/pkg/cache.(*PartitionInfo).addNewApplication()
      
/Users/adamantal/git/yunikorn/yunikorn-core/pkg/cache/partition_info.go:375 
+0xc81
  
github.com/apache/incubator-yunikorn-core/pkg/cache.(*ClusterInfo).processApplicationUpdateFromRMUpdate()
      /Users/adamantal/git/yunikorn/yunikorn-core/pkg/cache/cluster_info.go:216 
+0x6df
  
github.com/apache/incubator-yunikorn-core/pkg/cache.(*ClusterInfo).processRMUpdateEvent()
      /Users/adamantal/git/yunikorn/yunikorn-core/pkg/cache/cluster_info.go:444 
+0x5e
2020-08-03T15:50:09.601+0200    DEBUG   cache/partition_info.go:356     adding 
app to partition {"appID": "application-sleep-0003", "queue": "root.test", 
"partitionName": "[mycluster]default"}
  
github.com/apache/incubator-yunikorn-core/pkg/cache.(*ClusterInfo).handleRMEvents()
      /Users/adamantal/git/yunikorn/yunikorn-core/pkg/cache/cluster_info.go:99 
+0x366
  go.uber.org/zap/zapcore.(*CheckedEntry).Write()
      /Users/adamantal/go/pkg/mod/go.uber.org/[email protected]/zapcore/entry.go:216 
+0x1e7
  go.uber.org/zap.(*Logger).Debug()
      /Users/adamantal/go/pkg/mod/go.uber.org/[email protected]/logger.go:179 +0x95
  github.com/apache/incubator-yunikorn-core/pkg/scheduler.enqueueAndCheckFull()
      
/Users/adamantal/git/yunikorn/yunikorn-core/pkg/scheduler/scheduler.go:230 
+0x453
  
github.com/apache/incubator-yunikorn-core/pkg/scheduler.(*Scheduler).HandleEvent()
      
/Users/adamantal/git/yunikorn/yunikorn-core/pkg/scheduler/scheduler.go:242 +0x64
  
github.com/apache/incubator-yunikorn-core/pkg/cache.(*ClusterInfo).processRMRegistrationEvent()
      /Users/adamantal/git/yunikorn/yunikorn-core/pkg/cache/cluster_info.go:469 
+0x432
2020-08-03T15:50:09.601+0200    INFO    cache/partition_info.go:379     app 
added to partition  {"appID": "application-sleep-0003", "partitionName": 
"[mycluster]default"}
  
github.com/apache/incubator-yunikorn-core/pkg/cache.(*ClusterInfo).handleRMEvents()
      /Users/adamantal/git/yunikorn/yunikorn-core/pkg/cache/cluster_info.go:101 
+0x2f8

Goroutine 41 (running) created at:
  
github.com/apache/incubator-yunikorn-core/pkg/scheduler.(*Scheduler).StartService()
      /Users/adamantal/git/yunikorn/yunikorn-core/pkg/scheduler/scheduler.go:67 
+0x9d
  
github.com/apache/incubator-yunikorn-core/pkg/entrypoint.startAllServicesWithParameters()
      
/Users/adamantal/git/yunikorn/yunikorn-core/pkg/entrypoint/entrypoint.go:86 
+0x61a
  github.com/apache/incubator-yunikorn-core/pkg/entrypoint.StartAllServices()
      
/Users/adamantal/git/yunikorn/yunikorn-core/pkg/entrypoint/entrypoint.go:43 
+0x77
  main.main()
      /Users/adamantal/git/yunikorn/yunikorn-k8shim/pkg/shim/main.go:45 +0x48c

Goroutine 39 (running) created at:
  
github.com/apache/incubator-yunikorn-core/pkg/cache.(*ClusterInfo).StartService()
      /Users/adamantal/git/yunikorn/yunikorn-core/pkg/cache/cluster_info.go:69 
+0x96
  
github.com/apache/incubator-yunikorn-core/pkg/entrypoint.startAllServicesWithParameters()
      
/Users/adamantal/git/yunikorn/yunikorn-core/pkg/entrypoint/entrypoint.go:85 
+0x5a9
  github.com/apache/incubator-yunikorn-core/pkg/entrypoint.StartAllServices()
      
/Users/adamantal/git/yunikorn/yunikorn-core/pkg/entrypoint/entrypoint.go:43 
+0x77
  main.main()
      /Users/adamantal/git/yunikorn/yunikorn-k8shim/pkg/shim/main.go:45 +0x48c
==================
{noformat}



--
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