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

Gera Shegalov commented on HADOOP-10622:
----------------------------------------

[~jlowe], thanks for fixing this. I think "being more persistent" is the 
correct behavior because we need to deal with spurious wake ups .

{code}
      boolean processExited = false;
      while (!processExited) {
        try {
          exitCode  = process.waitFor();
          processExited = true;
        } catch (InterruptedException ie) {
          // consider process.destroy() 
          if (LOG.isWarnEnabled()) {
            LOG.warn("Interrupted while waiting for process exit", ie);
          }
        }
      }
      while(errThread.isAlive()) {
        try {
          // make sure that the error thread exits
          errThread.join();
        } catch (InterruptedException ie) {
          if (LOG.isWarnEnabled()) {
            LOG.warn("Interrupted while reading the error stream", ie);
          }
        }
      }
{code}

> Shell.runCommand can deadlock
> -----------------------------
>
>                 Key: HADOOP-10622
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10622
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 2.3.0
>            Reporter: Jason Lowe
>            Assignee: Jason Lowe
>            Priority: Critical
>         Attachments: HADOOP-10622.patch
>
>
> Ran into a deadlock in Shell.runCommand.  Stacktrace details to follow.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to