Eric Badger updated HADOOP-13709:
    Attachment: HADOOP-13709.007.patch

Thanks for the comments, [~jlowe]!

The synchronized map needs to be locked explicitly when iterated otherwise we 
have concurrency issues if some other thread tries to update this map while 
we're walking it during the shutdown hook processing.
Good catch, I put this back in in the latest patch.

The unit test is racy because it assumes a 250ms sleep is enough to get the 
sleep processes started. It would be better to poll for getProcess() being 
non-null for the two executors. GenericTestUtils.waitFor would be useful here 
and can also replace the manually-coded poll loop.
Changed all waits to use GenericTestUtils.waitFor in the latest patch.

> Clean up subprocesses spawned by Shell.java:runCommand when the shell process 
> exits
> -----------------------------------------------------------------------------------
>                 Key: HADOOP-13709
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13709
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 2.2.0
>            Reporter: Eric Badger
>            Assignee: Eric Badger
>         Attachments: HADOOP-13709.001.patch, HADOOP-13709.002.patch, 
> HADOOP-13709.003.patch, HADOOP-13709.004.patch, HADOOP-13709.005.patch, 
> HADOOP-13709.006.patch, HADOOP-13709.007.patch
> The runCommand code in Shell.java can get into a situation where it will 
> ignore InterruptedExceptions and refuse to shutdown due to being in I/O 
> waiting for the return value of the subprocess that was spawned. We need to 
> allow for the subprocess to be interrupted and killed when the shell process 
> gets killed. Currently the JVM will shutdown and all of the subprocesses will 
> be orphaned and not killed.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to