You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@yunikorn.apache.org by "Kinga Marton (Jira)" <ji...@apache.org> on 2020/05/21 13:14:00 UTC

[jira] [Commented] (YUNIKORN-155) data race in unit test: TestSchedulerRecoveryWhenPlacementRulesApplied

    [ https://issues.apache.org/jira/browse/YUNIKORN-155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17113179#comment-17113179 ] 

Kinga Marton commented on YUNIKORN-155:
---------------------------------------

I wasn't able to reproduce this issue. I tried to run it multiple times, added some sleep to make the go routines slower, but the test passed each time and were no any race condition reported.

From debugging the test case and the attached stack trace I can see the following things:
 * one goroutine (Goroutine 137) starts when starting the event handlers in scheduler.go: [https://github.com/apache/incubator-yunikorn-core/blob/master/pkg/scheduler/scheduler.go#L67]
 * the another one (Goroutine 135) is starting when we are starting event handlers is cluster-info.go: [https://github.com/apache/incubator-yunikorn-core/blob/master/pkg/cache/cluster_info.go#L69]

There is one write and one read operation performed on the same ApplicationInfo object:
 *  the write operation is while placing an application and set some fields on the ApplicationInfo. This is protected with a lock(Goroutine 137): [https://github.com/apache/incubator-yunikorn-core/blob/master/pkg/scheduler/placement/placement.go#L200]
 * the write operation is during logging in case of a SchedulerApplicationsUpdateEvent: [https://github.com/apache/incubator-yunikorn-core/blob/master/pkg/scheduler/scheduler.go#L176]

> data race in unit test: TestSchedulerRecoveryWhenPlacementRulesApplied
> ----------------------------------------------------------------------
>
>                 Key: YUNIKORN-155
>                 URL: https://issues.apache.org/jira/browse/YUNIKORN-155
>             Project: Apache YuniKorn
>          Issue Type: Test
>          Components: test - unit
>            Reporter: Wilfred Spiegelenburg
>            Assignee: Kinga Marton
>            Priority: Major
>         Attachments: data_race.txt
>
>
> Testing shows a new data race while logging the queue name for an application that gets added.
> Details in the attached logs



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

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