[
https://issues.apache.org/jira/browse/HADOOP-15527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16509044#comment-16509044
]
Eric Yang commented on HADOOP-15527:
------------------------------------
In JDK 8, there is a new feature to control OS processes, notably
destroyForcibly method. However, this tooling is somewhat OS dependent. It is
best effort to terminate child processes. This could leave dangling child
processes around until the child processes are notified of parent process is
shutting down. When kill -9 is executed, ps -p output may still contain the
list of child threads and this is mistaken for parent process is still alive.
Java 9 has another set of improvement around this area, which has a blog
written for [process
handling|https://javax0.wordpress.com/2017/07/19/process-handling-in-java-9/].
That might improve the child process handling. For Hadoop shell script
improvement, we probably want to make sure that child thread is not listed for
ps -p or use -f /proc/[pid] to identify the liveness of the process, and
implement a loop for the check to ensure the process is gone before script exit.
> Sometimes daemons keep running even after "kill -9" from daemon-stop script
> ---------------------------------------------------------------------------
>
> Key: HADOOP-15527
> URL: https://issues.apache.org/jira/browse/HADOOP-15527
> Project: Hadoop Common
> Issue Type: Bug
> Reporter: Vinod Kumar Vavilapalli
> Assignee: Vinod Kumar Vavilapalli
> Priority: Major
>
> I'm seeing that sometimes daemons keep running for a little while even after
> "kill -9" from daemon-stop scripts.
> Debugging more, I see several instances of "ERROR: Unable to kill ${pid}".
> Saw this specifically with ResourceManager & NodeManager - {{yarn --daemon
> stop nodemanager}}. Though it is possible that other daemons may run into
> this too.
> Saw this on both Centos as well as Ubuntu.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]