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

ERROR: Failed to record SCM polling nullpointer exception when building on a slave while the number of executors on the master is set to 0

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: mercurial-plugin
    • Labels:
      None
    • Environment:
      Ubuntu 9.10 Slave
    • Similar Issues:

      Description

      I have my mercurial build setup on a ubuntu slave, and get the following in polling log if the number of executors on the master is set to 0.

      ERROR: Failed to record SCM polling
      java.lang.NullPointerException
      at hudson.model.Run.getEnvironment(Run.java:1648)
      at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:663)
      at hudson.plugins.mercurial.MercurialSCM.compareRemoteRevisionWith(MercurialSCM.java:250)
      at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:351)
      at hudson.scm.SCM.poll(SCM.java:368)
      at hudson.model.AbstractProject.poll(AbstractProject.java:1153)
      at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:330)
      at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:359)
      at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:619)

        Attachments

          Issue Links

            Activity

            Hide
            dhavalshah dhavalshah added a comment -

            as soon as change the number of executors back to 0, the null pointer returns.

            -Dhaval

            Show
            dhavalshah dhavalshah added a comment - as soon as change the number of executors back to 0, the null pointer returns. -Dhaval
            Hide
            stefanbrausch Stefan Brausch added a comment -

            Same issue with the GIT-Plugin 1.1 on Hudson 1.376:
            Started on Oct 13, 2010 6:09:30 PM
            Using strategy: Default
            [poll] Last Build : #1475
            [poll] Last Built Revision: Revision f71aa68147de29a707e2cc2075b97648ff501612
            ERROR: Failed to record SCM polling
            java.lang.NullPointerException
            at hudson.model.Run.getEnvironment(Run.java:1673)
            at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:682)
            at hudson.plugins.git.GitSCM.pollChanges(GitSCM.java:420)
            at hudson.scm.SCM.poll(SCM.java:369)
            at hudson.model.AbstractProject.poll(AbstractProject.java:1195)
            at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:355)
            at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:384)
            at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118)
            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
            at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
            at java.util.concurrent.FutureTask.run(FutureTask.java:138)
            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
            at java.lang.Thread.run(Thread.java:619)

            Show
            stefanbrausch Stefan Brausch added a comment - Same issue with the GIT-Plugin 1.1 on Hudson 1.376: Started on Oct 13, 2010 6:09:30 PM Using strategy: Default [poll] Last Build : #1475 [poll] Last Built Revision: Revision f71aa68147de29a707e2cc2075b97648ff501612 ERROR: Failed to record SCM polling java.lang.NullPointerException at hudson.model.Run.getEnvironment(Run.java:1673) at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:682) at hudson.plugins.git.GitSCM.pollChanges(GitSCM.java:420) at hudson.scm.SCM.poll(SCM.java:369) at hudson.model.AbstractProject.poll(AbstractProject.java:1195) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:355) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:384) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:619)
            Hide
            recampbell Ryan Campbell added a comment -

            We are also seeing this issue with a master that has no executors. I believe it's due to this change:

            http://fisheye.jenkins-ci.org/changelog/Hudson?cs=26453

            Perhaps hudson.model.Run.getEnvironment(TaskListener) should do a null check on the call to Computer.currentComputer() to handle the case where the build is not running?

            Show
            recampbell Ryan Campbell added a comment - We are also seeing this issue with a master that has no executors. I believe it's due to this change: http://fisheye.jenkins-ci.org/changelog/Hudson?cs=26453 Perhaps hudson.model.Run.getEnvironment(TaskListener) should do a null check on the call to Computer.currentComputer() to handle the case where the build is not running?
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in hudson
            User: : kohsuke
            Path:
            trunk/hudson/plugins/mercurial/src/main/java/hudson/plugins/mercurial/MercurialSCM.java
            trunk/hudson/plugins/mercurial/src/main/java/hudson/plugins/mercurial/MercurialTagAction.java
            http://jenkins-ci.org/commit/36945
            Log:
            [FIXED JENKINS-6126] It doesn't make sense to call Build.getEnvironment() if the build isn't in progress.
            The polling should compare revisions in the context of the same branch.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : kohsuke Path: trunk/hudson/plugins/mercurial/src/main/java/hudson/plugins/mercurial/MercurialSCM.java trunk/hudson/plugins/mercurial/src/main/java/hudson/plugins/mercurial/MercurialTagAction.java http://jenkins-ci.org/commit/36945 Log: [FIXED JENKINS-6126] It doesn't make sense to call Build.getEnvironment() if the build isn't in progress. The polling should compare revisions in the context of the same branch.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in hudson
            User: : kohsuke
            Path:
            trunk/hudson/plugins/mercurial/src/main/java/hudson/plugins/mercurial/MercurialSCM.java
            trunk/hudson/plugins/mercurial/src/main/java/hudson/plugins/mercurial/MercurialTagAction.java
            trunk/hudson/plugins/mercurial/src/test/java/hudson/plugins/mercurial/MercurialSCMTest.java
            http://jenkins-ci.org/commit/36951
            Log:
            [FIXED JENKINS-6126] If the SCM configuration is changed and point to a different branch, then the polling should honor that. In that sense using MercurialSCM.branch is correct.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : kohsuke Path: trunk/hudson/plugins/mercurial/src/main/java/hudson/plugins/mercurial/MercurialSCM.java trunk/hudson/plugins/mercurial/src/main/java/hudson/plugins/mercurial/MercurialTagAction.java trunk/hudson/plugins/mercurial/src/test/java/hudson/plugins/mercurial/MercurialSCMTest.java http://jenkins-ci.org/commit/36951 Log: [FIXED JENKINS-6126] If the SCM configuration is changed and point to a different branch, then the polling should honor that. In that sense using MercurialSCM.branch is correct.

              People

              • Assignee:
                mfriedenhagen Mirko Friedenhagen
                Reporter:
                dhavalshah dhavalshah
              • Votes:
                5 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: