You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Xiaobing Zhou (JIRA)" <ji...@apache.org> on 2014/10/03 20:19:34 UTC

[jira] [Commented] (HIVE-8340) HiveServer2 service doesn't stop backend jvm process, which prevents follow-up service start.

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

Xiaobing Zhou commented on HIVE-8340:
-------------------------------------

Here are comments years ago to explain why the grand-children process is not killed(http://bugs.java.com/bugdatabase/view_bug.do?bug_id=4770092), but I guess there should be some fixes, I will dig more.
The following excellent SDN comment explains what's going on:
---------------------------------------------------------------------
The fundamental problem here is that, unlike Unix, Windows does that
maintain parent-child relationships between processes. A process can
kill its own immediate children, but unless you make other
arrangements to obtain the information, can't kill any
'grand-children' because it has no way of finding them. Ctrl-C types
at a command prompt is just a character that the command processor
interprets and not a signal sent from outside. When you 'destroy' a
child command script, that process does not get the opportunity to
terminate any child processes it may know about.
Recent versions of WIndows (2000 or later) do provide a "Job" concept
which acts as a container for processes. Killing a Job does terminate
all processes associated with that job. However Jobs do not contain
other jobs, so fully emulating the Unix behaviour is probably
impossible.
---------------------------------------------------------------------
Note that Unix emulation environments on Windows, like Cygwin,
suffer from the same problem. Any fix would be difficult.
Even if we could figure out how to fix this, we might choose not to do so
for the usual reason – compatibility.
2005-09-27

> HiveServer2 service doesn't stop backend jvm process, which prevents follow-up service start.
> ---------------------------------------------------------------------------------------------
>
>                 Key: HIVE-8340
>                 URL: https://issues.apache.org/jira/browse/HIVE-8340
>             Project: Hive
>          Issue Type: Bug
>          Components: HiveServer2
>    Affects Versions: 0.14.0
>         Environment: Windows
>            Reporter: Xiaobing Zhou
>            Assignee: Xiaobing Zhou
>
> On stopping the HS2 service from the services tab, it only kills the root process and does not kill the child java process. As a result resources are not freed and this throws an error on restarting from command line.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)