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

          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)

          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)

          People

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

            Dates

              Created:
              Updated:
              Resolved: