hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Kanter (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (YARN-7458) TestContainerManagerSecurity is still flakey
Date Wed, 08 Nov 2017 01:08:01 GMT

     [ https://issues.apache.org/jira/browse/YARN-7458?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Robert Kanter updated YARN-7458:
    Attachment: YARN-7458.001.patch

There's a few problems here:
# This will never fail.  It checks that the {{containsKey}} method never returns {{null}},
but it returns a {{boolean}}.  It probably should have been {{assertTrue}}.
# Ignoring the above issue, this code has a race condition:
// Get the container first, as it may be removed from the Context
// by asynchronous calls.
// This was leading to a flakey test as otherwise the container could
// be removed and end up null.
Container waitContainer = nmContext.getContainers().get(containerId);
The container could be removed between the two statements, resulting in {{waitContainer}}
being {{null}}.  This is what is causing the NPE we're seeing.

This method is simply trying to wait for the container to finish.  If it's already finished,
then we don't need to do the waiting part, so I think the fix here is to simply try to get
the container, and if we do, then do the wait loop.  If we don't, then no need to bother.

> TestContainerManagerSecurity is still flakey
> --------------------------------------------
>                 Key: YARN-7458
>                 URL: https://issues.apache.org/jira/browse/YARN-7458
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: test
>    Affects Versions: 2.9.0, 3.0.0-beta1
>            Reporter: Robert Kanter
>            Assignee: Robert Kanter
>         Attachments: YARN-7458.001.patch
> YARN-6150 made this less flakey, but we're still seeing an occasional issue here:
> {noformat}
> java.lang.NullPointerException
> 	at org.apache.hadoop.yarn.server.TestContainerManagerSecurity.waitForContainerToFinishOnNM(TestContainerManagerSecurity.java:420)
> 	at org.apache.hadoop.yarn.server.TestContainerManagerSecurity.testNMTokens(TestContainerManagerSecurity.java:356)
> 	at org.apache.hadoop.yarn.server.TestContainerManagerSecurity.testContainerManager(TestContainerManagerSecurity.java:167)
> {noformat}

This message was sent by Atlassian JIRA

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

View raw message