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

Message "Started by an SCM change" repeated many times for a build

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      Platform: All, OS: All

      Description

      Using Hudson 1.331, perforce plugin 1.0.14.
      I'm beginning to see a lot of builds that have the message "Started by an SCM
      change" repeated many times. The one I'm looking at now has it 19 times.
      It's very likely related to the build having spent plenty of time in the build
      queue, waiting for an available executor. Still, I believe this did not happen
      "some releases" ago - I can't remember noticing it until "recently" (sorry, no
      specific release).
      I'm filing this in "core", but it might be a "perforce" plugin issue?

        Activity

        Hide
        mdonohue mdonohue added a comment -

        It means the SCM polling code added this project to the queue that many times
        before it actually started. Each time a build is requested to start, it creates a
        new Cause. SCM polling could suspend itself if the build is already queued.

        Show
        mdonohue mdonohue added a comment - It means the SCM polling code added this project to the queue that many times before it actually started. Each time a build is requested to start, it creates a new Cause. SCM polling could suspend itself if the build is already queued.
        Hide
        torbent torbent added a comment -

        I thought it did that? I seem to recall entries in the Hudson server logs saying
        something like that?
        Does this mean that it's still a "core" issue?

        Show
        torbent torbent added a comment - I thought it did that? I seem to recall entries in the Hudson server logs saying something like that? Does this mean that it's still a "core" issue?
        Hide
        torbent torbent added a comment -

        Sorry, didn't mean to move it to "perforce". Stay in "core" for now ...

        Show
        torbent torbent added a comment - Sorry, didn't mean to move it to "perforce". Stay in "core" for now ...
        Hide
        mindless Alan Harder added a comment -

        Confirmed.. the "some releases ago" is exactly 1.330 (no dups in 1.329). The
        regression is from r22992. Will look into what happened there. "core" is the
        correct subcat, I tested and saw this with svn.

        Show
        mindless Alan Harder added a comment - Confirmed.. the "some releases ago" is exactly 1.330 (no dups in 1.329). The regression is from r22992. Will look into what happened there. "core" is the correct subcat, I tested and saw this with svn.
        Hide
        mindless Alan Harder added a comment -

        r22992 actually fixed a flaw in the original code to add multiple causes into a
        build, resulting in multiple causes never being added. Now that this has been
        fixed, it revealed that we add duplicates.. I'm updating it to only add unique
        causes.

        Show
        mindless Alan Harder added a comment - r22992 actually fixed a flaw in the original code to add multiple causes into a build, resulting in multiple causes never being added. Now that this has been fixed, it revealed that we add duplicates.. I'm updating it to only add unique causes.
        Hide
        scm_issue_link SCM/JIRA link daemon added a comment -

        Code changed in hudson
        User: : mindless
        Path:
        branches/rc/core/src/main/java/hudson/cli/BuildCommand.java
        branches/rc/core/src/main/java/hudson/model/Cause.java
        branches/rc/core/src/main/java/hudson/model/CauseAction.java
        branches/rc/core/src/main/java/hudson/triggers/SCMTrigger.java
        branches/rc/core/src/main/java/hudson/triggers/TimerTrigger.java
        branches/rc/test/src/test/java/hudson/model/QueueTest.java
        trunk/hudson/main/core/src/main/java/hudson/cli/BuildCommand.java
        trunk/hudson/main/core/src/main/java/hudson/model/Cause.java
        trunk/hudson/main/core/src/main/java/hudson/model/CauseAction.java
        trunk/hudson/main/core/src/main/java/hudson/triggers/SCMTrigger.java
        trunk/hudson/main/core/src/main/java/hudson/triggers/TimerTrigger.java
        trunk/hudson/main/test/src/test/java/hudson/model/QueueTest.java
        trunk/www/changelog.html
        http://fisheye4.cenqua.com/changelog/hudson/?cs=23699
        Log:
        [FIXED JENKINS-4831] prevent duplicate cause entries for a build

        Show
        scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: branches/rc/core/src/main/java/hudson/cli/BuildCommand.java branches/rc/core/src/main/java/hudson/model/Cause.java branches/rc/core/src/main/java/hudson/model/CauseAction.java branches/rc/core/src/main/java/hudson/triggers/SCMTrigger.java branches/rc/core/src/main/java/hudson/triggers/TimerTrigger.java branches/rc/test/src/test/java/hudson/model/QueueTest.java trunk/hudson/main/core/src/main/java/hudson/cli/BuildCommand.java trunk/hudson/main/core/src/main/java/hudson/model/Cause.java trunk/hudson/main/core/src/main/java/hudson/model/CauseAction.java trunk/hudson/main/core/src/main/java/hudson/triggers/SCMTrigger.java trunk/hudson/main/core/src/main/java/hudson/triggers/TimerTrigger.java trunk/hudson/main/test/src/test/java/hudson/model/QueueTest.java trunk/www/changelog.html http://fisheye4.cenqua.com/changelog/hudson/?cs=23699 Log: [FIXED JENKINS-4831] prevent duplicate cause entries for a build
        Hide
        mdonohue mdonohue added a comment -

        I feel like this fix hides larger issues - such as triggers that run too
        frequently, or SCM polling that continues even though a build is in the queue.

        The old code would show a cause every time a build was requested, which makes it
        pretty accurate for auditing your builds. Now duplicate requests are silently
        dropped.

        Show
        mdonohue mdonohue added a comment - I feel like this fix hides larger issues - such as triggers that run too frequently, or SCM polling that continues even though a build is in the queue. The old code would show a cause every time a build was requested, which makes it pretty accurate for auditing your builds. Now duplicate requests are silently dropped.
        Hide
        torbent torbent added a comment -

        I'd tend to agree with mdonohue - and I still believe that I saw server logs to
        the effect that polling was suspended because a build was in queue (or was that
        "in progress"?).
        Should we
        a) reopen this issue with a clarification?
        b) make a new issue about suspending scm polling?

        Show
        torbent torbent added a comment - I'd tend to agree with mdonohue - and I still believe that I saw server logs to the effect that polling was suspended because a build was in queue (or was that "in progress"?). Should we a) reopen this issue with a clarification? b) make a new issue about suspending scm polling?
        Hide
        mindless Alan Harder added a comment -

        um, no suggestions for alternate solution? well, I have one.. record the
        duplicate causes but update the display on the build page like this: "Started by
        an SCM change (19 times)"

        Show
        mindless Alan Harder added a comment - um, no suggestions for alternate solution? well, I have one.. record the duplicate causes but update the display on the build page like this: "Started by an SCM change (19 times)"
        Hide
        mdonohue mdonohue added a comment -

        I guess it wasn't clear that I was suggesting the fix be reverted. Sorry for
        not being explicit about it. Counting the duplicates would work as well, and
        can take advantage of the equality logic you put in.

        Show
        mdonohue mdonohue added a comment - I guess it wasn't clear that I was suggesting the fix be reverted. Sorry for not being explicit about it. Counting the duplicates would work as well, and can take advantage of the equality logic you put in.
        Hide
        mindless Alan Harder added a comment -

        r23731 | mindless | 2009-11-14 15:27:31 -0700 (Sat, 14 Nov 2009) | 3 lines
        Changed paths:
        M /branches/rc/core/src/main/java/hudson/model/CauseAction.java
        M /branches/rc/core/src/main/resources/hudson/model/CauseAction/summary.jelly
        A
        /branches/rc/core/src/main/resources/hudson/model/CauseAction/summary.properties
        M /branches/rc/test/src/test/java/hudson/model/QueueTest.java
        M /trunk/hudson/main/core/src/main/java/hudson/model/CauseAction.java
        M
        /trunk/hudson/main/core/src/main/resources/hudson/model/CauseAction/summary.jelly
        A
        /trunk/hudson/main/core/src/main/resources/hudson/model/CauseAction/summary.properties
        M /trunk/hudson/main/test/src/test/java/hudson/model/QueueTest.java
        M /trunk/www/changelog.html

        JENKINS-4831 Record duplicate causes again, but now update display on the build
        page
        to say (# times) for duplicates instead of listing them many times.

        ------------------------------------------------------------------------
        r23732 | mindless | 2009-11-14 18:17:01 -0700 (Sat, 14 Nov 2009) | 2 lines
        Changed paths:
        M
        /branches/rc/core/src/main/resources/hudson/model/Cause/UpstreamCause/description.jelly
        M
        /branches/rc/core/src/main/resources/hudson/model/Cause/UserCause/description.jelly
        M /branches/rc/core/src/main/resources/hudson/model/Cause/description.jelly
        M
        /trunk/hudson/main/core/src/main/resources/hudson/model/Cause/UpstreamCause/description.jelly
        M
        /trunk/hudson/main/core/src/main/resources/hudson/model/Cause/UserCause/description.jelly
        M /trunk/hudson/main/core/src/main/resources/hudson/model/Cause/description.jelly

        JENKINS-4831 don't wrap "(# times)" only separate line on build page

        Show
        mindless Alan Harder added a comment - r23731 | mindless | 2009-11-14 15:27:31 -0700 (Sat, 14 Nov 2009) | 3 lines Changed paths: M /branches/rc/core/src/main/java/hudson/model/CauseAction.java M /branches/rc/core/src/main/resources/hudson/model/CauseAction/summary.jelly A /branches/rc/core/src/main/resources/hudson/model/CauseAction/summary.properties M /branches/rc/test/src/test/java/hudson/model/QueueTest.java M /trunk/hudson/main/core/src/main/java/hudson/model/CauseAction.java M /trunk/hudson/main/core/src/main/resources/hudson/model/CauseAction/summary.jelly A /trunk/hudson/main/core/src/main/resources/hudson/model/CauseAction/summary.properties M /trunk/hudson/main/test/src/test/java/hudson/model/QueueTest.java M /trunk/www/changelog.html JENKINS-4831 Record duplicate causes again, but now update display on the build page to say (# times) for duplicates instead of listing them many times. ------------------------------------------------------------------------ r23732 | mindless | 2009-11-14 18:17:01 -0700 (Sat, 14 Nov 2009) | 2 lines Changed paths: M /branches/rc/core/src/main/resources/hudson/model/Cause/UpstreamCause/description.jelly M /branches/rc/core/src/main/resources/hudson/model/Cause/UserCause/description.jelly M /branches/rc/core/src/main/resources/hudson/model/Cause/description.jelly M /trunk/hudson/main/core/src/main/resources/hudson/model/Cause/UpstreamCause/description.jelly M /trunk/hudson/main/core/src/main/resources/hudson/model/Cause/UserCause/description.jelly M /trunk/hudson/main/core/src/main/resources/hudson/model/Cause/description.jelly JENKINS-4831 don't wrap "(# times)" only separate line on build page
        Hide
        scm_issue_link SCM/JIRA link daemon added a comment -

        Code changed in hudson
        User: : mindless
        Path:
        branches/rc/core/src/main/java/hudson/model/CauseAction.java
        branches/rc/core/src/main/resources/hudson/model/CauseAction/summary.jelly
        branches/rc/core/src/main/resources/hudson/model/CauseAction/summary.properties
        branches/rc/test/src/test/java/hudson/model/QueueTest.java
        trunk/hudson/main/core/src/main/java/hudson/model/CauseAction.java
        trunk/hudson/main/core/src/main/resources/hudson/model/CauseAction/summary.jelly
        trunk/hudson/main/core/src/main/resources/hudson/model/CauseAction/summary.properties
        trunk/hudson/main/test/src/test/java/hudson/model/QueueTest.java
        trunk/www/changelog.html
        http://fisheye4.cenqua.com/changelog/hudson/?cs=23731
        Log:
        JENKINS-4831 Record duplicate causes again, but now update display on the build page
        to say (# times) for duplicates instead of listing them many times.

        Show
        scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: branches/rc/core/src/main/java/hudson/model/CauseAction.java branches/rc/core/src/main/resources/hudson/model/CauseAction/summary.jelly branches/rc/core/src/main/resources/hudson/model/CauseAction/summary.properties branches/rc/test/src/test/java/hudson/model/QueueTest.java trunk/hudson/main/core/src/main/java/hudson/model/CauseAction.java trunk/hudson/main/core/src/main/resources/hudson/model/CauseAction/summary.jelly trunk/hudson/main/core/src/main/resources/hudson/model/CauseAction/summary.properties trunk/hudson/main/test/src/test/java/hudson/model/QueueTest.java trunk/www/changelog.html http://fisheye4.cenqua.com/changelog/hudson/?cs=23731 Log: JENKINS-4831 Record duplicate causes again, but now update display on the build page to say (# times) for duplicates instead of listing them many times.
        Hide
        scm_issue_link SCM/JIRA link daemon added a comment -

        Code changed in hudson
        User: : mindless
        Path:
        branches/rc/core/src/main/resources/hudson/model/Cause/UpstreamCause/description.jelly
        branches/rc/core/src/main/resources/hudson/model/Cause/UserCause/description.jelly
        branches/rc/core/src/main/resources/hudson/model/Cause/description.jelly
        trunk/hudson/main/core/src/main/resources/hudson/model/Cause/UpstreamCause/description.jelly
        trunk/hudson/main/core/src/main/resources/hudson/model/Cause/UserCause/description.jelly
        trunk/hudson/main/core/src/main/resources/hudson/model/Cause/description.jelly
        http://fisheye4.cenqua.com/changelog/hudson/?cs=23732
        Log:
        JENKINS-4831 don't wrap "(# times)" only separate line on build page

        Show
        scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: branches/rc/core/src/main/resources/hudson/model/Cause/UpstreamCause/description.jelly branches/rc/core/src/main/resources/hudson/model/Cause/UserCause/description.jelly branches/rc/core/src/main/resources/hudson/model/Cause/description.jelly trunk/hudson/main/core/src/main/resources/hudson/model/Cause/UpstreamCause/description.jelly trunk/hudson/main/core/src/main/resources/hudson/model/Cause/UserCause/description.jelly trunk/hudson/main/core/src/main/resources/hudson/model/Cause/description.jelly http://fisheye4.cenqua.com/changelog/hudson/?cs=23732 Log: JENKINS-4831 don't wrap "(# times)" only separate line on build page

          People

          • Assignee:
            mindless Alan Harder
            Reporter:
            torbent torbent
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: