-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
linux
I have a jenkins pipeline, that invokes mvn with a 'sh mvn ....' invocation.
Occasionally, the output shows the maven execution suddenly stop, and the pipeline continuing anyway (failing later because the maven part hadn't actually completed).
I haven't been able to confirm, but my strong suspicion is mvn has been killed by the linux OOM killer.
Digging in SO, when processes are killed in this way, the 'return code' alone isn't valid. (http://stackoverflow.com/questions/7180970/return-code-when-oom-killer-kills-a-process). I'm not sure the best way to figure this out, as of course bash is calling a script (mvn) which is in turn calling java (the actual maven process that'd be the one being killed).
Sounds more like a Linux bug than a problem with Jenkins. If the process is killed by the kernel but the kernel indicates an exit status of zero, what else are we supposed to do? Even if this plugin’s wrapper script were changed to a native program that asked about WIFSIGNALED etc. (reference), your very example would still not work, because neither the wrapped shell script nor bin/mvn are going to care about such subtleties.