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

Fix NPE when calculating culprits

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: core
    • Labels:
    • Environment:
      Jenkins 2.60.1
    • Similar Issues:

      Description

      In the changes introduced in 977f922136e8bcdad42ad1448df45a36b2e64f68, it appears that a NPE was introduced here as p can be null.

      FATAL: null
      java.lang.NullPointerException
      	at hudson.model.AbstractBuild.calculateCulprits(AbstractBuild.java:340)
      	at jenkins.scm.RunWithSCM.getCulprits(RunWithSCM.java:93)
      	at jenkins.scm.RunWithSCM.calculateCulprits(RunWithSCM.java:129)
      	at hudson.model.AbstractBuild.calculateCulprits(AbstractBuild.java:335)
      	at jenkins.scm.RunWithSCM.getCulprits(RunWithSCM.java:93)
      	at jenkins.scm.RunWithSCM.calculateCulprits(RunWithSCM.java:129)
      	at hudson.model.AbstractBuild.calculateCulprits(AbstractBuild.java:335)
      	at jenkins.scm.RunWithSCM.getCulprits(RunWithSCM.java:93)
      	at jenkins.scm.RunWithSCM.calculateCulprits(RunWithSCM.java:129)
      	at hudson.model.AbstractBuild.calculateCulprits(AbstractBuild.java:335)
      	at jenkins.scm.RunWithSCM.getCulprits(RunWithSCM.java:93)
      	at jenkins.scm.RunWithSCM.calculateCulprits(RunWithSCM.java:129)
      	at hudson.model.AbstractBuild.calculateCulprits(AbstractBuild.java:335)
      	at jenkins.scm.RunWithSCM.getCulprits(RunWithSCM.java:93)
      	at jenkins.scm.RunWithSCM.calculateCulprits(RunWithSCM.java:129)
      	at hudson.model.AbstractBuild.calculateCulprits(AbstractBuild.java:335)
      	at jenkins.scm.RunWithSCM.getCulprits(RunWithSCM.java:93)
      	at jenkins.scm.RunWithSCM.calculateCulprits(RunWithSCM.java:129)
      	at hudson.model.AbstractBuild.calculateCulprits(AbstractBuild.java:335)
      	at jenkins.scm.RunWithSCM.getCulprits(RunWithSCM.java:93)
      	at jenkins.scm.RunWithSCM.calculateCulprits(RunWithSCM.java:129)
      	at hudson.model.AbstractBuild.calculateCulprits(AbstractBuild.java:335)
      	at jenkins.scm.RunWithSCM.getCulprits(RunWithSCM.java:93)
      	at jenkins.scm.RunWithSCM.calculateCulprits(RunWithSCM.java:129)
      	at hudson.model.AbstractBuild.calculateCulprits(AbstractBuild.java:335)
      	at jenkins.scm.RunWithSCM.getCulprits(RunWithSCM.java:93)
      	at jenkins.scm.RunWithSCM.calculateCulprits(RunWithSCM.java:129)
      	at hudson.model.AbstractBuild.calculateCulprits(AbstractBuild.java:335)
      	at jenkins.scm.RunWithSCM.getCulprits(RunWithSCM.java:93)
      	at jenkins.scm.RunWithSCM.calculateCulprits(RunWithSCM.java:129)
      	at hudson.model.AbstractBuild.calculateCulprits(AbstractBuild.java:335)
      	at jenkins.scm.RunWithSCM.getCulprits(RunWithSCM.java:93)
      	at jenkins.scm.RunWithSCM.calculateCulprits(RunWithSCM.java:129)
      	at hudson.model.AbstractBuild.calculateCulprits(AbstractBuild.java:335)
      	at jenkins.scm.RunWithSCM.getCulprits(RunWithSCM.java:93)
      	at jenkins.scm.RunWithSCM.calculateCulprits(RunWithSCM.java:129)
      	at hudson.model.AbstractBuild.calculateCulprits(AbstractBuild.java:335)
      	at jenkins.scm.RunWithSCM.getCulprits(RunWithSCM.java:93)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:625)
      	at hudson.model.Run.execute(Run.java:1760)
      	at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:405)
      

        Attachments

          Activity

          jcmoore Curt Moore created issue -
          Hide
          jcmoore Curt Moore added a comment - - edited

          I have submitted PR 2941 to address this issue in master and PR 2942 in the stable-2.60 branch.

          Show
          jcmoore Curt Moore added a comment - - edited I have submitted PR 2941 to address this issue in master and PR 2942 in the stable-2.60 branch.
          oleg_nenashev Oleg Nenashev made changes -
          Field Original Value New Value
          Assignee Curt Moore [ jcmoore ]
          oleg_nenashev Oleg Nenashev made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          oleg_nenashev Oleg Nenashev made changes -
          Status In Progress [ 3 ] In Review [ 10005 ]
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Curt Moore
          Path:
          core/src/main/java/hudson/model/AbstractBuild.java
          http://jenkins-ci.org/commit/jenkins/245ad0bdb17ebd33eca81c099e8a19a893c049e3
          Log:
          JENKINS-45516 Fix null pointer exception when checking for previous completed build

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Curt Moore Path: core/src/main/java/hudson/model/AbstractBuild.java http://jenkins-ci.org/commit/jenkins/245ad0bdb17ebd33eca81c099e8a19a893c049e3 Log: JENKINS-45516 Fix null pointer exception when checking for previous completed build
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          core/src/main/java/hudson/model/AbstractBuild.java
          http://jenkins-ci.org/commit/jenkins/e77048893a7ce73b0a55cf444ff3a2a9ed272bfb
          Log:
          Merge pull request #2941 from jcmoore3/JENKINS-45516

          JENKINS-45516 Fix null pointer exception when checking for previous completed build

          Compare: https://github.com/jenkinsci/jenkins/compare/c5f7d23e9dd2...e77048893a7c

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: core/src/main/java/hudson/model/AbstractBuild.java http://jenkins-ci.org/commit/jenkins/e77048893a7ce73b0a55cf444ff3a2a9ed272bfb Log: Merge pull request #2941 from jcmoore3/ JENKINS-45516 JENKINS-45516 Fix null pointer exception when checking for previous completed build Compare: https://github.com/jenkinsci/jenkins/compare/c5f7d23e9dd2...e77048893a7c
          jcmoore Curt Moore made changes -
          Labels lts-candidate
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          It has been released in 2.71

          Show
          oleg_nenashev Oleg Nenashev added a comment - It has been released in 2.71
          oleg_nenashev Oleg Nenashev made changes -
          Resolution Fixed [ 1 ]
          Status In Review [ 10005 ] Resolved [ 5 ]
          Hide
          tkj ian s added a comment -

          Will this not be fixed in 2.60? We've had a lot of issues with this and redhat-stable is still on 2.60

          Show
          tkj ian s added a comment - Will this not be fixed in 2.60? We've had a lot of issues with this and redhat-stable is still on 2.60
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          ian s the issue is an LTS candidate. It will likely get backported to 2.60.3 if there is no regressions

          Show
          oleg_nenashev Oleg Nenashev added a comment - ian s the issue is an LTS candidate. It will likely get backported to 2.60.3 if there is no regressions
          Hide
          tkj ian s added a comment -

          Oleg Nenashev oh, i see. Thanks for clarifying

          Show
          tkj ian s added a comment - Oleg Nenashev oh, i see. Thanks for clarifying
          Hide
          jglick Jesse Glick added a comment -

          For whatever reason (Oliver Gondža?) this was not considered for 2.60.x, which is now closed, and as the next LTS is 2.73.1, I suppose lts-candidate can be removed.

          Show
          jglick Jesse Glick added a comment - For whatever reason ( Oliver Gondža ?) this was not considered for 2.60.x, which is now closed, and as the next LTS is 2.73.1, I suppose lts-candidate can be removed.
          oleg_nenashev Oleg Nenashev made changes -
          Labels lts-candidate
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Yep. I was busy and didn't double-check if all possible changes for 2.60.3 got backported.

           

          Show
          oleg_nenashev Oleg Nenashev added a comment - Yep. I was busy and didn't double-check if all possible changes for 2.60.3 got backported.  
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Oliver Gondža
          Path:
          content/_data/changelogs/lts.yml
          http://jenkins-ci.org/commit/jenkins.io/b2e34180b23e401165008389e58f4fa57e506b9d
          Log:
          Nothing JENKINS-45516

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oliver Gondža Path: content/_data/changelogs/lts.yml http://jenkins-ci.org/commit/jenkins.io/b2e34180b23e401165008389e58f4fa57e506b9d Log: Nothing JENKINS-45516
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Oliver Gondža
          Path:
          content/_data/changelogs/lts.yml
          http://jenkins-ci.org/commit/jenkins.io/c599c45154a77a11fe2126a71cf47ca9293bf5d6
          Log:
          Noting JENKINS-45516

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oliver Gondža Path: content/_data/changelogs/lts.yml http://jenkins-ci.org/commit/jenkins.io/c599c45154a77a11fe2126a71cf47ca9293bf5d6 Log: Noting JENKINS-45516
          Hide
          olivergondza Oliver Gondža added a comment -

          The fix is included: https://github.com/jenkinsci/jenkins/commits/stable-2.60 (be6d02e648d5c41e5b16e797bdc55873d0f56c56). I must have forgotten updating the tags here. Amending changelog: https://github.com/jenkins-infra/jenkins.io/pull/1100

          Show
          olivergondza Oliver Gondža added a comment - The fix is included: https://github.com/jenkinsci/jenkins/commits/stable-2.60 (be6d02e648d5c41e5b16e797bdc55873d0f56c56). I must have forgotten updating the tags here. Amending changelog: https://github.com/jenkins-infra/jenkins.io/pull/1100
          Hide
          jglick Jesse Glick added a comment -

          Adding label accordingly.

          Show
          jglick Jesse Glick added a comment - Adding label accordingly.
          jglick Jesse Glick made changes -
          Labels 2.60.3-fixed
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          content/_data/changelogs/lts.yml
          http://jenkins-ci.org/commit/jenkins.io/879c82c2d49fedb8ec5ab9bc02ebf129a0b12b0f
          Log:
          Merge pull request #1100 from jenkins-infra/olivergondza-patch-1

          Noting JENKINS-45516

          Compare: https://github.com/jenkins-infra/jenkins.io/compare/7b63b9f4d82a...879c82c2d49f

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: content/_data/changelogs/lts.yml http://jenkins-ci.org/commit/jenkins.io/879c82c2d49fedb8ec5ab9bc02ebf129a0b12b0f Log: Merge pull request #1100 from jenkins-infra/olivergondza-patch-1 Noting JENKINS-45516 Compare: https://github.com/jenkins-infra/jenkins.io/compare/7b63b9f4d82a...879c82c2d49f

            People

            Assignee:
            jcmoore Curt Moore
            Reporter:
            jcmoore Curt Moore
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: