If you have some tool constantly pinging jobs/.../build?token=... but the job is stuck in the queue for a long time, you will get a CauseAction with a potentially unbounded number of causes, all identical RemoteCause instances. In a system with tens of thousands of build records loaded, there can be millions of such causes. This is a waste of heap space (and disk space, disk I/O time to load).

          [JENKINS-33467] CauseAction.causes can become huge

          Jesse Glick added a comment -

          JENKINS-4831 deduplicated the display, but not the storage.

          Jesse Glick added a comment - JENKINS-4831 deduplicated the display , but not the storage .

          Code changed in jenkins
          User: Jesse Glick
          Path:
          core/src/main/java/hudson/model/CauseAction.java
          test/src/test/java/hudson/model/QueueTest.java
          http://jenkins-ci.org/commit/jenkins/6ae54add5dd3f171cf7cca820ca2e5443ae34b14
          Log:
          [FIXED JENKINS-33467] Do not store redundant copies of Cause in CauseAction.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/model/CauseAction.java test/src/test/java/hudson/model/QueueTest.java http://jenkins-ci.org/commit/jenkins/6ae54add5dd3f171cf7cca820ca2e5443ae34b14 Log: [FIXED JENKINS-33467] Do not store redundant copies of Cause in CauseAction.

          Code changed in jenkins
          User: Daniel Beck
          Path:
          core/src/main/java/hudson/model/Cause.java
          core/src/main/java/hudson/model/CauseAction.java
          test/src/test/java/hudson/model/QueueTest.java
          http://jenkins-ci.org/commit/jenkins/ed564e63643c35995e7833df04b71772ccd49074
          Log:
          Merge pull request #2114 from jglick/CauseAction-JENKINS-33467

          JENKINS-33467 Do not store duplicate Cause’s

          Compare: https://github.com/jenkinsci/jenkins/compare/c5a3b2f61f9b...ed564e63643c

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Beck Path: core/src/main/java/hudson/model/Cause.java core/src/main/java/hudson/model/CauseAction.java test/src/test/java/hudson/model/QueueTest.java http://jenkins-ci.org/commit/jenkins/ed564e63643c35995e7833df04b71772ccd49074 Log: Merge pull request #2114 from jglick/CauseAction- JENKINS-33467 JENKINS-33467 Do not store duplicate Cause’s Compare: https://github.com/jenkinsci/jenkins/compare/c5a3b2f61f9b...ed564e63643c

          dogfood added a comment -

          Integrated in jenkins_main_trunk #4500
          [FIXED JENKINS-33467] Do not store redundant copies of Cause in (Revision 6ae54add5dd3f171cf7cca820ca2e5443ae34b14)

          Result = SUCCESS
          jesse glick : 6ae54add5dd3f171cf7cca820ca2e5443ae34b14
          Files :

          • test/src/test/java/hudson/model/QueueTest.java
          • core/src/main/java/hudson/model/CauseAction.java

          dogfood added a comment - Integrated in jenkins_main_trunk #4500 [FIXED JENKINS-33467] Do not store redundant copies of Cause in (Revision 6ae54add5dd3f171cf7cca820ca2e5443ae34b14) Result = SUCCESS jesse glick : 6ae54add5dd3f171cf7cca820ca2e5443ae34b14 Files : test/src/test/java/hudson/model/QueueTest.java core/src/main/java/hudson/model/CauseAction.java

          Code changed in jenkins
          User: Jesse Glick
          Path:
          changelog.html
          http://jenkins-ci.org/commit/jenkins/a57afbd1bc3fdeb47243696174d4b564ab50414f
          Log:
          JENKINS-33467 Noting merge of #2114.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html http://jenkins-ci.org/commit/jenkins/a57afbd1bc3fdeb47243696174d4b564ab50414f Log: JENKINS-33467 Noting merge of #2114.

          dogfood added a comment -

          Integrated in jenkins_main_trunk #4501
          JENKINS-33467 Noting merge of #2114. (Revision a57afbd1bc3fdeb47243696174d4b564ab50414f)

          Result = SUCCESS
          jesse glick : a57afbd1bc3fdeb47243696174d4b564ab50414f
          Files :

          • changelog.html

          dogfood added a comment - Integrated in jenkins_main_trunk #4501 JENKINS-33467 Noting merge of #2114. (Revision a57afbd1bc3fdeb47243696174d4b564ab50414f) Result = SUCCESS jesse glick : a57afbd1bc3fdeb47243696174d4b564ab50414f Files : changelog.html

          Steven Christou added a comment - - edited

          I marked this as an lts-candidate, as this can cause memory issues and lots of disk I/O.

          Steven Christou added a comment - - edited I marked this as an lts-candidate , as this can cause memory issues and lots of disk I/O.

          Timo Mihaljov added a comment -

          This change breaks the manual steps in the Build Pipeline and Delivery Pipeline plugins. With 1.653 they they no longer recognize that the manually started job is part of the pipeline. Should I report this issue for Jenkins or the plugins?

          Timo Mihaljov added a comment - This change breaks the manual steps in the Build Pipeline and Delivery Pipeline plugins. With 1.653 they they no longer recognize that the manually started job is part of the pipeline. Should I report this issue for Jenkins or the plugins?

          Oleksandr Stovbenko added a comment - - edited

          noidi, Confirm. This change makes Build Pipeline and Delivery Pipeline plugins useless. This should be fixed ASAP.

          Oleksandr Stovbenko added a comment - - edited noidi , Confirm. This change makes Build Pipeline and Delivery Pipeline plugins useless. This should be fixed ASAP.

          Jesse Glick added a comment -

          File plugin bugs linked to this one noidi and ostov. I suspect that the problem is that this code and this code are assuming without justification that the returned List is mutable.

          Jesse Glick added a comment - File plugin bugs linked to this one noidi and ostov . I suspect that the problem is that this code and this code are assuming without justification that the returned List is mutable.

          Jesse Glick added a comment -

          Jesse Glick added a comment - the correct idiom

          Code changed in jenkins
          User: Jesse Glick
          Path:
          core/src/main/java/hudson/model/CauseAction.java
          http://jenkins-ci.org/commit/jenkins/4adee7597aad7a338db8d3eb320575ae618a8c81
          Log:
          JENKINS-33467 Clarifying that CauseAction.getCauses is immutable and you should construct the action with the causes you want.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/model/CauseAction.java http://jenkins-ci.org/commit/jenkins/4adee7597aad7a338db8d3eb320575ae618a8c81 Log: JENKINS-33467 Clarifying that CauseAction.getCauses is immutable and you should construct the action with the causes you want.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          core/src/main/java/hudson/model/CauseAction.java
          http://jenkins-ci.org/commit/jenkins/a5124b5fd504291c7d0c7dcbadd84874d1486952
          Log:
          Merge pull request #2129 from jglick/immutable-list-JENKINS-33467

          JENKINS-33467 Clarifying that CauseAction.getCauses is immutable

          Compare: https://github.com/jenkinsci/jenkins/compare/697d4ad38ce7...a5124b5fd504

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/model/CauseAction.java http://jenkins-ci.org/commit/jenkins/a5124b5fd504291c7d0c7dcbadd84874d1486952 Log: Merge pull request #2129 from jglick/immutable-list- JENKINS-33467 JENKINS-33467 Clarifying that CauseAction.getCauses is immutable Compare: https://github.com/jenkinsci/jenkins/compare/697d4ad38ce7...a5124b5fd504

          dogfood added a comment -

          Integrated in jenkins_main_trunk #4519
          JENKINS-33467 Clarifying that CauseAction.getCauses is immutable and (Revision 4adee7597aad7a338db8d3eb320575ae618a8c81)

          Result = SUCCESS
          Jesse Glick : 4adee7597aad7a338db8d3eb320575ae618a8c81
          Files :

          • core/src/main/java/hudson/model/CauseAction.java

          dogfood added a comment - Integrated in jenkins_main_trunk #4519 JENKINS-33467 Clarifying that CauseAction.getCauses is immutable and (Revision 4adee7597aad7a338db8d3eb320575ae618a8c81) Result = SUCCESS Jesse Glick : 4adee7597aad7a338db8d3eb320575ae618a8c81 Files : core/src/main/java/hudson/model/CauseAction.java

          Code changed in jenkins
          User: Timo Mihaljov
          Path:
          src/main/java/au/com/centrumsystems/hudson/plugin/buildpipeline/BuildPipelineView.java
          http://jenkins-ci.org/commit/build-pipeline-plugin/d56ff03bf4838c541e68f4cfc06f59ba78d12317
          Log:
          JENKINS-33591 Don't modify CauseAction's causes

          The cause list is immutable as described in the comments of
          JENKINS-33467.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Timo Mihaljov Path: src/main/java/au/com/centrumsystems/hudson/plugin/buildpipeline/BuildPipelineView.java http://jenkins-ci.org/commit/build-pipeline-plugin/d56ff03bf4838c541e68f4cfc06f59ba78d12317 Log: JENKINS-33591 Don't modify CauseAction's causes The cause list is immutable as described in the comments of JENKINS-33467 .

          I prefer not to backport this into 1.651.1 since fix in one of the affected plugins is not released yet. Plus, This is more of an improvement than a bug fix.

          Oliver Gondža added a comment - I prefer not to backport this into 1.651.1 since fix in one of the affected plugins is not released yet. Plus, This is more of an improvement than a bug fix.

          Code changed in jenkins
          User: Robert Sandell
          Path:
          src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/gerritnotifier/ToGerritRunListener.java
          http://jenkins-ci.org/commit/gerrit-trigger-plugin/03d057f88f08e4b3ca9e14eebd48df043e27067f
          Log:
          Don't crash because JENKINS-33467 has changed expected behaviour

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Robert Sandell Path: src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/gerritnotifier/ToGerritRunListener.java http://jenkins-ci.org/commit/gerrit-trigger-plugin/03d057f88f08e4b3ca9e14eebd48df043e27067f Log: Don't crash because JENKINS-33467 has changed expected behaviour

          Jesse Glick added a comment -

          The Delivery Pipeline plugin bug seems to have been fixed & released already. Unclear to me what https://github.com/jenkinsci/gerrit-trigger-plugin/pull/278 is about—it is not linked to a distinct issue which would explain the symptom.

          Jesse Glick added a comment - The Delivery Pipeline plugin bug seems to have been fixed & released already. Unclear to me what https://github.com/jenkinsci/gerrit-trigger-plugin/pull/278 is about—it is not linked to a distinct issue which would explain the symptom.

          Jesse Glick added a comment -

          But yeah if you consider this a performance improvement rather than a bug fix per se then you could just remove lts-candidate.

          Jesse Glick added a comment - But yeah if you consider this a performance improvement rather than a bug fix per se then you could just remove lts-candidate .

          Code changed in jenkins
          User: Robert Sandell
          Path:
          src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/gerritnotifier/ToGerritRunListener.java
          http://jenkins-ci.org/commit/gerrit-trigger-plugin/f1a6a398ba1cf1f1f1ce1fb48e84a437ec3fb3bb
          Log:
          Merge pull request #278 from jenkinsci/JENKINS-33467

          Don't crash because JENKINS-33467 has changed expected behaviour

          Compare: https://github.com/jenkinsci/gerrit-trigger-plugin/compare/b7ab5892c183...f1a6a398ba1c

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Robert Sandell Path: src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/gerritnotifier/ToGerritRunListener.java http://jenkins-ci.org/commit/gerrit-trigger-plugin/f1a6a398ba1cf1f1f1ce1fb48e84a437ec3fb3bb Log: Merge pull request #278 from jenkinsci/ JENKINS-33467 Don't crash because JENKINS-33467 has changed expected behaviour Compare: https://github.com/jenkinsci/gerrit-trigger-plugin/compare/b7ab5892c183...f1a6a398ba1c

          Code changed in jenkins
          User: Jesse Glick
          Path:
          core/src/main/java/hudson/model/CauseAction.java
          test/src/test/java/hudson/model/QueueTest.java
          http://jenkins-ci.org/commit/jenkins/916e759f576fd9aec7eb563f71f6541ceb37f641
          Log:
          [FIXED JENKINS-33467] Do not store redundant copies of Cause in CauseAction.
          (cherry picked from commit 6ae54add5dd3f171cf7cca820ca2e5443ae34b14)

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/model/CauseAction.java test/src/test/java/hudson/model/QueueTest.java http://jenkins-ci.org/commit/jenkins/916e759f576fd9aec7eb563f71f6541ceb37f641 Log: [FIXED JENKINS-33467] Do not store redundant copies of Cause in CauseAction. (cherry picked from commit 6ae54add5dd3f171cf7cca820ca2e5443ae34b14)

          Code changed in jenkins
          User: Jesse Glick
          Path:
          core/src/main/java/hudson/model/CauseAction.java
          http://jenkins-ci.org/commit/jenkins/63886be9f75c6f538b9401d9cb445b701b1f017c
          Log:
          JENKINS-33467 Clarifying that CauseAction.getCauses is immutable and you should construct the action with the causes you want.
          (cherry picked from commit 4adee7597aad7a338db8d3eb320575ae618a8c81)

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/model/CauseAction.java http://jenkins-ci.org/commit/jenkins/63886be9f75c6f538b9401d9cb445b701b1f017c Log: JENKINS-33467 Clarifying that CauseAction.getCauses is immutable and you should construct the action with the causes you want. (cherry picked from commit 4adee7597aad7a338db8d3eb320575ae618a8c81)

          Code changed in jenkins
          User: Dan Alvizu
          Path:
          src/main/java/au/com/centrumsystems/hudson/plugin/buildpipeline/BuildPipelineView.java
          http://jenkins-ci.org/commit/build-pipeline-plugin/27e234d2f1b8c86e28465d6a2d8ace5db9c7d778
          Log:
          Fixed JENKINS-33935

          Jenkins core made CauseAction.getCauses an unmodifiable collection
          (JENKINS-33467) - so we need to make a copy.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Dan Alvizu Path: src/main/java/au/com/centrumsystems/hudson/plugin/buildpipeline/BuildPipelineView.java http://jenkins-ci.org/commit/build-pipeline-plugin/27e234d2f1b8c86e28465d6a2d8ace5db9c7d778 Log: Fixed JENKINS-33935 Jenkins core made CauseAction.getCauses an unmodifiable collection ( JENKINS-33467 ) - so we need to make a copy.

          Code changed in jenkins
          User: Oliver Gondža
          Path:
          core/src/main/java/hudson/model/CauseAction.java
          http://jenkins-ci.org/commit/jenkins/d53cab3ef68b62a4a6dbb247012577c338dfc133
          Log:
          JENKINS-33467 Adjust reported Jenkins version number for LTS

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oliver Gondža Path: core/src/main/java/hudson/model/CauseAction.java http://jenkins-ci.org/commit/jenkins/d53cab3ef68b62a4a6dbb247012577c338dfc133 Log: JENKINS-33467 Adjust reported Jenkins version number for LTS

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: