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

CauseAction.causes can become huge

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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).

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -

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

            Show
            jglick Jesse Glick added a comment - JENKINS-4831 deduplicated the display , but not the storage .
            Hide
            scm_issue_link 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.

            Show
            scm_issue_link 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.
            Hide
            scm_issue_link 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

            Show
            scm_issue_link 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
            Hide
            dogfood 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
            Show
            dogfood 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
            Hide
            scm_issue_link 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.

            Show
            scm_issue_link 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.
            Hide
            dogfood 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
            Show
            dogfood 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
            Hide
            schristou 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.

            Show
            schristou 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.
            Hide
            noidi 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?

            Show
            noidi 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?
            Hide
            ostov Oleksandr Stovbenko added a comment - - edited

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

            Show
            ostov Oleksandr Stovbenko added a comment - - edited Timo Mihaljov , Confirm. This change makes Build Pipeline and Delivery Pipeline plugins useless. This should be fixed ASAP.
            Hide
            jglick Jesse Glick added a comment -

            File plugin bugs linked to this one Timo Mihaljov and Oleksandr Stovbenko. I suspect that the problem is that this code and this code are assuming without justification that the returned List is mutable.

            Show
            jglick Jesse Glick added a comment - File plugin bugs linked to this one Timo Mihaljov and Oleksandr Stovbenko . I suspect that the problem is that this code and this code are assuming without justification that the returned List is mutable.
            Hide
            jglick Jesse Glick added a comment -
            Show
            jglick Jesse Glick added a comment - the correct idiom
            Hide
            scm_issue_link 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.

            Show
            scm_issue_link 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.
            Hide
            scm_issue_link 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

            Show
            scm_issue_link 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
            Hide
            dogfood 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
            Show
            dogfood 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
            Hide
            scm_issue_link 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.

            Show
            scm_issue_link 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 .
            Hide
            olivergondza 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.

            Show
            olivergondza 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.
            Hide
            scm_issue_link 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

            Show
            scm_issue_link 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
            Hide
            jglick 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.

            Show
            jglick 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.
            Hide
            jglick 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.

            Show
            jglick 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 .
            Hide
            scm_issue_link 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

            Show
            scm_issue_link 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
            Hide
            scm_issue_link 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)

            Show
            scm_issue_link 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)
            Hide
            scm_issue_link 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)

            Show
            scm_issue_link 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)
            Hide
            scm_issue_link 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.

            Show
            scm_issue_link 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.
            Hide
            scm_issue_link 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

            Show
            scm_issue_link 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

              People

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

                Dates

                Created:
                Updated:
                Resolved: