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

Slave sets LIBPATH variable which breakes AIX freeware used in jobs

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • remoting
    • None
    • Master runs on RHEL8 with Azul JDK 11.0.16
      Slave runs on AIX with IBM Semeru JDK11.0.16

      Jenkins Git plugin usesĀ  /opt/freeware/bin/git which aborts with a shared library load issue. Root cause is the LIBPATH variable, which gets set internal by the slave and unfortunately exported to the job environment. I tried setting an empty LIBPATH in the slave config but with no avail.

      Only workaround is to set a Jenkins Job parameter LIBPATH with empty value, which is odd.

      I vote that the LIBPATH which gets exported to the job should have the original system value and it should not include the JVM environment of the slave.

      I use Jenkins 2.375.2. In my case the original LIBPATH (/bin/sh forked by ssh) is just unset/blank. The slave (started with /opt/jdk11.0.16/bin/java) adds the following LIBPATH value and exports it to the job shell environment:
      LIBPATH=/opt/jdk11.0.16/lib/server:/opt/jdk11.0.16/lib:/opt/jdk11.0.16/lib/jli:/opt/jdk11.0.16/../lib:/usr/libĀ 

      The Git checkout aborted with following exception (copied from console):

      [Pipeline] checkoutThe recommended git tool is: NONE
      using credential Read-Only
      Cloning the remote Git repository
      Using no checkout clone with sparse checkout.
      ERROR: Error cloning remote repo 'origin'
      hudson.plugins.git.GitException: Could not init /WM/TESTSRV/testenv/wir_simple_install_uninstall
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:1049)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:802)
      at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:158)
      at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:151)
      at app//hudson.remoting.UserRequest.perform(UserRequest.java:211)
      at app//hudson.remoting.UserRequest.perform(UserRequest.java:54)
      at app//hudson.remoting.Request$2.run(Request.java:377)
      at app//hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
      at java.base@11.0.16.1/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      at java.base@11.0.16.1/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      at java.base@11.0.16.1/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      at java.base@11.0.16.1/java.lang.Thread.run(Thread.java:840)
      Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to wmadmin.aixwm6tm13
      at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1784)
      at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
      at hudson.remoting.Channel.call(Channel.java:1000)
      at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:143)
      at jdk.internal.reflect.GeneratedMethodAccessor1155.invoke(Unknown Source)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:129)
      at com.sun.proxy.$Proxy292.execute(Unknown Source)
      at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1226)
      at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1309)
      at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
      at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:97)
      at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:84)
      at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
      at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
      at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      at java.base/java.lang.Thread.run(Thread.java:829)
      Caused by: hudson.plugins.git.GitException: Command "git init /WM/TESTSRV/testenv/wir_simple_install_uninstall" returned status code 255:
      stdout:
      stderr: exec(): 0509-036 Cannot load program git_64 because of the following errors:
      0509-150 Dependent module /usr/lib/libiconv.a(libiconv.so.2) could not be loaded.
      0509-152 Member libiconv.so.2 is not found in archive

      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2734)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2660)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2656)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1981)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:1047)
      ... 11 more[Pipeline] }[Pipeline] // stage[Pipeline] }[Pipeline] // ws[Pipeline] }[Pipeline] // node[Pipeline] End of PipelineERROR: Error cloning remote repo 'origin'
      Finished: FAILURE

            Unassigned Unassigned
            balthes Balthasar Nebel
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: