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-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to