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

ConcurrentModificationException while trying to expand parameters

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • gerrit-trigger-plugin
    • None
    • Jenkins version: 2.60.3
      Gerrit trigger plugin version: 2.25.0

      I've noticed that if you configure 2 (or more) Jobs for the same gerrit event, and in case where the first of the jobs fail, Jenkins fails to expand gerrit-trigger-plugin parameters and doesn't send notification back to gerrit.

      Here is the exception I've managed to find in jenkins.log:

      com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.ParameterExpander expandParameters
      SEVERE: Failed to expand env vars into gerrit cmd. Gerrit won't be notified!!
      java.util.ConcurrentModificationException
              at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:901)
              at java.util.ArrayList$Itr.next(ArrayList.java:851)
              at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:885)
              at com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.ParameterExpander.expandParameters(ParameterExpander.java:266)
              at com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.ParameterExpander.getBuildStartedCommand(ParameterExpander.java:132)
              at com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.GerritNotifier.buildStarted(GerritNotifier.java:84)
              at com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.job.ssh.BuildStartedCommandJob.run(BuildStartedCommandJob.java:80)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
              at java.lang.Thread.run(Thread.java:748)
      

            rsandell rsandell
            danielbelenky Daniel Belenky
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: