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

durable-task plugin v1.23 misbehaves on BusyBox agents

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: durable-task-plugin
    • Labels:
    • Environment:
      Jenkins:2.121.2-alpine running on Docker version 18.03.1-ce, build 9ee9f40
      durable-task-plugin:1.23
    • Similar Issues:
    • Released As:
      durable-task 1.24

      Description

      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
      

       

        Attachments

          Issue Links

            Activity

            Hide
            eirik 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.

            Show
            eirik 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 .
            Hide
            dnusbaum Devin Nusbaum added a comment - - edited

            Dan Newman What OS/Shell are your build agents running?

            Raphael Pionke Dan Newman Can you post the full logs of a build of a trivial Pipeline like the following?

            node {
               sh ('''echo "Testing JENKINS-52847" && sleep 60''')
            }
            
            Show
            dnusbaum Devin Nusbaum added a comment - - edited Dan Newman What OS/Shell are your build agents running? Raphael Pionke Dan Newman Can you post the full logs of a build of a trivial Pipeline like the following? node { sh ('''echo "Testing JENKINS-52847" && sleep 60''') }
            Hide
            rpionke 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
            Show
            rpionke 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
            Hide
            jglick Jesse Glick added a comment -

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

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

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

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

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: