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

Fix ConcurrentModificationException in PlotBuildAction class


    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • plot-plugin
    • None


      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.

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


      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

            vgaidarji Veaceslav Gaidarji
            vgaidarji Veaceslav Gaidarji
            0 Vote for this issue
            2 Start watching this issue