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

Pipeline Global Library parallel branches fails due to lock of lib

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Pipelines sometimes fails to load global libraries when starting jobs in parallel.
      see log below.

      Started by user anonymous
      Loading library GlobalLib@master
      > git rev-parse --is-inside-work-tree # timeout=10
      Fetching changes from the remote Git repository
      > git config remote.origin.url https://stash.srv.company.com/scm/globallib.git # timeout=10
      Fetching upstream changes from https://stash.srv.company.com/scm/globallib.git
      > git --version # timeout=10
      using GIT_ASKPASS to set credentials
      > git fetch --tags --progress https://stash.srv.company.com/scm/globallib.git +refs/heads/:refs/remotes/origin/
      ERROR: Error fetching remote repo 'origin'
      hudson.plugins.git.GitException: Failed to fetch from https://stash.srv.company.com/scm/globallib.git
      at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:803)
      at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1063)
      at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1094)
      at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:109)
      at org.jenkinsci.plugins.workflow.libs.SCMSourceRetriever.doRetrieve(SCMSourceRetriever.java:107)
      at org.jenkinsci.plugins.workflow.libs.SCMRetriever.retrieve(SCMRetriever.java:63)
      at org.jenkinsci.plugins.workflow.libs.LibraryAdder.retrieve(LibraryAdder.java:150)
      at org.jenkinsci.plugins.workflow.libs.LibraryAdder.add(LibraryAdder.java:131)
      at org.jenkinsci.plugins.workflow.libs.LibraryDecorator$1.call(LibraryDecorator.java:99)
      at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1053)
      at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:591)
      at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:569)
      at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:546)
      at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298)
      at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)
      at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688)
      at groovy.lang.GroovyShell.parse(GroovyShell.java:700)
      at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:67)
      at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:429)
      at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:392)
      at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:221)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:404)
      Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress https://stash.srv.company.com/scm/globallib.git +refs/heads/:refs/remotes/origin/" returned status code 1:
      stdout:
      stderr: error: cannot lock ref 'refs/remotes/origin/master': ref refs/remotes/origin/master is at fb4e6e25248afacb6ead1843d5004d866c09d5e7 but expected 66596bf220f874f58d78028f1199f6bee4d8de14
      From https://stash.srv.company.com/scm/globallib
      ! 66596bf..fb4e6e2 master -> origin/master (unable to update local ref)

      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1784)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1513)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:64)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:315)
      at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:801)
      ... 22 more
      ERROR: null
      org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
      WorkflowScript: Loading libraries failed

      1 error

      at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310)
      at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1073)
      at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:591)
      at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:569)
      at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:546)
      at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298)
      at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)
      at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688)
      at groovy.lang.GroovyShell.parse(GroovyShell.java:700)
      at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:67)
      at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:429)
      at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:392)
      at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:221)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:404)
      Finished: FAILURE

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -

            Probably the same as JENKINS-40408.

            Show
            jglick Jesse Glick added a comment - Probably the same as JENKINS-40408 .

              People

              • Assignee:
                Unassigned
                Reporter:
                tuffsy Johan Kalmner
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: