You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-issues@hadoop.apache.org by "Bikas Saha (JIRA)" <ji...@apache.org> on 2012/08/17 01:23:38 UTC

[jira] [Created] (MAPREDUCE-4564) Shell timeout mechanism does not work for processes spawned using winutils

Bikas Saha created MAPREDUCE-4564:
-------------------------------------

             Summary: Shell timeout mechanism does not work for processes spawned using winutils
                 Key: MAPREDUCE-4564
                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4564
             Project: Hadoop Map/Reduce
          Issue Type: Bug
            Reporter: Bikas Saha
            Assignee: Bikas Saha


Upon timeout, Shell calls Java process.destroy() to terminate the spawned process. This would destroy the winutils process but not the real process spawned by winutils.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (MAPREDUCE-4564) Shell timeout mechanism does not work for processes spawned using winutils

Posted by "Bikas Saha (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAPREDUCE-4564?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bikas Saha updated MAPREDUCE-4564:
----------------------------------

    Attachment: MAPREDUCE-4564.branch-1-win.1.patch
    
> Shell timeout mechanism does not work for processes spawned using winutils
> --------------------------------------------------------------------------
>
>                 Key: MAPREDUCE-4564
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4564
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>            Reporter: Bikas Saha
>            Assignee: Bikas Saha
>         Attachments: MAPREDUCE-4564.branch-1-win.1.patch
>
>
> Upon timeout, Shell calls Java process.destroy() to terminate the spawned process. This would destroy the winutils process but not the real process spawned by winutils.

--
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

[jira] [Commented] (MAPREDUCE-4564) Shell timeout mechanism does not work for processes spawned using winutils

Posted by "Bikas Saha (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAPREDUCE-4564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13449343#comment-13449343 ] 

Bikas Saha commented on MAPREDUCE-4564:
---------------------------------------

Solution is to make sure that termination of wintutils also terminates the job object. This patch adds code to do that by making the job object handle not inheritable and setting the job object to be terminated when the last handle is closed. When winutils exist (cleanly or crashed or killed) its handle to the job object will be closed. Since that is the only handle, closing it will terminate the job object.
Currently, winutils calls TerminateJobObject() before it exits. This ensures that the job object is destroyed when winutils exits. So the patch is consistent with the current approach. It enhances that by making sure the job object is terminated even when winutils is killed externally.
                
> Shell timeout mechanism does not work for processes spawned using winutils
> --------------------------------------------------------------------------
>
>                 Key: MAPREDUCE-4564
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4564
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>            Reporter: Bikas Saha
>            Assignee: Bikas Saha
>         Attachments: MAPREDUCE-4564.branch-1-win.1.patch
>
>
> Upon timeout, Shell calls Java process.destroy() to terminate the spawned process. This would destroy the winutils process but not the real process spawned by winutils.

--
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

[jira] [Resolved] (MAPREDUCE-4564) Shell timeout mechanism does not work for processes spawned using winutils

Posted by "Arun C Murthy (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAPREDUCE-4564?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Arun C Murthy resolved MAPREDUCE-4564.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: 1-win

I just committed this. Thanks Bikas (and Chuan for the review).
                
> Shell timeout mechanism does not work for processes spawned using winutils
> --------------------------------------------------------------------------
>
>                 Key: MAPREDUCE-4564
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4564
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>            Reporter: Bikas Saha
>            Assignee: Bikas Saha
>             Fix For: 1-win
>
>         Attachments: MAPREDUCE-4564.branch-1-win.1.patch, MAPREDUCE-4564.branch-1-win.2.patch
>
>
> Upon timeout, Shell calls Java process.destroy() to terminate the spawned process. This would destroy the winutils process but not the real process spawned by winutils.

--
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

[jira] [Updated] (MAPREDUCE-4564) Shell timeout mechanism does not work for processes spawned using winutils

Posted by "Bikas Saha (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAPREDUCE-4564?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bikas Saha updated MAPREDUCE-4564:
----------------------------------

    Attachment: MAPREDUCE-4564.branch-1-win.2.patch

Fixing the blank. Thanks for the review!
                
> Shell timeout mechanism does not work for processes spawned using winutils
> --------------------------------------------------------------------------
>
>                 Key: MAPREDUCE-4564
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4564
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>            Reporter: Bikas Saha
>            Assignee: Bikas Saha
>         Attachments: MAPREDUCE-4564.branch-1-win.1.patch, MAPREDUCE-4564.branch-1-win.2.patch
>
>
> Upon timeout, Shell calls Java process.destroy() to terminate the spawned process. This would destroy the winutils process but not the real process spawned by winutils.

--
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

[jira] [Commented] (MAPREDUCE-4564) Shell timeout mechanism does not work for processes spawned using winutils

Posted by "Chuan Liu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAPREDUCE-4564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13449352#comment-13449352 ] 

Chuan Liu commented on MAPREDUCE-4564:
--------------------------------------

+1

It seems space is missing after echo in the following line.
{code}+    String timeOutScript = "sleep 60000\n echo\" I am fine\"";{code}
                
> Shell timeout mechanism does not work for processes spawned using winutils
> --------------------------------------------------------------------------
>
>                 Key: MAPREDUCE-4564
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4564
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>            Reporter: Bikas Saha
>            Assignee: Bikas Saha
>         Attachments: MAPREDUCE-4564.branch-1-win.1.patch
>
>
> Upon timeout, Shell calls Java process.destroy() to terminate the spawned process. This would destroy the winutils process but not the real process spawned by winutils.

--
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