hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chuan Liu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-894) NodeHealthScriptRunner timeout checking is inaccurate on Windows
Date Mon, 08 Jul 2013 20:51:48 GMT

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

Chuan Liu commented on YARN-894:
--------------------------------

I only saw this once. After I did a clean and rebuild, I could not repro this error in subsequent
runs.

It could be a timing issue. I think the test case had written to the same script when it failed
at {{TestNodeHealthService.java:154}}.
                
> NodeHealthScriptRunner timeout checking is inaccurate on Windows
> ----------------------------------------------------------------
>
>                 Key: YARN-894
>                 URL: https://issues.apache.org/jira/browse/YARN-894
>             Project: Hadoop YARN
>          Issue Type: Bug
>    Affects Versions: 3.0.0, 2.1.0-beta
>            Reporter: Chuan Liu
>            Assignee: Chuan Liu
>            Priority: Minor
>         Attachments: ReadProcessStdout.java, wait.cmd, wait.sh, YARN-894-trunk.patch
>
>
> In {{NodeHealthScriptRunner}} method, we will set HealthChecker status based on the Shell
execution results. Some status are based on the exception thrown during the Shell script execution.
> Currently, we will catch a non-ExitCodeException from ShellCommandExecutor, and if Shell
has the timeout status set at the same time, we will also set HealthChecker status to timeout.
> We have following execution sequence in Shell:
> 1) In main thread, schedule a delayed timer task that will kill the original process
upon timeout.
> 2) In main thread, open a buffered reader and feed in the process's standard input stream.
> 3) When timeout happens, the timer task will call {{Process#destroy()}}
>  to kill the main process.
> On Linux, when timeout happened and process killed, the buffered reader will thrown an
IOException with message: "Stream closed" in main thread.
> On Windows, we don't have the IOException. Only "-1" was returned from the reader that
indicates the buffer is finished. As a result, the timeout status is not set on Windows, and
{{TestNodeHealthService}} fails on Windows because of this.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message