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

Computer does not exist returns NPE

    XMLWordPrintable

Details

    Description

      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)
      

      Attachments

        Activity

          schristou Steven Christou created issue -
          schristou Steven Christou made changes -
          Field Original Value New Value
          Description 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}
          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}
          danielbeck Daniel Beck added a comment -

          What are the circumstances for this to happen?

          danielbeck 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_issue_link 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_issue_link SCM/JIRA link daemon made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] 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_issue_link 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_issue_link 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 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 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
          cbarr 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?

          cbarr 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?
          danielbeck 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.

          danielbeck 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.
          jglick 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)
          
          jglick 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)
          jglick Jesse Glick made changes -
          Labels lts-candidate
          olivergondza Oliver Gondža made changes -
          Labels lts-candidate 1.554.2-fixed lts-candidate
          olivergondza Oliver Gondža made changes -
          Labels 1.554.2-fixed lts-candidate 1.554.2-fixed

          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_issue_link 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_issue_link 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)
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 154076 ] JNJira + In-Review [ 194780 ]

          People

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

            Dates

              Created:
              Updated:
              Resolved: