[ 
https://issues.apache.org/jira/browse/HADOOP-5198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12674139#action_12674139
 ] 

Amareshwari Sriramadasu commented on HADOOP-5198:
-------------------------------------------------

bq. Can pid become null between where you check for it and where you call 
ProcessTree.destroy(...)?
No. pid cannnot become null. Once obtained from the file, it is stored in a 
String and passed to the kill-process.

bq. Can you write a unit test? If not, can you describe the steps of the manual 
testing you did to ensure this patch works?
This is almost all the time reproducible by running MRReliability test on 
single-node cluster and occasional failures on cluster. I didnt see any failure 
after the patch.

> NPE in Shell.runCommand()
> -------------------------
>
>                 Key: HADOOP-5198
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5198
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: mapred, util
>    Affects Versions: 0.21.0
>            Reporter: Amareshwari Sriramadasu
>            Assignee: Amareshwari Sriramadasu
>             Fix For: 0.21.0
>
>         Attachments: patch-5198.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> I have seen one of the task failures with following exception:
> java.lang.NullPointerException
>       at java.lang.ProcessBuilder.start(ProcessBuilder.java:441)
>       at org.apache.hadoop.util.Shell.runCommand(Shell.java:149)
>       at org.apache.hadoop.util.Shell.run(Shell.java:134)
>       at 
> org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:286)
>       at org.apache.hadoop.util.ProcessTree.isAlive(ProcessTree.java:244)
>       at 
> org.apache.hadoop.util.ProcessTree.sigKillInCurrentThread(ProcessTree.java:67)
>       at org.apache.hadoop.util.ProcessTree.sigKill(ProcessTree.java:115)
>       at 
> org.apache.hadoop.util.ProcessTree.destroyProcessGroup(ProcessTree.java:164)
>       at org.apache.hadoop.util.ProcessTree.destroy(ProcessTree.java:180)
>       at 
> org.apache.hadoop.mapred.JvmManager$JvmManagerForType$JvmRunner.kill(JvmManager.java:377)
>       at 
> org.apache.hadoop.mapred.JvmManager$JvmManagerForType.reapJvm(JvmManager.java:249)
>       at 
> org.apache.hadoop.mapred.JvmManager$JvmManagerForType.access$000(JvmManager.java:113)
>       at org.apache.hadoop.mapred.JvmManager.launchJvm(JvmManager.java:76)
>       at org.apache.hadoop.mapred.TaskRunner.run(TaskRunner.java:411)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to