[
https://issues.apache.org/jira/browse/MAPREDUCE-762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12731823#action_12731823
]
Hemanth Yamijala commented on MAPREDUCE-762:
--------------------------------------------
bq. Child jvm, before exiting, should try and cleanup/kill all its sub-processes
I am not sure about this. So, this will be done like in the finally block of
the Child by sending a kill -pid to itself ?
bq. Once a jvm is spawned, its session id should be persisted to task-tracker's
private folder (TaskTracker.SUBDIR/pid with 700 permission?)
What's the structure under TaskTracker.SUBDIR/pid ? I suppose the right
solution is to use jvm-id.pid. Another solution could be
taskAttemptId.[cleanup].pid. If we use taskAttemptId, we should take care of
JVM Reuse. If we use jvm-id.pid, when a task is being killed, we can lookup the
jvm-id for the task and then pick up the right pid file. Would this work ?
Permissions for each of the files should be 600 owned by tasktracker.
bq. Once the jvm exits, this pid file should be deleted
+1. Should be done by the TT.
bq. Upon restart, the pid files in the private folder should be cleaned up
(under appropriate owner permissions)
This should be done after sending the kill signal to the files in the folder -
because they are all potentially running tasks - the reason of this bug.
bq. pid files should have sufficient information to reconstruct jvm-context
object which is required by LinuxTaskController to kill the process under user
permission.
We should just follow the path of TaskController.killTaskJVM - that will ensure
it will work for all task controllers. Setting permissions to 600 for the pid
files owned by TT should be fine.
> Task's process trees may not be killed if a TT is restarted
> -----------------------------------------------------------
>
> Key: MAPREDUCE-762
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-762
> Project: Hadoop Map/Reduce
> Issue Type: Bug
> Reporter: Hemanth Yamijala
>
> Some work has been done to make sure the tasktrackers kill process trees of
> tasks when they finish (either successfully, or with failures or when they
> are killed). Related JIRAs are HADOOP-2721, HADOOP-5488 and HADOOP-5420. But
> when TTs are restarted, we do not handle killing of process trees - though
> tasks will themselves die on re-establishing contact with the TT.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.