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

NPE in Slave.createLauncher() for Matrix and Pipeline jobs

    Details

    • Type: Bug
    • Status: Fixed but Unreleased (View Workflow)
    • Priority: Major
    • Resolution: Duplicate
    • Component/s: core
    • Labels:
    • Environment:
      Jenkins ver. 1.566m Java 7u25, Windows Server 2008 master, Debian & Ubuntu slaves
    • Similar Issues:
    • Released As:
      Jenkins 2.60.3

      Description

      Jenkins failed some test on 2 configurations out of a 5-configuration matrix build, with the other 3 builds completing normally. Both failed slaves leave no additional information for diagnosing the root cause:

      13:49:24 Started by upstream project "fast-tests" build number 920
      13:49:24 originally caused by:
      13:49:24  Started by user User
      13:49:24 FATAL: null
      13:49:24 java.lang.NullPointerException
      13:49:24 	at hudson.model.Slave.createLauncher(Slave.java:359)
      13:49:24 	at hudson.model.AbstractBuild$AbstractBuildExecution.createLauncher(AbstractBuild.java:559)
      13:49:24 	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:476)
      13:49:24 	at hudson.model.Run.execute(Run.java:1710)
      13:49:24 	at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
      13:49:24 	at hudson.model.ResourceController.execute(ResourceController.java:88)
      13:49:24 	at hudson.model.Executor.run(Executor.java:231)
      

      JENKINS-21999 seemed to be a similar issue but the line numbers have changed and that issue was fixed, whereas this issue still occurs.

        Attachments

          Issue Links

            Activity

            Hide
            danielbeck Daniel Beck added a comment -

            It's weird how a job can be scheduled for a node before it could be determined whether it's Unix.

            Show
            danielbeck Daniel Beck added a comment - It's weird how a job can be scheduled for a node before it could be determined whether it's Unix.
            Hide
            trejkaz trejkaz added a comment - - edited

            My guess would be that despite isUnix being set in a synchronized{} block, isUnix() is not synchronised, so a second thread getting the value might be getting an out of date value.

            Show
            trejkaz trejkaz added a comment - - edited My guess would be that despite isUnix being set in a synchronized{} block, isUnix() is not synchronised, so a second thread getting the value might be getting an out of date value.
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            Another stacktrace for Jenkins Pipeline:

            java.lang.NullPointerException 
            at hudson.model.Slave.createLauncher(Slave.java:417) 
            at org.jenkinsci.plugins.workflow.support.DefaultStepContext.makeLauncher(DefaultStepContext.java:112) 
            at org.jenkinsci.plugins.workflow.support.DefaultStepContext.get(DefaultStepContext.java:68) 
            at org.jenkinsci.plugins.workflow.steps.StepDescriptor.checkContextAvailability(StepDescriptor.java:251) 
            at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:179) 
            at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:126) 
            at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:108) 
            at groovy.lang.GroovyObject$invokeMethod.call(Unknown Source)
            
            Show
            oleg_nenashev Oleg Nenashev added a comment - Another stacktrace for Jenkins Pipeline: java.lang.NullPointerException at hudson.model.Slave.createLauncher(Slave.java:417) at org.jenkinsci.plugins.workflow.support.DefaultStepContext.makeLauncher(DefaultStepContext.java:112) at org.jenkinsci.plugins.workflow.support.DefaultStepContext.get(DefaultStepContext.java:68) at org.jenkinsci.plugins.workflow.steps.StepDescriptor.checkContextAvailability(StepDescriptor.java:251) at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:179) at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:126) at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:108) at groovy.lang.GroovyObject$invokeMethod.call(Unknown Source)
            Hide
            jglick Jesse Glick added a comment -

            Duplicated by JENKINS-38527 perhaps?

            Show
            jglick Jesse Glick added a comment - Duplicated by  JENKINS-38527 perhaps?
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            Likely

            Show
            oleg_nenashev Oleg Nenashev added a comment - Likely

              People

              • Assignee:
                oleg_nenashev Oleg Nenashev
                Reporter:
                trejkaz trejkaz
              • Votes:
                2 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: