• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core

      If a computer or slave does not exist createLaucher throws a NPE.

      FATAL: null
      java.lang.NullPointerException
      	at hudson.model.Slave.createLauncher(Slave.java:347)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.createLauncher(AbstractBuild.java:617)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:553)
      	at hudson.model.Run.execute(Run.java:1665)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:246)
      

          [JENKINS-21999] Computer does not exist returns NPE

          Daniel Beck added a comment -

          What are the circumstances for this to happen?

          Daniel Beck added a comment - What are the circumstances for this to happen?

          Code changed in jenkins
          User: christ66
          Path:
          core/src/main/java/hudson/Launcher.java
          core/src/main/java/hudson/model/Slave.java
          http://jenkins-ci.org/commit/jenkins/d2a2ec589f4728fa2cfa35371155bce7cc95a0a7
          Log:
          [FIXED JENKINS-21999] If a slave node does not exist it will throw a
          null pointer exception. Instead we create a dummy launcher and return
          that if it is unable to get the slave node.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: christ66 Path: core/src/main/java/hudson/Launcher.java core/src/main/java/hudson/model/Slave.java http://jenkins-ci.org/commit/jenkins/d2a2ec589f4728fa2cfa35371155bce7cc95a0a7 Log: [FIXED JENKINS-21999] If a slave node does not exist it will throw a null pointer exception. Instead we create a dummy launcher and return that if it is unable to get the slave node.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          core/src/main/java/hudson/Launcher.java
          core/src/main/java/hudson/model/Slave.java
          http://jenkins-ci.org/commit/jenkins/e7c7bbd541d091923fceb6a2613881944ae8c810
          Log:
          Merge branch 'JENKINS-21999' of github.com:christ66/jenkins

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/Launcher.java core/src/main/java/hudson/model/Slave.java http://jenkins-ci.org/commit/jenkins/e7c7bbd541d091923fceb6a2613881944ae8c810 Log: Merge branch ' JENKINS-21999 ' of github.com:christ66/jenkins

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html http://jenkins-ci.org/commit/jenkins/43f218cd79223d96691a0957c7befed6f85ff868 Log: JENKINS-21999 Noting merge of #1145. Compare: https://github.com/jenkinsci/jenkins/compare/44a8ec110459...43f218cd7922

          dogfood added a comment -

          Integrated in jenkins_main_trunk #3278
          [FIXED JENKINS-21999] If a slave node does not exist it will throw a (Revision d2a2ec589f4728fa2cfa35371155bce7cc95a0a7)
          JENKINS-21999 Noting merge of #1145. (Revision 43f218cd79223d96691a0957c7befed6f85ff868)

          Result = SUCCESS
          schristou88 : d2a2ec589f4728fa2cfa35371155bce7cc95a0a7
          Files :

          • core/src/main/java/hudson/model/Slave.java
          • core/src/main/java/hudson/Launcher.java

          Jesse Glick : 43f218cd79223d96691a0957c7befed6f85ff868
          Files :

          • changelog.html

          dogfood added a comment - Integrated in jenkins_main_trunk #3278 [FIXED JENKINS-21999] If a slave node does not exist it will throw a (Revision d2a2ec589f4728fa2cfa35371155bce7cc95a0a7) JENKINS-21999 Noting merge of #1145. (Revision 43f218cd79223d96691a0957c7befed6f85ff868) Result = SUCCESS schristou88 : d2a2ec589f4728fa2cfa35371155bce7cc95a0a7 Files : core/src/main/java/hudson/model/Slave.java core/src/main/java/hudson/Launcher.java Jesse Glick : 43f218cd79223d96691a0957c7befed6f85ff868 Files : changelog.html

          Clinton Barr added a comment -

          Any idea when this will make it into an official release? I was actually making a comment yesterday evening when I saw these updates. We're having a similar problem:

          Basically, when we start a job on any given node, there's a high chance that the next job queued to run on the same node will attempt to start and then fail with this exception:

          FATAL: null
          java.lang.NullPointerException
          at hudson.model.Slave.createLauncher(Slave.java:348)
          at hudson.model.AbstractBuild$AbstractBuildExecution.createLauncher(AbstractBuild.java:564)
          at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:481)
          at hudson.model.Run.execute(Run.java:1688)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:231)

          I say "high chance" because this exception is fairly reproducible in our systems with some variation. Most often, this occurs in builds triggered used in the Parameterized Build Plugin.

          Does anyone have an idea if our issues might be solved by this fix as well?

          Clinton Barr added a comment - Any idea when this will make it into an official release? I was actually making a comment yesterday evening when I saw these updates. We're having a similar problem: Basically, when we start a job on any given node, there's a high chance that the next job queued to run on the same node will attempt to start and then fail with this exception: FATAL: null java.lang.NullPointerException at hudson.model.Slave.createLauncher(Slave.java:348) at hudson.model.AbstractBuild$AbstractBuildExecution.createLauncher(AbstractBuild.java:564) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:481) at hudson.model.Run.execute(Run.java:1688) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:231) I say "high chance" because this exception is fairly reproducible in our systems with some variation. Most often, this occurs in builds triggered used in the Parameterized Build Plugin . Does anyone have an idea if our issues might be solved by this fix as well?

          Daniel Beck added a comment -

          Clinton Barr: Unless delayed, the change will be in 1.559 to be released in 1.5 weeks or so.

          Daniel Beck added a comment - Clinton Barr: Unless delayed, the change will be in 1.559 to be released in 1.5 weeks or so.

          Jesse Glick added a comment -

          Also observed from Support Core:

          WARNING: Could not get content from 'File descriptors (Unix only)' for support bundle 
          java.lang.NullPointerException 
          	at hudson.model.Slave.createLauncher(Slave.java:347) 
          	at com.cloudbees.jenkins.support.impl.FileDescriptorLimit.addContents(FileDescriptorLimit.java:65) 
          	at com.cloudbees.jenkins.support.impl.FileDescriptorLimit.addContents(FileDescriptorLimit.java:56) 
          	at com.cloudbees.jenkins.support.SupportPlugin.writeBundle(SupportPlugin.java:264) 
          	at com.cloudbees.jenkins.support.SupportPlugin.writeBundle(SupportPlugin.java:227) 
          	at com.cloudbees.jenkins.support.SupportPlugin$PeriodicWorkImpl$1.run(SupportPlugin.java:543) 
          	at java.lang.Thread.run(Thread.java:780)
          

          Jesse Glick added a comment - Also observed from Support Core: WARNING: Could not get content from 'File descriptors (Unix only)' for support bundle java.lang.NullPointerException at hudson.model.Slave.createLauncher(Slave.java:347) at com.cloudbees.jenkins.support.impl.FileDescriptorLimit.addContents(FileDescriptorLimit.java:65) at com.cloudbees.jenkins.support.impl.FileDescriptorLimit.addContents(FileDescriptorLimit.java:56) at com.cloudbees.jenkins.support.SupportPlugin.writeBundle(SupportPlugin.java:264) at com.cloudbees.jenkins.support.SupportPlugin.writeBundle(SupportPlugin.java:227) at com.cloudbees.jenkins.support.SupportPlugin$PeriodicWorkImpl$1.run(SupportPlugin.java:543) at java.lang.Thread.run(Thread.java:780)

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/main/java/com/cloudbees/jenkins/support/impl/FileDescriptorLimit.java
          http://jenkins-ci.org/commit/support-core-plugin/44539f3a597ed5c37436be28d1087de0aacdd3be
          Log:
          JENKINS-21999 Workaround: ignore an offline slave.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/com/cloudbees/jenkins/support/impl/FileDescriptorLimit.java http://jenkins-ci.org/commit/support-core-plugin/44539f3a597ed5c37436be28d1087de0aacdd3be Log: JENKINS-21999 Workaround: ignore an offline slave.

          Code changed in jenkins
          User: christ66
          Path:
          core/src/main/java/hudson/Launcher.java
          core/src/main/java/hudson/model/Slave.java
          http://jenkins-ci.org/commit/jenkins/7946d9fa3e00295298294137a3b263d2c6def9ff
          Log:
          [FIXED JENKINS-21999] If a slave node does not exist it will throw a
          null pointer exception. Instead we create a dummy launcher and return
          that if it is unable to get the slave node.

          (cherry picked from commit d2a2ec589f4728fa2cfa35371155bce7cc95a0a7)

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: christ66 Path: core/src/main/java/hudson/Launcher.java core/src/main/java/hudson/model/Slave.java http://jenkins-ci.org/commit/jenkins/7946d9fa3e00295298294137a3b263d2c6def9ff Log: [FIXED JENKINS-21999] If a slave node does not exist it will throw a null pointer exception. Instead we create a dummy launcher and return that if it is unable to get the slave node. (cherry picked from commit d2a2ec589f4728fa2cfa35371155bce7cc95a0a7)

            schristou Steven Christou
            schristou Steven Christou
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: