hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Bacsko (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (YARN-9595) FPGA plugin: NullPointerException in FpgaNodeResourceUpdateHandler.updateConfiguredResource()
Date Mon, 03 Jun 2019 14:47:00 GMT

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

Peter Bacsko updated YARN-9595:
-------------------------------
    Description: 
YARN-9264 accidentally introduced a bug in FpgaDiscoverer. Sometimes {{currentFpgaInfo}} is
not set, resulting in an NPE being thrown:

{noformat}
2019-06-03 05:14:50,157 INFO org.apache.hadoop.service.AbstractService: Service NodeManager
failed in state INITED; cause: java.lang.NullPointerException
java.lang.NullPointerException
        at org.apache.hadoop.yarn.server.nodemanager.containermanager.resourceplugin.fpga.FpgaNodeResourceUpdateHandler.updateConfiguredResource(FpgaNodeResourceUpdateHandler.java:54)
        at org.apache.hadoop.yarn.server.nodemanager.NodeStatusUpdaterImpl.updateConfiguredResourcesViaPlugins(NodeStatusUpdaterImpl.java:358)
        at org.apache.hadoop.yarn.server.nodemanager.NodeStatusUpdaterImpl.serviceInit(NodeStatusUpdaterImpl.java:190)
        at org.apache.hadoop.service.AbstractService.init(AbstractService.java:164)
        at org.apache.hadoop.service.CompositeService.serviceInit(CompositeService.java:108)
        at org.apache.hadoop.yarn.server.nodemanager.NodeManager.serviceInit(NodeManager.java:459)
        at org.apache.hadoop.service.AbstractService.init(AbstractService.java:164)
        at org.apache.hadoop.yarn.server.nodemanager.NodeManager.initAndStartNodeManager(NodeManager.java:869)
        at org.apache.hadoop.yarn.server.nodemanager.NodeManager.main(NodeManager.java:942)
{noformat}

The problem is that in {{FpgaDiscoverer}}, we don't set {{currentFpgaInfo}} if the following
condition is true:

{noformat}
if (allowed == null || allowed.equalsIgnoreCase(
        YarnConfiguration.AUTOMATICALLY_DISCOVER_GPU_DEVICES)) {
      return list;
    } else if (allowed.matches("(\\d,)*\\d")){
    ...
{noformat}

Solution is simple: initialize it in both code-paths.

Unit tests should be enhanced to verify that it's set properly.

  was:
YARN-9264 accidentally introduced a bug in FpgaDiscoverer. Sometimes {{currentFpgaInfo}} is
not set, resulting in an NPE being thrown:

{noformat}
2019-06-03 05:14:50,157 INFO org.apache.hadoop.service.AbstractService: Service NodeManager
failed in state INITED; cause: java.lang.NullPointerException
java.lang.NullPointerException
        at org.apache.hadoop.yarn.server.nodemanager.containermanager.resourceplugin.fpga.FpgaNodeResourceUpdateHandler.updateConfiguredResource(FpgaNodeResourceUpdateHandler.java:54)
        at org.apache.hadoop.yarn.server.nodemanager.NodeStatusUpdaterImpl.updateConfiguredResourcesViaPlugins(NodeStatusUpdaterImpl.java:358)
        at org.apache.hadoop.yarn.server.nodemanager.NodeStatusUpdaterImpl.serviceInit(NodeStatusUpdaterImpl.java:190)
        at org.apache.hadoop.service.AbstractService.init(AbstractService.java:164)
        at org.apache.hadoop.service.CompositeService.serviceInit(CompositeService.java:108)
        at org.apache.hadoop.yarn.server.nodemanager.NodeManager.serviceInit(NodeManager.java:459)
        at org.apache.hadoop.service.AbstractService.init(AbstractService.java:164)
        at org.apache.hadoop.yarn.server.nodemanager.NodeManager.initAndStartNodeManager(NodeManager.java:869)
        at org.apache.hadoop.yarn.server.nodemanager.NodeManager.main(NodeManager.java:942)
{noformat}

The problem is that in {{FpgaDiscoverer}}, we don't set {{currentFpgaInfo}} if the following
condition is true:

{noformat}
if (allowed == null || allowed.equalsIgnoreCase(
        YarnConfiguration.AUTOMATICALLY_DISCOVER_GPU_DEVICES)) {
      return list;
    } else if (allowed.matches("(\\d,)*\\d")){
    ...
{noformat}

Solution is simple, it should always be initialized, just like before.

Unit tests should be enhanced to verify that it's set properly.


> FPGA plugin: NullPointerException in FpgaNodeResourceUpdateHandler.updateConfiguredResource()
> ---------------------------------------------------------------------------------------------
>
>                 Key: YARN-9595
>                 URL: https://issues.apache.org/jira/browse/YARN-9595
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: nodemanager
>            Reporter: Peter Bacsko
>            Assignee: Peter Bacsko
>            Priority: Major
>
> YARN-9264 accidentally introduced a bug in FpgaDiscoverer. Sometimes {{currentFpgaInfo}}
is not set, resulting in an NPE being thrown:
> {noformat}
> 2019-06-03 05:14:50,157 INFO org.apache.hadoop.service.AbstractService: Service NodeManager
failed in state INITED; cause: java.lang.NullPointerException
> java.lang.NullPointerException
>         at org.apache.hadoop.yarn.server.nodemanager.containermanager.resourceplugin.fpga.FpgaNodeResourceUpdateHandler.updateConfiguredResource(FpgaNodeResourceUpdateHandler.java:54)
>         at org.apache.hadoop.yarn.server.nodemanager.NodeStatusUpdaterImpl.updateConfiguredResourcesViaPlugins(NodeStatusUpdaterImpl.java:358)
>         at org.apache.hadoop.yarn.server.nodemanager.NodeStatusUpdaterImpl.serviceInit(NodeStatusUpdaterImpl.java:190)
>         at org.apache.hadoop.service.AbstractService.init(AbstractService.java:164)
>         at org.apache.hadoop.service.CompositeService.serviceInit(CompositeService.java:108)
>         at org.apache.hadoop.yarn.server.nodemanager.NodeManager.serviceInit(NodeManager.java:459)
>         at org.apache.hadoop.service.AbstractService.init(AbstractService.java:164)
>         at org.apache.hadoop.yarn.server.nodemanager.NodeManager.initAndStartNodeManager(NodeManager.java:869)
>         at org.apache.hadoop.yarn.server.nodemanager.NodeManager.main(NodeManager.java:942)
> {noformat}
> The problem is that in {{FpgaDiscoverer}}, we don't set {{currentFpgaInfo}} if the following
condition is true:
> {noformat}
> if (allowed == null || allowed.equalsIgnoreCase(
>         YarnConfiguration.AUTOMATICALLY_DISCOVER_GPU_DEVICES)) {
>       return list;
>     } else if (allowed.matches("(\\d,)*\\d")){
>     ...
> {noformat}
> Solution is simple: initialize it in both code-paths.
> Unit tests should be enhanced to verify that it's set properly.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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


Mime
View raw message