[ https://issues.apache.org/jira/browse/HADOOP-12313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14681611#comment-14681611 ]
Junping Du commented on HADOOP-12313: ------------------------------------- bq. The "proper way" would be to synchronize both start()/stop() (in particular if restart is an expectation). Would you like an updated patch implementing? I am not sure if restart is an expectation at the beginning. But theoretically, any services should be restartable. However, just double checked with other services, like: NodeManager, ResourceManager, etc., it seems like all these services are implemented as one time only service. So I am fine with keeping things like this to conform the same pattern with other services. I will file another separated JIRA to discuss restartable issue unless someone tells me a solid reason on this. Based on above comments, we don't need to handle start() after stop() case, so "if (shouldRun) { monitorThread.start(); }" is not necessary or not sufficient (at least we should log some warn messages). Either way should be fine to me. > Possible NPE in JvmPauseMonitor.stop() > -------------------------------------- > > Key: HADOOP-12313 > URL: https://issues.apache.org/jira/browse/HADOOP-12313 > Project: Hadoop Common > Issue Type: Bug > Reporter: Rohith Sharma K S > Assignee: Gabor Liptak > Attachments: YARN-4035.1.patch > > > It is observed that after YARN-4019 some tests are failing in > TestRMAdminService with null pointer exceptions in build [build failure > |https://builds.apache.org/job/PreCommit-YARN-Build/8792/artifact/patchprocess/testrun_hadoop-yarn-server-resourcemanager.txt] > {noformat} > unning org.apache.hadoop.yarn.server.resourcemanager.TestRMAdminService > Tests run: 19, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 11.541 sec > <<< FAILURE! - in > org.apache.hadoop.yarn.server.resourcemanager.TestRMAdminService > testModifyLabelsOnNodesWithDistributedConfigurationDisabled(org.apache.hadoop.yarn.server.resourcemanager.TestRMAdminService) > Time elapsed: 0.132 sec <<< ERROR! > java.lang.NullPointerException: null > at org.apache.hadoop.util.JvmPauseMonitor.stop(JvmPauseMonitor.java:86) > at > org.apache.hadoop.yarn.server.resourcemanager.ResourceManager$RMActiveServices.serviceStop(ResourceManager.java:601) > at > org.apache.hadoop.service.AbstractService.stop(AbstractService.java:221) > at > org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.stopActiveServices(ResourceManager.java:983) > at > org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.transitionToStandby(ResourceManager.java:1038) > at > org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.serviceStop(ResourceManager.java:1085) > at > org.apache.hadoop.service.AbstractService.stop(AbstractService.java:221) > at > org.apache.hadoop.service.AbstractService.close(AbstractService.java:250) > at > org.apache.hadoop.yarn.server.resourcemanager.TestRMAdminService.testModifyLabelsOnNodesWithDistributedConfigurationDisabled(TestRMAdminService.java:824) > testRemoveClusterNodeLabelsWithDistributedConfigurationEnabled(org.apache.hadoop.yarn.server.resourcemanager.TestRMAdminService) > Time elapsed: 0.121 sec <<< ERROR! > java.lang.NullPointerException: null > at org.apache.hadoop.util.JvmPauseMonitor.stop(JvmPauseMonitor.java:86) > at > org.apache.hadoop.yarn.server.resourcemanager.ResourceManager$RMActiveServices.serviceStop(ResourceManager.java:601) > at > org.apache.hadoop.service.AbstractService.stop(AbstractService.java:221) > at > org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.stopActiveServices(ResourceManager.java:983) > at > org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.transitionToStandby(ResourceManager.java:1038) > at > org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.serviceStop(ResourceManager.java:1085) > at > org.apache.hadoop.service.AbstractService.stop(AbstractService.java:221) > at > org.apache.hadoop.service.AbstractService.close(AbstractService.java:250) > at > org.apache.hadoop.yarn.server.resourcemanager.TestRMAdminService.testRemoveClusterNodeLabelsWithDistributedConfigurationEnabled(TestRMAdminService.java:867) > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)