• 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

          Steven Christou created issue -
          Steven Christou made changes -
          Description Original: If a computer does not exist, or a slave does not exist createLaucher throws a NPE.

          {noformat}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)
          {noformat}
          New: If a computer or slave does not exist createLaucher throws a NPE.

          {noformat}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)
          {noformat}

          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.
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

          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.

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

              Created:
              Updated:
              Resolved: