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

Docker stop should allow 143 as a valid exit code

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I had randomly occurring docker steps failing in my Jenkins pipeline jobs.

      I instrumented the error messages to show the error code, stdout & stderr when the error is triggered.

      I got the following on termination of the job:

      Failed to kill container '48118b1b0a9c91345aa06c2b12a0680c13093a2a7b850e6d7fe7cd314409305c'. Error 143: '',''

       

      On further research, "docker stop" sends a SIGTERM to the child processes, which may result in the docker image terminating with an exit code of 143 (SIGTERM). Some discussion here:

      https://github.com/docker-library/tomcat/issues/57

      https://github.com/neo4j/docker-neo4j/issues/30

       

      I think that 143 should be allowed as a valid exit code.

       

       

      Here is the relevant snippet invoking docker:

      docker.image(dockerContainer).inside {
      checkout scm
      sh "cd linux && ARCH=powerpc make pseries_le_defconfig"
      sh "cd linux && ARCH=powerpc make olddefconfig"
      sh "cd linux && ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- make prepare"
      sh "cd linux && ARCH=powerpc make headers_install"
      sh "cppcheck --quiet --enable=all --xml-version=2 --std=c11 -j\$(nproc) $args \
      -I linux/include -I linux/arch/powerpc/include -I linux/arch/powerpc/include/uapi \
      -I linux/include/uapi -I linux/arch/powerpc/include/generated \
      -D_KERNEL_ -U_ASSEMBLY_ \
      $dir 2> $reportFile"

      archiveArtifacts fingerprint: true, artifacts: reportFile

      stash includes: reportFile, name: reportFile
      cppcheckReports.push(reportFile)
      }

        Attachments

          Activity

          Show
          evildeece Alastair D'Silva added a comment - Proposed fix here: https://github.com/jenkinsci/docker-workflow-plugin/pull/93
          Hide
          evildeece Alastair D'Silva added a comment -

          Also occurs on 'docker rm':

          Failed to rm container '901901a26a44bf0fc0d8f324cf94703548ba82d9708cdf31eb6ae923b64ede33'. Error 143: '',''

          Show
          evildeece Alastair D'Silva added a comment - Also occurs on 'docker rm': Failed to rm container '901901a26a44bf0fc0d8f324cf94703548ba82d9708cdf31eb6ae923b64ede33'. Error 143: '',''

            People

            Assignee:
            evildeece Alastair D'Silva
            Reporter:
            evildeece Alastair D'Silva
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: