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

NPE when triggering downstream job

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: core
    • Labels:
    • Environment:
      Jenkins 1.621+
      all platforms
    • Similar Issues:

      Description

      We've some jobs which do some generic tasks. On success they are used to trigger some downstream jobs. This is similar to JENKINS-25758, but its resolution didn't help. Downgrade to 1.620 fixed the problem.

      There are 2 downstream jobs configured. Starting with 1.621 only the first downstream job gets started after successful build, at best.

      Instead of triggering all the downstream jobs they fire this NPE:

      Warning: you have no plugins providing access control for builds, so falling back to legacy behavior of permitting any downstream builds to be triggered
      Triggering a new build of .....OUR PROJECT NAME...
      FATAL: null
      java.lang.NullPointerException
      at jenkins.triggers.ReverseBuildTrigger.shouldTrigger(ReverseBuildTrigger.java:111)
      at jenkins.triggers.ReverseBuildTrigger.access$000(ReverseBuildTrigger.java:84)
      at jenkins.triggers.ReverseBuildTrigger$1.shouldTriggerBuild(ReverseBuildTrigger.java:141)
      at hudson.tasks.BuildTrigger.execute(BuildTrigger.java:245)
      at hudson.model.AbstractBuild$AbstractBuildExecution.cleanUp(AbstractBuild.java:687)
      at hudson.model.Build$BuildExecution.cleanUp(Build.java:200)
      at hudson.model.Run.execute(Run.java:1788)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:381)

        Attachments

          Issue Links

            Activity

            Hide
            integer Kanstantsin Shautsou added a comment -

            LTS is not required imho, let's test this fix in master and get during next LTS or some minor LTS update...

            Show
            integer Kanstantsin Shautsou added a comment - LTS is not required imho, let's test this fix in master and get during next LTS or some minor LTS update...
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: tfennelly
            Path:
            changelog.html
            core/src/main/java/hudson/Util.java
            core/src/main/java/hudson/console/ConsoleLogFilter.java
            core/src/main/java/hudson/model/Label.java
            core/src/main/java/hudson/model/Queue.java
            core/src/main/java/hudson/model/Run.java
            core/src/main/java/hudson/slaves/SlaveComputer.java
            core/src/main/java/hudson/tasks/BuildWrappers.java
            core/src/main/java/jenkins/triggers/ReverseBuildTrigger.java
            core/src/main/resources/lib/layout/task.jelly
            core/src/test/java/hudson/FilePathTest.java
            core/src/test/java/hudson/LauncherTest.java
            core/src/test/java/hudson/util/IsOverriddenTest.java
            core/src/test/java/hudson/util/ProcessTreeTest.java
            test/src/test/groovy/hudson/model/AbstractProjectTest.groovy
            test/src/test/groovy/jenkins/model/PeepholePermalinkTest.groovy
            test/src/test/java/hudson/console/ConsoleLogFilterTest.java
            test/src/test/java/hudson/model/DirectoryBrowserSupportTest.java
            test/src/test/java/hudson/model/NodeTest.java
            test/src/test/java/hudson/model/QueueTest.java
            test/src/test/java/hudson/slaves/DummyCloudImpl.java
            test/src/test/java/hudson/slaves/JNLPLauncherTest.java
            test/src/test/java/hudson/tasks/EnvVarsInConfigTasksTest.java
            test/src/test/java/hudson/tasks/ShellTest.java
            test/src/test/java/hudson/tools/JDKInstallerTest.java
            test/src/test/java/hudson/util/ProcessTreeKillerTest.java
            test/src/test/java/jenkins/triggers/ReverseBuildTriggerTest.java
            http://jenkins-ci.org/commit/jenkins/955eb7274a02e3549493cd2e1e0de785a0893784
            Log:
            Merge branch 'master' into plugin-manager-dependants

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: tfennelly Path: changelog.html core/src/main/java/hudson/Util.java core/src/main/java/hudson/console/ConsoleLogFilter.java core/src/main/java/hudson/model/Label.java core/src/main/java/hudson/model/Queue.java core/src/main/java/hudson/model/Run.java core/src/main/java/hudson/slaves/SlaveComputer.java core/src/main/java/hudson/tasks/BuildWrappers.java core/src/main/java/jenkins/triggers/ReverseBuildTrigger.java core/src/main/resources/lib/layout/task.jelly core/src/test/java/hudson/FilePathTest.java core/src/test/java/hudson/LauncherTest.java core/src/test/java/hudson/util/IsOverriddenTest.java core/src/test/java/hudson/util/ProcessTreeTest.java test/src/test/groovy/hudson/model/AbstractProjectTest.groovy test/src/test/groovy/jenkins/model/PeepholePermalinkTest.groovy test/src/test/java/hudson/console/ConsoleLogFilterTest.java test/src/test/java/hudson/model/DirectoryBrowserSupportTest.java test/src/test/java/hudson/model/NodeTest.java test/src/test/java/hudson/model/QueueTest.java test/src/test/java/hudson/slaves/DummyCloudImpl.java test/src/test/java/hudson/slaves/JNLPLauncherTest.java test/src/test/java/hudson/tasks/EnvVarsInConfigTasksTest.java test/src/test/java/hudson/tasks/ShellTest.java test/src/test/java/hudson/tools/JDKInstallerTest.java test/src/test/java/hudson/util/ProcessTreeKillerTest.java test/src/test/java/jenkins/triggers/ReverseBuildTriggerTest.java http://jenkins-ci.org/commit/jenkins/955eb7274a02e3549493cd2e1e0de785a0893784 Log: Merge branch 'master' into plugin-manager-dependants master: (58 commits) Changelog: Replace the PR reference by the JIRA issue reference Noting https://github.com/jenkinsci/jenkins/pull/1818 Noting https://github.com/jenkinsci/jenkins/pull/1804 JENKINS-30002 Improve Util.isOverridden Noting #1842 [FIXED JENKINS-30777] this concludes the fix JENKINS-30777 also allow slaves to decorate logger JENKINS-30777 Generalized the signature to work with Run, not just AbstractBuild. Diamond operator [FIXED JENKINS-29876] CheckForNull job in ReverseBuildTrigger Noting JENKINS-30084 in changelog JENKINS-30084 remove extra space JENKINS-30084 address feedbacks JENKINS-30084 indent back JENKINS-30084 fixing test JENKINS-30084 fixing test JENKINS-30084 enhancing test case JENKINS-30084 test added to make sure a flyweight task can be blocked at last minute JENKINS-30084 fix regression when flyweight task is blocked by upstream/downstream project JENKINS-30084 some more polish ...
            Hide
            linkmjb Matthew Bates added a comment -

            This looks like it's back, in Jenkins 2.19.4

            Warning: you have no plugins providing access control for builds, so falling back to legacy behavior of permitting any downstream builds to be triggered
            FATAL: null
            java.lang.NullPointerException
            at hudson.model.Result.isBetterOrEqualTo(Result.java:130)
            at jenkins.triggers.ReverseBuildTrigger.shouldTrigger(ReverseBuildTrigger.java:139)
            at jenkins.triggers.ReverseBuildTrigger.access$000(ReverseBuildTrigger.java:89)
            at jenkins.triggers.ReverseBuildTrigger$1.shouldTriggerBuild(ReverseBuildTrigger.java:146)
            at hudson.tasks.BuildTrigger.execute(BuildTrigger.java:247)
            at hudson.model.AbstractBuild$AbstractBuildExecution.cleanUp(AbstractBuild.java:681)
            at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.cleanUp(MavenModuleSetBuild.java:1093)
            at hudson.model.Run.execute(Run.java:1767)
            at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:544)
            at hudson.model.ResourceController.execute(ResourceController.java:98)
            at hudson.model.Executor.run(Executor.java:404)
            Finished: UNSTABLE

            Show
            linkmjb Matthew Bates added a comment - This looks like it's back, in Jenkins 2.19.4 Warning: you have no plugins providing access control for builds, so falling back to legacy behavior of permitting any downstream builds to be triggered FATAL: null java.lang.NullPointerException at hudson.model.Result.isBetterOrEqualTo(Result.java:130) at jenkins.triggers.ReverseBuildTrigger.shouldTrigger(ReverseBuildTrigger.java:139) at jenkins.triggers.ReverseBuildTrigger.access$000(ReverseBuildTrigger.java:89) at jenkins.triggers.ReverseBuildTrigger$1.shouldTriggerBuild(ReverseBuildTrigger.java:146) at hudson.tasks.BuildTrigger.execute(BuildTrigger.java:247) at hudson.model.AbstractBuild$AbstractBuildExecution.cleanUp(AbstractBuild.java:681) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.cleanUp(MavenModuleSetBuild.java:1093) at hudson.model.Run.execute(Run.java:1767) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:544) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:404) Finished: UNSTABLE
            Hide
            integer Kanstantsin Shautsou added a comment -

            Your stacktrace ends in Result.java please firstly check and ensure that it the same issues before commenting.

            Show
            integer Kanstantsin Shautsou added a comment - Your stacktrace ends in Result.java please firstly check and ensure that it the same issues before commenting.
            Hide
            danielbeck Daniel Beck added a comment -

            That looks more like JENKINS-23191. Make sure saving the job config (and selecting a threshold) doesn't fix it, then file a new issue and link to JENKINS-23191.

            Show
            danielbeck Daniel Beck added a comment - That looks more like JENKINS-23191 . Make sure saving the job config (and selecting a threshold) doesn't fix it, then file a new issue and link to JENKINS-23191 .

              People

              • Assignee:
                integer Kanstantsin Shautsou
                Reporter:
                mlemanczyk Marek Lemanczyk
              • Votes:
                11 Vote for this issue
                Watchers:
                20 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: