hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Lowe (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (YARN-6805) NPE in LinuxContainerExecutor due to null PrivilegedOperationException exit code
Date Wed, 12 Jul 2017 20:35:00 GMT

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

Jason Lowe updated YARN-6805:
    Attachment: YARN-6805.001.patch

Attaching a patch that removes the Integer support for an exit code and just always returns
an int. All the code calling getExitCode for PrivilegedOperationException and ContainerExecutionException
doesn't expect a null exit code, and ContainerExecutionException already has the precedent
of using -1 to indicate a lack of an exit code.

> NPE in LinuxContainerExecutor due to null PrivilegedOperationException exit code
> --------------------------------------------------------------------------------
>                 Key: YARN-6805
>                 URL: https://issues.apache.org/jira/browse/YARN-6805
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: nodemanager
>    Affects Versions: 2.8.1
>            Reporter: Jason Lowe
>         Attachments: YARN-6805.001.patch
> The LinuxContainerExecutor contains a number of code snippets like this:
> {code}
>     } catch (PrivilegedOperationException e) {
>       int exitCode = e.getExitCode();
> {code}
> PrivilegedOperationException#getExitCode can return null if the operation was interrupted,
so when the JVM does auto-unboxing on that last line it can NPE if there was no exit code.

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