private void killTask(TaskAttemptID tid, String msg, boolean wasFailure) {
// Kill the task and mark it as killed.
taskTracker.cleanUpOverMemoryTask(tid, wasFailure, msg);
// Now destroy the ProcessTree, remove it from monitoring map.
ProcessTreeInfo ptInfo = processTreeInfoMap.get(tid);
ProcfsBasedProcessTree pTree = ptInfo.getProcessTree();
try {
LinuxSystemCall.killProcessGroup(Integer.parseInt(ptInfo.getPID()));
} catch (java.io.IOException e) {
LOG.error("Could not kill process group " + ptInfo.getPID(), e);
}