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

“Could not initialize class ProcessLiveness$LibC” running sh on Windows

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Duplicate
    • Component/s: durable-task-plugin
    • Labels:
    • Environment:
      Jenkins 2.32.2
      Linux master, Windows slave
      Pipeline 2.5
      Pipeline Groovy 2.27
      Pipeline Job 2.10
      Pipeline Nodes and Processes 2.9
      Pipeline Stage 2.2
    • Similar Issues:

      Description

      I have two Windows slaves. When I run pipeline jobs on these slaves I get tons of error messages

      Cannot contact Windows7: java.io.IOException: Remote call on Channel to /172.17.xxx.xxx failed
      

      Yet the job finishes successfully. A minimal example to reproduce is

      node('windows') {
          stage('Test') {
              sh '''
                  for ((i=0; i < 100; i++)); do
                      echo $i
                      sleep 1
                  done
              '''
          }
      }
      

      Executing the same shell script via a freestyle job on the same Windows slave works without any error messages therefore it's very likely that this is a bug in the pipeline implementation.
      Restarting slaves and master doesn't change anything. I also couldn't find any more information in log files (or I am looking at the wrong place)

        Attachments

          Issue Links

            Activity

            Hide
            andersh Anders Holmblad added a comment -

            The main reason for the update of the "Pipeline Nodes and Processes" plugin to version 2.9 was to include a dependency to the "Durable task" plugin to version 1.13, to solve an issue with Environment variables.

            It is a bit ironic then that the second main issue solved in the "Durable task" plugin v1.13 was;
            "JENKINS-40225 Replace backslashes when on Cygwin to allow sh to be used.", given the information that Pipeline is not supposed to support the shell on Windows

            Show
            andersh Anders Holmblad added a comment - The main reason for the update of the "Pipeline Nodes and Processes" plugin to version 2.9 was to include a dependency to the "Durable task" plugin to version 1.13, to solve an issue with Environment variables. It is a bit ironic then that the second main issue solved in the "Durable task" plugin v1.13 was; " JENKINS-40225 Replace backslashes when on Cygwin to allow sh to be used.", given the information that Pipeline is not supposed to support the shell on Windows
            Hide
            sj98ta Joe Fowler added a comment -

            Installing Blue Ocean, which of course needed to update "Pipeline: Nodes and Processes", and of course the problem has returned..   This is on Linux, not Windows.   Still no resolution to this problem, other than to downgrade, which is really not an option for me any longer. 

            Show
            sj98ta Joe Fowler added a comment - Installing Blue Ocean, which of course needed to update "Pipeline: Nodes and Processes", and of course the problem has returned..   This is on Linux, not Windows.   Still no resolution to this problem, other than to downgrade, which is really not an option for me any longer. 
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            There is an ongoing fix for JENKINS-38682, which should resolve this issue as well. https://github.com/jenkinsci/durable-task-plugin/pull/43

            Show
            oleg_nenashev Oleg Nenashev added a comment - There is an ongoing fix for JENKINS-38682 , which should resolve this issue as well.  https://github.com/jenkinsci/durable-task-plugin/pull/43
            Hide
            teilo James Nord added a comment -

            Well, everything works perfectly with Freestyle jobs under Windows.

            No one actually ferd back - but the reason is that this is 2 different beasts. the sh step in a pipeline will survive a disconnect of the agent (ie start a long running sh step and then restart your master, or pull the network cable on your agent and then reconnect it) . Pipelines support durability so the sh step will continue to run and when the master-agent comms are restored the pipeline will pickup the scripts process, in a freestyle build doing this will cause your build will fail.

            This essentially means, executing shell (bash) scripts under Windows isn't supported with pipelines? And I guess I cannot execute shell scripts with the bat command? Using batch files isn't an option.

            you can call shell scripts from a bat. if you write the shell script to a file then use bat "sh thescript.sh".

            Show
            teilo James Nord added a comment - Well, everything works perfectly with Freestyle jobs under Windows. No one actually ferd back - but the reason is that this is 2 different beasts. the sh step in a pipeline will survive a disconnect of the agent (ie start a long running sh step and then restart your master, or pull the network cable on your agent and then reconnect it) . Pipelines support durability so the sh step will continue to run and when the master-agent comms are restored the pipeline will pickup the scripts process, in a freestyle build doing this will cause your build will fail. This essentially means, executing shell (bash) scripts under Windows isn't supported with pipelines? And I guess I cannot execute shell scripts with the bat command? Using batch files isn't an option. you can call shell scripts from a bat. if you write the shell script to a file then use bat "sh thescript.sh" .
            Hide
            jglick Jesse Glick added a comment -

            Should have been solved—or, at least, changed!—by JENKINS-47791.

            Show
            jglick Jesse Glick added a comment - Should have been solved—or, at least, changed!—by  JENKINS-47791 .

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              sithmein Thorsten Meinl
              Votes:
              8 Vote for this issue
              Watchers:
              14 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: