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

Downstream-Ext: SCM polling (Perforce) hangs for project with a build in progress

    Details

    • Similar Issues:

      Description

      Just ran into a problem with downstream-ext 1.3, Hudson 1.342, Perforce plugin 1.0.17.

      I have a build X which I have set to trigger builds A, B, and C on success, but only if there are SCM changes. A, B, and C is the order that the downstream jobs are tested for SCM changes when I look at the logs.

      The problem is that when build B is already running, the polling appears to hang for job B. After many minutes, I aborted the job, which generated in the logs:

      FATAL: SCM polling aborted
      java.lang.InterruptedException
      	at java.lang.Object.wait(Native Method)
      	at java.lang.Object.wait(Object.java:485)
      	at hudson.slaves.WorkspaceList.acquire(WorkspaceList.java:173)
      	at hudson.model.AbstractProject.pollSCMChanges(AbstractProject.java:1062)
      	at hudson.plugins.downstream_ext.DownstreamDependency.shouldTriggerBuild(DownstreamDependency.java:38)
      	at hudson.tasks.BuildTrigger.execute(BuildTrigger.java:187)
      	at hudson.model.Build$RunnerImpl.cleanUp(Build.java:160)
      	at hudson.model.Run.run(Run.java:1240)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:122)
      Job-B has no SCM changes. Triggering skipped.
      

      The polling for C then proceeded without incident. This happened on two consecutive builds, so that's enough for me to not call it a random failure.

      Build B is a very long-running build... I haven't yet run into the situation where A or C were running at the time of the completion of X.

        Attachments

        1. downstream-ext.hpi
          29 kB
          kutzi
        2. downstream-ext.hpi
          29 kB
          kutzi

          Activity

          Hide
          kutzi kutzi added a comment -

          Hmm, seems to be a problem with the TaskListener which I pass to pollSCMChanges. Seems like it's implicitely required for this listener to be serializable. Not sure if this is a problem on my side or on the perforce side - I've posted a question to the developers list.

          However, I can do a workaround and use a TaskListener which will write the output to Stdout. Not sure where this will end up in a running Hudson app.

          Show
          kutzi kutzi added a comment - Hmm, seems to be a problem with the TaskListener which I pass to pollSCMChanges. Seems like it's implicitely required for this listener to be serializable. Not sure if this is a problem on my side or on the perforce side - I've posted a question to the developers list. However, I can do a workaround and use a TaskListener which will write the output to Stdout. Not sure where this will end up in a running Hudson app.
          Hide
          kutzi kutzi added a comment -

          Attached snapshot which should fix the serialization issue

          Show
          kutzi kutzi added a comment - Attached snapshot which should fix the serialization issue
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : kutzi
          Path:
          trunk/hudson/plugins/downstream-ext/src/main/java/hudson/plugins/downstream_ext/DownstreamDependency.java
          http://jenkins-ci.org/commit/29169
          Log:
          JENKINS-5406: fixed serialization issue with remote SCM clients

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : kutzi Path: trunk/hudson/plugins/downstream-ext/src/main/java/hudson/plugins/downstream_ext/DownstreamDependency.java http://jenkins-ci.org/commit/29169 Log: JENKINS-5406 : fixed serialization issue with remote SCM clients
          Hide
          oeuftete oeuftete added a comment -

          So far so good with the latest attached snapshot. The serialization errors have gone away. Downstream projects are being correctly detected as needing or not needing to be built based on SCM changes. I also had one scenario where a downstream project was in progress... the SCM polling occurred immediately (and correctly) after the in-progress job completed.

          I'll let you know if I run into any other issues. For now, I don't plan to specifically test it any more, but just check in on how it's working on our production jobs.

          Show
          oeuftete oeuftete added a comment - So far so good with the latest attached snapshot. The serialization errors have gone away. Downstream projects are being correctly detected as needing or not needing to be built based on SCM changes. I also had one scenario where a downstream project was in progress... the SCM polling occurred immediately (and correctly) after the in-progress job completed. I'll let you know if I run into any other issues. For now, I don't plan to specifically test it any more, but just check in on how it's working on our production jobs.
          Hide
          kutzi kutzi added a comment -

          So, I'm marking this as resolved now in 1.6.

          If problems show up, you can reopen this or open a new issue.

          Show
          kutzi kutzi added a comment - So, I'm marking this as resolved now in 1.6. If problems show up, you can reopen this or open a new issue.

            People

            • Assignee:
              kutzi kutzi
              Reporter:
              oeuftete oeuftete
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: