The same thing happened to me since I updated jenkins from version 2.138.3 to 2.182. When launching a compilation using the windows command step and aborting the task jenkins crashes. I've fixed it by commenting the calls to the "killSoftly" method in "ProcessTree.java".
diff --git "a/core/src/main/java/hudson/util/ProcessTree.java" "b/core/src/main/java/hudson/util/ProcessTree.java"
index 4e2a4b3c14..98a8cf04ea 100644
— "a/core/src/main/java/hudson/util/ProcessTree.java"
+++ "b/core/src/main/java/hudson/util/ProcessTree.java"
@@ -26,7 +26,6 @@ package hudson.util;
import com.sun.jna.Memory;
import com.sun.jna.Native;
import com.sun.jna.NativeLong;
-import com.sun.jna.Pointer;
import com.sun.jna.LastErrorException;
import com.sun.jna.ptr.IntByReference;
import hudson.EnvVars;
@@ -520,7 +519,7 @@ public abstract class ProcessTree implements Iterable<OSProcess>, IProcessTree,
LOGGER.log(FINER, "Killing recursively {0}", getPid());
// Firstly try to kill the root process gracefully, then do a forcekill if it does not help (algorithm is described in JENKINS-17116)
- killSoftly();
+ // killSoftly();
p.killRecursively();
killByKiller();
}
@@ -533,7 +532,7 @@ public abstract class ProcessTree implements Iterable<OSProcess>, IProcessTree,
LOGGER.log(FINER, "Killing {0}", getPid());
// Firstly try to kill it gracefully, then do a forcekill if it does not help (algorithm is described in JENKINS-17116)
- killSoftly();
+ // killSoftly();
p.kill();
killByKiller();
}
@@ -1442,7 +1441,7 @@ public abstract class ProcessTree implements Iterable<OSProcess>, IProcessTree,
- Read the remainder of psinfo_t differently depending on whether the
- Java process is 32-bit or 64-bit.
*/
- if (Pointer.SIZE == 8) {
+ if (Native.POINTER_SIZE == 8) {
psinfo.seek(236); // offset of pr_argc
argc = adjust(psinfo.readInt());
argp = adjustL(psinfo.readLong());
I am having the exact same issue on version 2.150 . Any update on it?