2009年11月30日 18:13Hi,I am submitting a job to execute a ".bat" file. From the bat file I spawn a java process, which further spawns some processes via JNI and COM API calls. So as a result of this, the following processes are created:1) cmd.exe2) java.exe3) other processes as a result of JNI/COM API callesNow when I cancel the job, the cmd.exe and java.exe processes get killed, but the processes that were spawned as a result of JNI calls keep hanging in there indefinitely. Is there any way of handling this problem in the Windows cluster? Is there a way to tell the cluster manager to cancel a job and kill all the processes related to the process, even if they are not child processes? What is the mechanism used on the cluster nodes to cancel a job?Thanks,Prashant
Once a task gets canceled, the Windows Job spawned by the task will be stopped. All processes within this Windows Job will be killed. A process’s sub-processes always belongs to the same Windows Job (unless otherwise specified when creating the sub-process), hence will be killed as well. That’s why you saw the cmd and java were killed. However, the JNI and COM program were started by another service. So they were running out of the current Windows Job. In this case, they won’t be killed.
COM runs as a separate service and it is spawning up these extra processes. It is up-to the server to clean these up after the user process exits.
2009年12月3日 21:08Thanks for the response Rae!Is there any option to tell the cluster manager, that instead of killing a job forcefully, call another program (which a user specifies) which manages clean exit of a task?Regards,Prashant
This customization feature will be in V3, but not V2.
- 已标记为答案 Don PatteeModerator 2011年2月4日 22:22