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

durable-task plugin v1.23 misbehaves on BusyBox agents

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • durable-task-plugin
    • Jenkins:2.121.2-alpine running on Docker version 18.03.1-ce, build 9ee9f40
      durable-task-plugin:1.23
    • durable-task 1.24

      After upgrade of durable-task-plugin from 1.22 to 1.23 it no longer works on alpine based containers. Downgrading to 1.22 reverts to the expected behavior.

      I managed to trigger this on a fresh jenkins/jenkins:lts-alpine container with only recommended plugins installed and following pipeline:

      node {
       sh 'sleep 120; echo Hello World'
      }
      

      Expected result: Hello World is echoed after 120 second delay

      Actual result:

      Started by user test
      Running in Durability level: MAX_SURVIVABILITY
      [Pipeline] node
      Running on Jenkins in /var/jenkins_home/workspace/busybox
      [Pipeline] {
      [Pipeline] sh
      [busybox] Running shell script
      ps: unrecognized option: p
      BusyBox v1.28.4 (2018-05-30 10:45:57 UTC) multi-call binary.
      
      Usage: ps [-o COL1,COL2=HEADER]
      
      Show list of processes
      
       -o COL1,COL2=HEADER Select columns for display
      + sleep 120
      wrapper script does not seem to be touching the log file in /var/jenkins_home/workspace/busybox@tmp/durable-f130160e
      (JENKINS-48300: if on a laggy filesystem, consider -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.HEARTBEAT_CHECK_INTERVAL=300)
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      ERROR: script returned exit code -1
      Finished: FAILURE
      

       

          [JENKINS-52847] durable-task plugin v1.23 misbehaves on BusyBox agents

          John Forrest added a comment -

          Note JENKINS-52887 where use of bash shell on windows-based machines no longer works.

          John Forrest added a comment - Note JENKINS-52887 where use of bash shell on windows-based machines no longer works.

          Mads Opheim added a comment -

          We're having the same issue, albeit not using Alpine (afaik).

          The workaround of downgrading to 1.22 fixes the issue for us as well.

          Mads Opheim added a comment - We're having the same issue, albeit not using Alpine (afaik). The workaround of downgrading to 1.22 fixes the issue for us as well.

          Devin Nusbaum added a comment -

          This should be fixed in durable-task 1.24.

          Devin Nusbaum added a comment - This should be fixed in durable-task 1.24.

          dnusbaum We have installed version 1.24 but with no luck. We are still seeing the "wrapper script does not seem to be touching the log file" error message in all of our docker builds. We are using the openjdk:10-jre-slim image, which uses debian:sid-slim under the hood. 

          Raphael Pionke added a comment - dnusbaum We have installed version 1.24 but with no luck. We are still seeing the "wrapper script does not seem to be touching the log file" error message in all of our docker builds. We are using the openjdk:10-jre-slim image, which uses debian:sid-slim under the hood. 

          Dan Newman added a comment -

          dnusbaum Same here, been trying to fix this for a while now. Same problem as rpionke. Already upgraded to 1.24 an hour ago.

          Dan Newman added a comment - dnusbaum Same here, been trying to fix this for a while now. Same problem as rpionke . Already upgraded to 1.24 an hour ago.

          I have have problems with version 1.24 as well. Running on Windows with ps from Cygwin. The error message is however "ps: unknown option – o" (not p), so the relevant ticket might be https://issues.jenkins-ci.org/browse/JENKINS-52881.

          Eirik Marthinsen added a comment - I have have problems with version 1.24 as well. Running on Windows with ps from Cygwin. The error message is however "ps: unknown option – o" (not p), so the relevant ticket might be https://issues.jenkins-ci.org/browse/JENKINS-52881 .

          Devin Nusbaum added a comment - - edited

          newms87 What OS/Shell are your build agents running?

          rpionke newms87 Can you post the full logs of a build of a trivial Pipeline like the following?

          node {
             sh ('''echo "Testing JENKINS-52847" && sleep 60''')
          }
          

          Devin Nusbaum added a comment - - edited newms87 What OS/Shell are your build agents running? rpionke newms87 Can you post the full logs of a build of a trivial Pipeline like the following? node { sh ('''echo "Testing JENKINS-52847" && sleep 60''') }

          I get the following output:

          [Pipeline] node
          Running on xzy in /var/lib/jenkins/workspace/durable_task
          [Pipeline] {
          [Pipeline] sh
          [durable_task] Running shell script
          + docker inspect -f . jmeter_base:4.0
          .
          [Pipeline] withDockerContainer
          xyz does not seem to be running inside a container
          $ docker run -t -d -u 0:0 -w /var/lib/jenkins/workspace/durable_task -v /var/lib/jenkins/workspace/durable_task:/var/lib/jenkins/workspace/durable_task:rw,z -v /var/lib/jenkins/workspace/durable_task@tmp:/var/lib/jenkins/workspace/durable_task@tmp:rw,z -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** jmeter_base:4.0 cat
          $ docker top 6085440f18d4aa1439d00fc7b2cb55d7fef427ae3c751b32d4c0329f695c6d30 -eo pid,comm
          [Pipeline] {
          [Pipeline] sh
          [durable_task] Running shell script
          sh: 1: ps: not found
          + echo Testing JENKINS-52847
          Testing JENKINS-52847
          + sleep 60
          wrapper script does not seem to be touching the log file in /var/lib/jenkins/workspace/durable_task@tmp/durable-8db4dd29
          (JENKINS-48300: if on a laggy filesystem, consider -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.HEARTBEAT_CHECK_INTERVAL=300)
          [Pipeline] }
          $ docker stop --time=1 6085440f18d4aa1439d00fc7b2cb55d7fef427ae3c751b32d4c0329f695c6d30
          $ docker rm -f 6085440f18d4aa1439d00fc7b2cb55d7fef427ae3c751b32d4c0329f695c6d30
          [Pipeline] // withDockerContainer
          [Pipeline] }
          [Pipeline] // node
          [Pipeline] End of Pipeline
          ERROR: script returned exit code -1
          Finished: FAILURE

          Raphael Pionke added a comment - I get the following output: [Pipeline] node Running on xzy in /var/lib/jenkins/workspace/durable_task [Pipeline] { [Pipeline] sh [durable_task] Running shell script + docker inspect -f . jmeter_base:4.0 . [Pipeline] withDockerContainer xyz does not seem to be running inside a container $ docker run -t -d -u 0:0 -w /var/lib/jenkins/workspace/durable_task -v /var/lib/jenkins/workspace/durable_task:/var/lib/jenkins/workspace/durable_task:rw,z -v /var/lib/jenkins/workspace/durable_task@tmp:/var/lib/jenkins/workspace/durable_task@tmp:rw,z -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** jmeter_base:4.0 cat $ docker top 6085440f18d4aa1439d00fc7b2cb55d7fef427ae3c751b32d4c0329f695c6d30 -eo pid,comm [Pipeline] { [Pipeline] sh [durable_task] Running shell script sh: 1: ps: not found + echo Testing JENKINS-52847 Testing JENKINS-52847 + sleep 60 wrapper script does not seem to be touching the log file in /var/lib/jenkins/workspace/durable_task@tmp/durable-8db4dd29 (JENKINS-48300: if on a laggy filesystem, consider -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.HEARTBEAT_CHECK_INTERVAL=300) [Pipeline] } $ docker stop --time=1 6085440f18d4aa1439d00fc7b2cb55d7fef427ae3c751b32d4c0329f695c6d30 $ docker rm -f 6085440f18d4aa1439d00fc7b2cb55d7fef427ae3c751b32d4c0329f695c6d30 [Pipeline] // withDockerContainer [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline ERROR: script returned exit code -1 Finished: FAILURE

          Jesse Glick added a comment -

          AFAICT debian:sid-slim does not have ps at all. Anyway, best tracked in the open issue: JENKINS-52881.

          Jesse Glick added a comment - AFAICT debian:sid-slim does not have ps at all. Anyway, best tracked in the open issue: JENKINS-52881 .

          Raphael Pionke added a comment - - edited

          good point. using apt-get -y update && apt-get -y install procps in dockerfile helps as well.

          Raphael Pionke added a comment - - edited good point. using  apt-get -y update && apt-get -y install procps  in dockerfile helps as well.

            dnusbaum Devin Nusbaum
            didried Edgars Didrihsons
            Votes:
            7 Vote for this issue
            Watchers:
            17 Start watching this issue

              Created:
              Updated:
              Resolved: