Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-34119

Shell process killed (OOM), but pipeline continues anyway

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • durable-task-plugin
    • 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).

          [JENKINS-34119] Shell process killed (OOM), but pipeline continues anyway

          Jesse Glick added a comment -

          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.

          Jesse Glick added a comment - 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.

            jglick Jesse Glick
            magnayn magnayn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: