You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-dev@hadoop.apache.org by "Roman Leventov (Jira)" <ji...@apache.org> on 2019/12/28 09:00:08 UTC

[jira] [Created] (YARN-10064) Potential race conditions in AuxServices

Roman Leventov created YARN-10064:
-------------------------------------

             Summary: Potential race conditions in AuxServices
                 Key: YARN-10064
                 URL: https://issues.apache.org/jira/browse/YARN-10064
             Project: Hadoop YARN
          Issue Type: Bug
            Reporter: Roman Leventov


There are three places in {{AuxServices}} class that may potentially cause race conditions: {{getServices()}}, {{getServiceRecords()}}, {{handle(AuxServicesEvent event)}}. In the first two methods, synchronized collections are returned from the API. If they are iterated concurrently with the underlying collections being updated inside {{AuxServices}}, non-deterministic behavior may follow.

In {{handle(AuxServicesEvent event)}}, {{serviceMap.values()}} is actually iterated outside of a critical section on {{serviceMap}} object, though it's unclear from the class itself whether handle() may be called concurrently with the methods on {{AuxServices}} that modify {{serviceMap}} or not. So if this not a bug, adding a comment explaining this would be helpful.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-dev-help@hadoop.apache.org