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

Fix ConcurrentModificationException in PlotBuildAction class

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Background

      New class called PlotBuildAction was added when compatibility with Pipeline plugin was implemented in https://github.com/jenkinsci/plot-plugin/pull/32.
      Seems like this class current implementation is not thread safe and user reported 1st time issue with ConcurrentModificationException in PR comment. Exception was not reproducible to me even though I used provided by reporter Jenkins & Pipeline configurations.
      There was an attempt to blindly fix the issue in commit, but it didn't work out.
      Second report about the same exception appeared recently.

      Sam Van Oort proposed copy-on-write approach rather than synchronized for methods. It should be considered as potential fix.

      Environment

      What should be done

      • We need to reproduce ConcurrentModificationException while accessing plots array in PlotBuildAction and fix it.
      • It's good to have a test for the fix

      How to test

        Attachments

          Activity

            People

            Assignee:
            vgaidarji Veaceslav Gaidarji
            Reporter:
            vgaidarji Veaceslav Gaidarji
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: