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

Viewing canceled Pipeline jobs can get NPE from UserInterruption/summary.groovy

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • core, pipeline
    • Jenkins 2.24, workflow-job 2.7, Linux vmkvmx02 3.10.0-327.el7.x86_64 #1 SMP Thu Oct 29 17:29:29 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux

      Sometimes when viewing cancelled pipeline jobs, an exception is shown. I'm not sure if it's all cancelled jobs or just particular ones. Can still view console logs by entering url in manually.

      javax.servlet.ServletException: org.apache.commons.jelly.JellyTagException: jar:file:/home/jenkins/plugins/workflow-job/WEB-INF/lib/workflow-job.jar!/org/jenkinsci/plugins/workflow/job/WorkflowRun/index.jelly:63:93: <st:include> org.apache.commons.jelly.JellyTagException: jar:file:/var/cache/jenkins/war/WEB-INF/lib/jenkins-core-2.24.jar!/lib/hudson/summary.jelly:105:31: <d:invokeBody> Cannot get property 'fullName' on null object
      

          [JENKINS-38721] Viewing canceled Pipeline jobs can get NPE from UserInterruption/summary.groovy

          Nick Sonneveld created issue -
          Nick Sonneveld made changes -
          Summary Original: Viewing canceled pipeline jobs can raise exception. New: Viewing canceled pipeline jobs can raise org.apache.commons.jelly.JellyTagException.
          Nick Sonneveld made changes -
          Link New: This issue is duplicated by JENKINS-39081 [ JENKINS-39081 ]

          Jesse Glick added a comment -
          org.apache.commons.jelly.JellyTagException: …/jenkins-core-2.24.jar!/lib/hudson/summary.jelly:105:31: <d:invokeBody> Cannot get property 'fullName' on null object
          	at …
          Caused by: java.lang.NullPointerException: Cannot get property 'fullName' on null object
          	at org.codehaus.groovy.runtime.NullObject.getProperty(NullObject.java:60)
          	at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:172)
          	at org.codehaus.groovy.runtime.callsite.NullCallSite.getProperty(NullCallSite.java:47)
          	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:296)
          	at jenkins.model.CauseOfInterruption.UserInterruption.summary.run(summary.groovy:4)
          

          The problematic expression in my.user.fullName. Yet UserInterruption.getUser calls User.get, which should never return null. So I am not sure what is going on.

          At any rate, it looks like a core bug. Any known way to reproduce from scratch?

          Jesse Glick added a comment - org.apache.commons.jelly.JellyTagException: …/jenkins-core-2.24.jar!/lib/hudson/summary.jelly:105:31: <d:invokeBody> Cannot get property 'fullName' on null object at … Caused by: java.lang.NullPointerException: Cannot get property 'fullName' on null object at org.codehaus.groovy.runtime.NullObject.getProperty(NullObject.java:60) at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:172) at org.codehaus.groovy.runtime.callsite.NullCallSite.getProperty(NullCallSite.java:47) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:296) at jenkins.model.CauseOfInterruption.UserInterruption.summary.run(summary.groovy:4) The problematic expression in my.user.fullName . Yet UserInterruption.getUser calls User.get , which should never return null. So I am not sure what is going on. At any rate, it looks like a core bug. Any known way to reproduce from scratch?
          Jesse Glick made changes -
          Component/s Original: pipeline [ 21692 ]
          Component/s Original: workflow-job-plugin [ 21716 ]
          Summary Original: Viewing canceled pipeline jobs can raise org.apache.commons.jelly.JellyTagException. New: Viewing canceled Pipeline jobs can get NPE from UserInterruption/summary.groovy

          Nick Sonneveld added a comment - - edited

          jglick I haven't tried from scratch. We do run Jenkins internally with zero security enabled. Everyone is an anonymous user which might explain why User.get is null.

          Nick Sonneveld added a comment - - edited jglick I haven't tried from scratch. We do run Jenkins internally with zero security enabled. Everyone is an anonymous user which might explain why User.get is null.
          PJ Fanning made changes -
          Link New: This issue is related to JENKINS-37282 [ JENKINS-37282 ]
          PJ Fanning made changes -
          Labels Original: exception pipeline New: exception jelly pipeline
          Oleg Nenashev made changes -
          Component/s New: pipeline [ 21692 ]

          Oleg Nenashev added a comment -

          Oleg Nenashev added a comment - It is a regression due to JENKINS-36594 . https://github.com/jenkinsci/jenkins/blob/master/core/src/main/resources/jenkins/model/CauseOfInterruption/UserInterruption/summary.groovy needs to be fixed

            oleg_nenashev Oleg Nenashev
            sonneveldsmartward Nick Sonneveld
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: