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

ConcurrentModificationException while checkout

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • credentials-plugin
    • None

      09:24:15  The recommended git tool is: NONE
      09:24:18  
      java.util.ConcurrentModificationException
      	at java.base/java.util.ArrayList$Itr.checkForComodification(ArrayList.java:1043)
      	at java.base/java.util.ArrayList$Itr.next(ArrayList.java:997)
      	at com.cloudbees.plugins.credentials.domains.DomainCredentials.getCredentials(DomainCredentials.java:191)
      	at com.cloudbees.plugins.credentials.SystemCredentialsProvider$ProviderImpl.getCredentials(SystemCredentialsProvider.java:466)
      	at com.cloudbees.plugins.credentials.CredentialsProvider.lookupCredentials(CredentialsProvider.java:564)
      	at hudson.plugins.git.GitSCM.lookupScanCredentials(GitSCM.java:946)
      	at hudson.plugins.git.GitSCM.createClient(GitSCM.java:918)
      	at hudson.plugins.git.GitSCM.createClient(GitSCM.java:838)
      	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1291)
      	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)
      Finished: FAILURE 

      We recieve random exception while checkout pipeline code. After set "Pipeline speed/durability override" at "Less durability, a bit faster" error is almost gone, but not  completely.

          [JENKINS-68794] ConcurrentModificationException while checkout

          Khrychikov Andrey added a comment - - edited

          Jenkins core 2.319.3

          Credentials plugin 2.6.1

          Git plugin 4.10.1

           

          This is code that causes the exception, as I think.

          def checkoutRepo(GitUrlSources, GitBranchSources, GitCredentialsId) {
              echo "Получение репозитория $GitUrlSources ветка $GitBranchSources CredentialsId=$GitCredentialsId в ${context.pwd()}"
              context.checkout changelog: false,
                      poll: false,
                      scm: ([$class           : 'GitSCM',
                             branches         : [[name: GitBranchSources]],
                             extensions       : [[$class: 'CloneOption', honorRefspec: true, noTags: false, reference: '', shallow: false]],
                             userRemoteConfigs: [[credentialsId: GitCredentialsId, url: GitUrlSources]]])
              echo "end checkout"
          } 

          Khrychikov Andrey added a comment - - edited Jenkins core 2.319.3 Credentials plugin 2.6.1 Git plugin 4.10.1   This is code that causes the exception, as I think. def checkoutRepo(GitUrlSources, GitBranchSources, GitCredentialsId) {     echo "Получение репозитория $GitUrlSources ветка $GitBranchSources CredentialsId=$GitCredentialsId в ${context.pwd()}"     context.checkout changelog: false ,             poll: false ,             scm: ([$class           : 'GitSCM' ,                    branches         : [[name: GitBranchSources]],                    extensions       : [[$class: 'CloneOption' , honorRefspec: true , noTags: false , reference: '', shallow: false ]],                    userRemoteConfigs: [[credentialsId: GitCredentialsId, url: GitUrlSources]]])     echo "end checkout" }

          Mark Waite added a comment -

          I don't see anything in the git plugin that would be modifying credentials. It reads credentials and uses them, but does not modify them. I've unassigned myself and removed the git plugin as a component of this issue report.

          The version of credentials plugin that you are running is only 3 months old. There are much newer releases, but their changelog entries do not mention any fix for exceptions or for concurrent modification.

          The version of git plugin that you are running is 6 months old and has a known security vulnerability. You should avoid that vulnerability by upgrading. However, there is nothing in the changelogs that hints to me that it might help with this issue.

          Mark Waite added a comment - I don't see anything in the git plugin that would be modifying credentials. It reads credentials and uses them, but does not modify them. I've unassigned myself and removed the git plugin as a component of this issue report. The version of credentials plugin that you are running is only 3 months old. There are much newer releases, but their changelog entries do not mention any fix for exceptions or for concurrent modification. The version of git plugin that you are running is 6 months old and has a known security vulnerability . You should avoid that vulnerability by upgrading. However, there is nothing in the changelogs that hints to me that it might help with this issue.

            Unassigned Unassigned
            andreyhry Khrychikov Andrey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: