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

Failed to record SCM polling

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: perforce-plugin
    • Labels:
      None
    • Environment:
      Hudson 1.379, Perforce plugin 1.1.9
    • Similar Issues:

      Description

      I get a lot of these in my log today, having upgraded to 1.1.9 yesterday:

      Oct 5, 2010 10:28:06 AM hudson.triggers.SCMTrigger$Runner runPolling
      SEVERE: Failed to record SCM polling
      java.lang.NullPointerException
      at hudson.plugins.perforce.PerforceSCM.getEffectiveClientName(PerforceSCM.java:1071)
      at hudson.plugins.perforce.PerforceSCM.getPerforceWorkspace(PerforceSCM.java:953)
      at hudson.plugins.perforce.PerforceSCM.pollChanges(PerforceSCM.java:755)
      at hudson.scm.SCM.poll(SCM.java:372)
      at hudson.model.AbstractProject.poll(AbstractProject.java:1208)
      at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:417)
      at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:446)
      at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118)
      at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)

      I haven't been able to determine which jobs it fails for, so I can't tell if it's only for remote clients. I do have many of those, though.

        Attachments

          Activity

          Hide
          rpetti Rob Petti added a comment -

          So it looks like this is caused by a slave that has been deleted, or a job that has never been run before. Polling works by grabbing the last node the job was run on, and executing the perforce commands there. It might be time to refactor this to use an algorithm that's closer to what's used for selecting nodes to execute builds.

          Show
          rpetti Rob Petti added a comment - So it looks like this is caused by a slave that has been deleted, or a job that has never been run before. Polling works by grabbing the last node the job was run on, and executing the perforce commands there. It might be time to refactor this to use an algorithm that's closer to what's used for selecting nodes to execute builds.
          Hide
          torbent torbent added a comment -

          Mm yes, I have actually deleted a slave yesterday. Let's call it a "slave refactoring"

          (Might this explain JENKINS-7664 as well?)

          Show
          torbent torbent added a comment - Mm yes, I have actually deleted a slave yesterday. Let's call it a "slave refactoring" (Might this explain JENKINS-7664 as well?)
          Hide
          rpetti Rob Petti added a comment -

          I don't think so. When you run the build, the slave is selected normally by hudson, so there aren't any issues with missing slaves.

          Show
          rpetti Rob Petti added a comment - I don't think so. When you run the build, the slave is selected normally by hudson, so there aren't any issues with missing slaves.
          Hide
          torbent torbent added a comment -

          Is there by any chance a way to "reset" this memory of builds? Perform a manual build, perhaps?

          Show
          torbent torbent added a comment - Is there by any chance a way to "reset" this memory of builds? Perform a manual build, perhaps?
          Hide
          rpetti Rob Petti added a comment -

          If you can find the job, then yes, running it will resolve the issue. It will update what is returned by the job when the plugin asks it what node it last ran on.

          I'm close to an actual fix for this, just gotta test it real quick.

          Show
          rpetti Rob Petti added a comment - If you can find the job, then yes, running it will resolve the issue. It will update what is returned by the job when the plugin asks it what node it last ran on. I'm close to an actual fix for this, just gotta test it real quick.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : rpetti
          Path:
          trunk/hudson/plugins/perforce/src/main/java/hudson/plugins/perforce/PerforceSCM.java
          http://jenkins-ci.org/commit/35520
          Log:
          [FIXED JENKINS-7665] change polling logic to fall back to another node when the last one used to build is unavailable.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : rpetti Path: trunk/hudson/plugins/perforce/src/main/java/hudson/plugins/perforce/PerforceSCM.java http://jenkins-ci.org/commit/35520 Log: [FIXED JENKINS-7665] change polling logic to fall back to another node when the last one used to build is unavailable.
          Hide
          torbent torbent added a comment -

          Haven't seen this one in a while.

          Show
          torbent torbent added a comment - Haven't seen this one in a while.

            People

            • Assignee:
              rpetti Rob Petti
              Reporter:
              torbent torbent
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: