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

Null pointer exception fails job with warnings-ng 8.4.2

      A freestyle job that builds the Jenkins git plugin fails with a null pointer exception after updating to warnings-ng plugin 8.4.2.

      The null pointer exception is:

      [SpotBugs] No filter has been set, publishing all 0 issues
      ERROR: Build step failed with exception
      java.lang.NullPointerException
      	at edu.hm.hafner.analysis.Report.addAll(Report.java:174)
      	at edu.hm.hafner.analysis.Report.copyIssuesAndProperties(Report.java:660)
      	at edu.hm.hafner.analysis.Report.addAll(Report.java:194)
      	at io.jenkins.plugins.analysis.core.model.AnalysisResult.getIssues(AnalysisResult.java:413)
      	at java.util.Optional.map(Optional.java:215)
      	at io.jenkins.plugins.analysis.core.model.AnalysisHistory.getIssues(AnalysisHistory.java:142)
      	at io.jenkins.plugins.analysis.core.model.DeltaReport.<init>(DeltaReport.java:48)
      	at io.jenkins.plugins.analysis.core.steps.IssuesPublisher.attachAction(IssuesPublisher.java:110)
      	at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.publishResult(IssuesRecorder.java:721)
      	at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.record(IssuesRecorder.java:651)
      	at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.perform(IssuesRecorder.java:617)
      	at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.perform(IssuesRecorder.java:595)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
      	at hudson.model.Build$BuildExecution.post2(Build.java:186)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
      	at hudson.model.Run.execute(Run.java:1919)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:428)
      Build step 'Record compiler warnings and static analysis results' marked build as failure
      

      Same null pointer exception also fails pipeline jobs for the git plugin.

          [JENKINS-63659] Null pointer exception fails job with warnings-ng 8.4.2

          Mark Waite created issue -
          Mark Waite made changes -
          Summary Original: Null pointer exception fails freestyle job with warnings-ng 8.4.2 New: Null pointer exception fails job with warnings-ng 8.4.2
          Mark Waite made changes -
          Description Original: A [freestyle job|https://github.com/MarkEWaite/docker-lfs/blob/d16cba84005ea33abd6146a6fd6ac6b127e61729/ref/jobs/Git-Folder/jobs/git-plugin/config.xml#L4] that builds the Jenkins git plugin fails with a null pointer exception after updating to warnings-ng plugin 8.4.2.

          The null pointer exception is:

          {noformat}
          [SpotBugs] No filter has been set, publishing all 0 issues
          ERROR: Build step failed with exception
          java.lang.NullPointerException
          at edu.hm.hafner.analysis.Report.addAll(Report.java:174)
          at edu.hm.hafner.analysis.Report.copyIssuesAndProperties(Report.java:660)
          at edu.hm.hafner.analysis.Report.addAll(Report.java:194)
          at io.jenkins.plugins.analysis.core.model.AnalysisResult.getIssues(AnalysisResult.java:413)
          at java.util.Optional.map(Optional.java:215)
          at io.jenkins.plugins.analysis.core.model.AnalysisHistory.getIssues(AnalysisHistory.java:142)
          at io.jenkins.plugins.analysis.core.model.DeltaReport.<init>(DeltaReport.java:48)
          at io.jenkins.plugins.analysis.core.steps.IssuesPublisher.attachAction(IssuesPublisher.java:110)
          at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.publishResult(IssuesRecorder.java:721)
          at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.record(IssuesRecorder.java:651)
          at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.perform(IssuesRecorder.java:617)
          at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.perform(IssuesRecorder.java:595)
          at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
          at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
          at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
          at hudson.model.Build$BuildExecution.post2(Build.java:186)
          at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
          at hudson.model.Run.execute(Run.java:1919)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          at hudson.model.ResourceController.execute(ResourceController.java:97)
          at hudson.model.Executor.run(Executor.java:428)
          Build step 'Record compiler warnings and static analysis results' marked build as failure
          {noformat}
          New: A [freestyle job|https://github.com/MarkEWaite/docker-lfs/blob/d16cba84005ea33abd6146a6fd6ac6b127e61729/ref/jobs/Git-Folder/jobs/git-plugin/config.xml#L4] that builds the Jenkins git plugin fails with a null pointer exception after updating to warnings-ng plugin 8.4.2.

          The null pointer exception is:

          {noformat}
          [SpotBugs] No filter has been set, publishing all 0 issues
          ERROR: Build step failed with exception
          java.lang.NullPointerException
          at edu.hm.hafner.analysis.Report.addAll(Report.java:174)
          at edu.hm.hafner.analysis.Report.copyIssuesAndProperties(Report.java:660)
          at edu.hm.hafner.analysis.Report.addAll(Report.java:194)
          at io.jenkins.plugins.analysis.core.model.AnalysisResult.getIssues(AnalysisResult.java:413)
          at java.util.Optional.map(Optional.java:215)
          at io.jenkins.plugins.analysis.core.model.AnalysisHistory.getIssues(AnalysisHistory.java:142)
          at io.jenkins.plugins.analysis.core.model.DeltaReport.<init>(DeltaReport.java:48)
          at io.jenkins.plugins.analysis.core.steps.IssuesPublisher.attachAction(IssuesPublisher.java:110)
          at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.publishResult(IssuesRecorder.java:721)
          at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.record(IssuesRecorder.java:651)
          at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.perform(IssuesRecorder.java:617)
          at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.perform(IssuesRecorder.java:595)
          at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
          at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
          at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
          at hudson.model.Build$BuildExecution.post2(Build.java:186)
          at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
          at hudson.model.Run.execute(Run.java:1919)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          at hudson.model.ResourceController.execute(ResourceController.java:97)
          at hudson.model.Executor.run(Executor.java:428)
          Build step 'Record compiler warnings and static analysis results' marked build as failure
          {noformat}

          Same null pointer exception also fails pipeline jobs for the git plugin.

          Ulli Hafner added a comment -

          Is it possible that you updated analysis-model to 9.0.0 and then run a build before you updated to warnings 8.4.2? In those builds the serialization was broken. So it should disappear if you delete these builds and retry. See https://github.com/jenkinsci/warnings-ng-plugin/releases/tag/v8.4.2

          Ulli Hafner added a comment - Is it possible that you updated analysis-model to 9.0.0 and then run a build before you updated to warnings 8.4.2? In those builds the serialization was broken. So it should disappear if you delete these builds and retry. See https://github.com/jenkinsci/warnings-ng-plugin/releases/tag/v8.4.2

          Mark Waite added a comment - - edited

          I upgraded to analysis model api plugin 9.0.0 Wed Sep 9 17:22:50 2020 -0600 . I updated to warnings ng plugin 8.4.2 Fri Sep 11 16:39:52 2020 -0600. The freestyle and pipeline jobs that reported the null pointer exception had entries in their job history that were generated after the installation of analysis model api plugin 9.0.0 and before the installation of warnings ng plugin 8.4.2.

          I'm not sure how I will locate all the builds that I need to delete other than by trail and error. I assume I'll need a technique like this:

          • Search for the detected failing jobs in Jenkins and delete their builds that were after Wed Sep 9 17:22:50 2020 -0600
          • Install warnings-ng plugin 8.4.2
          • Run those jobs again and see if they now pass

          Have I understood the process?

          If that process is correct, then I have relatively few jobs that I need to delete, as identified by

          $ grep -l -F -r 'io.jenkins.plugins.analysis.core.model.AnalysisHistory.getIssues' .
          ./builds/Git-Folder/git-plugin-multi-platform/jdk=jdk8,os=FreeBSD-12/50/log
          ./builds/Git-Folder/git-plugin-multi-platform/jdk=jdk8,os=Ubuntu-20/50/log
          ./builds/Git-Folder/git-plugin-multi-platform/jdk=jdk8,os=s390x/50/log
          ./builds/Git-Folder/git-plugin-multi-platform/jdk=jdk8,os=Ubuntu-18/50/log
          ./builds/Git-Folder/git-plugin-multi-platform/jdk=jdk8,os=CentOS-7/50/log
          ./builds/Git-Folder/git-plugin-multi-platform/jdk=jdk8,os=Debian-10/50/log
          ./builds/Git-Folder/git-plugin-multi-platform/jdk=jdk8,os=Debian-9/50/log
          ./builds/Git-Folder/git-plugin-multi-platform/jdk=jdk8,os=CentOS-8/50/log
          ./builds/Git-Folder/git-plugin-multi-platform/jdk=jdk8,os=windows/50/log
          ./builds/Git-Folder/git-plugin-multi-platform/jdk=jdk8,os=Debian-testing/50/log
          ./builds/Git-Folder/git-pipeline-bitbucket/master/30/log
          ./builds/Git-Folder/git-pipeline-bitbucket/master/30/workflow/flowNodeStore.xml
          ./builds/Git-Folder/git-plugin-no-coverage/31/log
          ./builds/Git-Folder/git-plugin-pipeline/JENKINS-37263/2/log
          ./builds/Git-Folder/git-plugin-pipeline/JENKINS-37263/2/workflow/flowNodeStore.xml
          ./builds/Git-Folder/git-plugin-pipeline/JENKINS-37263/1/log
          ./builds/Git-Folder/git-plugin-pipeline/JENKINS-37263/1/workflow/flowNodeStore.xml
          ./builds/Git-Folder/git-pipeline-github/JENKINS-37263/1/log
          ./builds/Git-Folder/git-pipeline-github/JENKINS-37263/1/workflow/flowNodeStore.xml
          ./builds/Git-Folder/git-pipeline-github/master/35/log
          ./builds/Git-Folder/git-pipeline-github/master/35/workflow/flowNodeStore.xml
          ./builds/Git-Folder/git-plugin-on-branch/14/log
          

          That pattern match search through the Jenkins logs shows the jobs that are affected. I visited each of those jobs and removed all builds in the window of time between install of analysis-api plugin 9.0.0 and warnings-ng plugin 8.4.2. I've upgraded the warnings-ng plugin to 8.4.2 and restarted the Jenkins server. Jobs are running now.

          Mark Waite added a comment - - edited I upgraded to analysis model api plugin 9.0.0 Wed Sep 9 17:22:50 2020 -0600 . I updated to warnings ng plugin 8.4.2 Fri Sep 11 16:39:52 2020 -0600. The freestyle and pipeline jobs that reported the null pointer exception had entries in their job history that were generated after the installation of analysis model api plugin 9.0.0 and before the installation of warnings ng plugin 8.4.2. I'm not sure how I will locate all the builds that I need to delete other than by trail and error. I assume I'll need a technique like this: Search for the detected failing jobs in Jenkins and delete their builds that were after Wed Sep 9 17:22:50 2020 -0600 Install warnings-ng plugin 8.4.2 Run those jobs again and see if they now pass Have I understood the process? If that process is correct, then I have relatively few jobs that I need to delete, as identified by $ grep -l -F -r 'io.jenkins.plugins.analysis.core.model.AnalysisHistory.getIssues' . ./builds/Git-Folder/git-plugin-multi-platform/jdk=jdk8,os=FreeBSD-12/50/log ./builds/Git-Folder/git-plugin-multi-platform/jdk=jdk8,os=Ubuntu-20/50/log ./builds/Git-Folder/git-plugin-multi-platform/jdk=jdk8,os=s390x/50/log ./builds/Git-Folder/git-plugin-multi-platform/jdk=jdk8,os=Ubuntu-18/50/log ./builds/Git-Folder/git-plugin-multi-platform/jdk=jdk8,os=CentOS-7/50/log ./builds/Git-Folder/git-plugin-multi-platform/jdk=jdk8,os=Debian-10/50/log ./builds/Git-Folder/git-plugin-multi-platform/jdk=jdk8,os=Debian-9/50/log ./builds/Git-Folder/git-plugin-multi-platform/jdk=jdk8,os=CentOS-8/50/log ./builds/Git-Folder/git-plugin-multi-platform/jdk=jdk8,os=windows/50/log ./builds/Git-Folder/git-plugin-multi-platform/jdk=jdk8,os=Debian-testing/50/log ./builds/Git-Folder/git-pipeline-bitbucket/master/30/log ./builds/Git-Folder/git-pipeline-bitbucket/master/30/workflow/flowNodeStore.xml ./builds/Git-Folder/git-plugin-no-coverage/31/log ./builds/Git-Folder/git-plugin-pipeline/JENKINS-37263/2/log ./builds/Git-Folder/git-plugin-pipeline/JENKINS-37263/2/workflow/flowNodeStore.xml ./builds/Git-Folder/git-plugin-pipeline/JENKINS-37263/1/log ./builds/Git-Folder/git-plugin-pipeline/JENKINS-37263/1/workflow/flowNodeStore.xml ./builds/Git-Folder/git-pipeline-github/JENKINS-37263/1/log ./builds/Git-Folder/git-pipeline-github/JENKINS-37263/1/workflow/flowNodeStore.xml ./builds/Git-Folder/git-pipeline-github/master/35/log ./builds/Git-Folder/git-pipeline-github/master/35/workflow/flowNodeStore.xml ./builds/Git-Folder/git-plugin-on-branch/14/log That pattern match search through the Jenkins logs shows the jobs that are affected. I visited each of those jobs and removed all builds in the window of time between install of analysis-api plugin 9.0.0 and warnings-ng plugin 8.4.2. I've upgraded the warnings-ng plugin to 8.4.2 and restarted the Jenkins server. Jobs are running now.

          Ulli Hafner added a comment -

          Ah, good to see that everything is ok after you deleted those builds. The serialization for these jobs was simply empty And I see no simple way to provide a fall back for such a bug.

          Ulli Hafner added a comment - Ah, good to see that everything is ok after you deleted those builds. The serialization for these jobs was simply empty And I see no simple way to provide a fall back for such a bug.

          Ulli Hafner added a comment -

          Root cause: JENKINS-63652

          Workaround: jobs that are created with analysis-model 9.0.0 and warnings 8.4.1 need to be deleted.

          Ulli Hafner added a comment - Root cause: JENKINS-63652 Workaround: jobs that are created with analysis-model 9.0.0 and warnings 8.4.1 need to be deleted.
          Ulli Hafner made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Fixed but Unreleased [ 10203 ]
          Ulli Hafner made changes -
          Status Original: Fixed but Unreleased [ 10203 ] New: Resolved [ 5 ]

          Mark Waite added a comment -

          I have at a few pipeline jobs where all builds of the job were deleted and it reported a null pointer exception on the new build attempted after installing warnings-ng 8.4.2. I'll continue exploring further to try to better understand the conditions.

          Mark Waite added a comment - I have at a few pipeline jobs where all builds of the job were deleted and it reported a null pointer exception on the new build attempted after installing warnings-ng 8.4.2. I'll continue exploring further to try to better understand the conditions.

            drulli Ulli Hafner
            markewaite Mark Waite
            Votes:
            14 Vote for this issue
            Watchers:
            23 Start watching this issue

              Created:
              Updated:
              Resolved: