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

NPE from MatrixConfiguration.newBuild

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      If you create a matrix project and start to build it, but then kill the execution before all the configurations have really run, and then call Queue.schedule on one of these configurations, you can get an exception:

      java.lang.NullPointerException
      	at hudson.matrix.MatrixConfiguration.newBuild(MatrixConfiguration.java:240)
      	at hudson.matrix.MatrixConfiguration.newBuild(MatrixConfiguration.java:70)
      	at hudson.model.AbstractProject.createExecutable(AbstractProject.java:1305)
      	at hudson.model.AbstractProject.createExecutable(AbstractProject.java:140)
      	at hudson.model.Executor.run(Executor.java:212)
      

      Here MatrixBuild lb is null.

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -

            https://github.com/jenkinsci/jenkins/commit/1c00d3f65b0aea70df1c6d64c60bf9541eb4454f fixes a probably related stack trace:

            java.lang.NullPointerException
                    at hudson.matrix.MatrixBuild$MatrixBuildExecution.doRun(MatrixBuild.java:371)
            
            Show
            jglick Jesse Glick added a comment - https://github.com/jenkinsci/jenkins/commit/1c00d3f65b0aea70df1c6d64c60bf9541eb4454f fixes a probably related stack trace: java.lang.NullPointerException at hudson.matrix.MatrixBuild$MatrixBuildExecution.doRun(MatrixBuild.java:371)
            Hide
            treydock Trey Dockendorf added a comment -

            Reproduced on Jenkins-1.509.2:

            Exception in thread "Executor #4 for master" java.lang.NullPointerException
                    at hudson.matrix.MatrixConfiguration.newBuild(MatrixConfiguration.java:243)
                    at hudson.matrix.MatrixConfiguration.newBuild(MatrixConfiguration.java:70)
                    at hudson.model.AbstractProject.createExecutable(AbstractProject.java:1308)
                    at hudson.model.AbstractProject.createExecutable(AbstractProject.java:140)
                    at hudson.model.Executor.run(Executor.java:212)
            

            Single node setup with 6 executors.

            Show
            treydock Trey Dockendorf added a comment - Reproduced on Jenkins-1.509.2: Exception in thread "Executor #4 for master" java.lang.NullPointerException at hudson.matrix.MatrixConfiguration.newBuild(MatrixConfiguration.java:243) at hudson.matrix.MatrixConfiguration.newBuild(MatrixConfiguration.java:70) at hudson.model.AbstractProject.createExecutable(AbstractProject.java:1308) at hudson.model.AbstractProject.createExecutable(AbstractProject.java:140) at hudson.model.Executor.run(Executor.java:212) Single node setup with 6 executors.
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #2703
            JENKINS-17728 Fixing another possible cause of an NPE. (Revision 06c211c6b425e313f808f9cbdd49d32f9c922a84)

            Result = UNSTABLE
            Jesse Glick : 06c211c6b425e313f808f9cbdd49d32f9c922a84
            Files :

            • core/src/main/java/jenkins/model/lazy/AbstractLazyLoadRunMap.java
            • core/src/main/java/hudson/model/AbstractProject.java
            • core/src/main/java/hudson/matrix/MatrixConfiguration.java
            • changelog.html
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #2703 JENKINS-17728 Fixing another possible cause of an NPE. (Revision 06c211c6b425e313f808f9cbdd49d32f9c922a84) Result = UNSTABLE Jesse Glick : 06c211c6b425e313f808f9cbdd49d32f9c922a84 Files : core/src/main/java/jenkins/model/lazy/AbstractLazyLoadRunMap.java core/src/main/java/hudson/model/AbstractProject.java core/src/main/java/hudson/matrix/MatrixConfiguration.java changelog.html
            Hide
            oleg_nenashev Oleg Nenashev added a comment - - edited

            The issue is being reproduced in 1.509.4
            As I see, the stacktrace equals to 1.509.2

            java.lang.NullPointerException
            at hudson.matrix.MatrixConfiguration.newBuild(MatrixConfiguration.java:243)
            at hudson.matrix.MatrixConfiguration.newBuild(MatrixConfiguration.java:70)
            at hudson.model.AbstractProject.createExecutable(AbstractProject.java:1317)
            at hudson.model.AbstractProject.createExecutable(AbstractProject.java:144)
            at hudson.model.Executor.run(Executor.java:212)

            Show
            oleg_nenashev Oleg Nenashev added a comment - - edited The issue is being reproduced in 1.509.4 As I see, the stacktrace equals to 1.509.2 java.lang.NullPointerException at hudson.matrix.MatrixConfiguration.newBuild(MatrixConfiguration.java:243) at hudson.matrix.MatrixConfiguration.newBuild(MatrixConfiguration.java:70) at hudson.model.AbstractProject.createExecutable(AbstractProject.java:1317) at hudson.model.AbstractProject.createExecutable(AbstractProject.java:144) at hudson.model.Executor.run(Executor.java:212)
            Hide
            jglick Jesse Glick added a comment -

            @oleg_nenashev I think there are actually two issues here. One that was fixed and backported to 1.509.2, one that was not but is fixed in 1.524 and later: https://github.com/jenkinsci/jenkins/commit/06c211c6b425e313f808f9cbdd49d32f9c922a84

            Show
            jglick Jesse Glick added a comment - @oleg_nenashev I think there are actually two issues here. One that was fixed and backported to 1.509.2, one that was not but is fixed in 1.524 and later: https://github.com/jenkinsci/jenkins/commit/06c211c6b425e313f808f9cbdd49d32f9c922a84

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                jglick Jesse Glick
              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: