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

Potential NPE in BlockedBecauseOfBuildInProgress#getDescription()

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      This NPE may happen in the case of race condition.

      1) AbstractProject#getCauseOfBlockage() checks for non-concurrent running build in order to generate a cause of blockage
      2) If the getCauseOfBlockage() happens in the context not synced with queue, after isLogUpdated() && !isConcurrentBuild() there may be a context switch.
      3) Build may complete and get deleted before we actually call getLastBuild() in the code
      4) If it happens, BlockedBecauseOfBuildInProgress may get null in the constructor
      5) Then, BlockedBecauseOfBuildInProgress#getDescription() will start throwing NPEs

        Attachments

          Activity

          Show
          oleg_nenashev Oleg Nenashev added a comment - https://github.com/jenkinsci/jenkins/pull/2448
          Hide
          danielbeck Daniel Beck added a comment -

          Fixed in 2.14 (2016/07/17)

          Show
          danielbeck Daniel Beck added a comment - Fixed in 2.14 (2016/07/17)

            People

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

              Dates

              • Created:
                Updated:
                Resolved: