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

intermittent "terminated" messages using sh in Pipelines

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Labels:
      None
    • Environment:
    • Similar Issues:

      Description

      Testing Jenkins 2.138.2 LTS, Jenkins pipelines that use sh intermittently throw the following message in the console log …

       

      sh: line 1:  4449 Terminated              sleep 3

       

       … and sometimes this … 

       

      sh: line 1: 13136 Terminated              { while [ ( -d /proc/$pid -o ! -d /proc/$$ ) -a -d '/home/ec2-user/workspace/admin-smoke-test@tmp/durable-523481b0' -a ! -f '/home/ec2-user/workspace/admin-smoke-test@tmp/durable-523481b0/jenkins-result.txt' ]; do    touch '/home/ec2-user/workspace/admin-smoke-test@tmp/durable-523481b0/jenkins-log.txt'; sleep 3;{{done; }}}

       

      Jenkins master runs from a Docker image based on jenkins/jenkins:2.138.2-alpine with specific plugins baked into the image by /usr/local/bin/install-plugins.sh

      The message originates in durable-task-plugin, which must be a dependency of one of the plugins.txt plugins.  

      Two important observations:

      1) The issue does not occur when starting with the base jenkins/jenkins:2.138.2-alpine image and manually installing plugins via UI. That might suggest the issue is around how install-plugins.sh installs plugins and/or dependencies. 

      2) The issue does not occur on our production image, which is also 2.138.2-alpine + plugins built 2018-10-11. Rebuilding the the same image from the same Dockerfile results in different installed plugins. Makes me think results using install-plugins.sh are not deterministic.

        Attachments

          Issue Links

            Activity

            Hide
            avi_kivity Avi Kivity added a comment -

            I am seeing the same problem, parallel jobs running on Linux agents.  I can share the pipeline code if it will help.

            Show
            avi_kivity Avi Kivity added a comment - I am seeing the same problem, parallel jobs running on Linux agents.  I can share the pipeline code if it will help.
            Hide
            epkaxma Martin Wiklundh added a comment -

            We see the same problem intermittently, in the afternoons only. Appeared without any known change in our Jenkins setup. Network/storage issues may produce the same error.

            Show
            epkaxma Martin Wiklundh added a comment - We see the same problem intermittently, in the afternoons only. Appeared without any known change in our Jenkins setup. Network/storage issues may produce the same error.
            Hide
            kierzo Kieron Kierzo added a comment -

            Hey,

            Had this issue on the my Mac build.

            My fix was to set the JAVA_HOME variable which was missing on the machine.

            I created and added this file on the mac : "~/.bash_profile"

            added this line....

            export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-11.0.2.jdk/Contents/Home

            rebooted the mac and its fixed it.

            your "jdk-11.0.2.jdk" folder may be different so just replace that with whatever is in there.

            if you run the command:

            echo ${JAVA_HOME}

             

            and its empty this could be the cause.

             

            Hope this helps others.

             

            Cheers Kieron.

             

             

            Show
            kierzo Kieron Kierzo added a comment - Hey, Had this issue on the my Mac build. My fix was to set the JAVA_HOME variable which was missing on the machine. I created and added this file on the mac : "~/.bash_profile" added this line.... export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-11.0.2.jdk/Contents/Home rebooted the mac and its fixed it. your "jdk-11.0.2.jdk" folder may be different so just replace that with whatever is in there. if you run the command: echo ${JAVA_HOME}   and its empty this could be the cause.   Hope this helps others.   Cheers Kieron.    
            Hide
            jsosic Jakov Sosic added a comment -

            It seems that adding $JAVA_HOME in Global properties indeed fixes this!

            Since I run CentOS 7, this is what I've added:

            Name: JAVA_HOME

            Value: /usr/lib/jvm/jre-1.8.0-openjdk

            Show
            jsosic Jakov Sosic added a comment - It seems that adding $JAVA_HOME in Global properties indeed fixes this! Since I run CentOS 7, this is what I've added: Name: JAVA_HOME Value: /usr/lib/jvm/jre-1.8.0-openjdk
            Hide
            ctran Cuong Tran added a comment -

            Was this property added to the agent or the master?

            Show
            ctran Cuong Tran added a comment - Was this property added to the agent or the master?

              People

              • Assignee:
                dnusbaum Devin Nusbaum
                Reporter:
                gc875 gc875
              • Votes:
                22 Vote for this issue
                Watchers:
                37 Start watching this issue

                Dates

                • Created:
                  Updated: