• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • core
    • Jenkins 1.621+
      all platforms

      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)

          [JENKINS-29876] NPE when triggering downstream job

          Code changed in jenkins
          User: Kanstantsin Shautsou
          Path:
          core/src/main/java/jenkins/triggers/ReverseBuildTrigger.java
          test/src/test/java/jenkins/triggers/ReverseBuildTriggerTest.java
          http://jenkins-ci.org/commit/jenkins/45e4e990269325ba1f8bca25959ff8dcaa21f398
          Log:
          [FIXED JENKINS-29876] CheckForNull job in ReverseBuildTrigger

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kanstantsin Shautsou Path: core/src/main/java/jenkins/triggers/ReverseBuildTrigger.java test/src/test/java/jenkins/triggers/ReverseBuildTriggerTest.java http://jenkins-ci.org/commit/jenkins/45e4e990269325ba1f8bca25959ff8dcaa21f398 Log: [FIXED JENKINS-29876] CheckForNull job in ReverseBuildTrigger

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          core/src/main/java/jenkins/triggers/ReverseBuildTrigger.java
          test/src/test/java/jenkins/triggers/ReverseBuildTriggerTest.java
          http://jenkins-ci.org/commit/jenkins/339dd4ace545187d04a65bedea44b215fd11ba39
          Log:
          Merge pull request #1842 from KostyaSha/patch-3

          [FIXED JENKINS-29876] CheckForNull job in ReverseBuildTrigger

          Compare: https://github.com/jenkinsci/jenkins/compare/5e2b15426118...339dd4ace545

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: core/src/main/java/jenkins/triggers/ReverseBuildTrigger.java test/src/test/java/jenkins/triggers/ReverseBuildTriggerTest.java http://jenkins-ci.org/commit/jenkins/339dd4ace545187d04a65bedea44b215fd11ba39 Log: Merge pull request #1842 from KostyaSha/patch-3 [FIXED JENKINS-29876] CheckForNull job in ReverseBuildTrigger Compare: https://github.com/jenkinsci/jenkins/compare/5e2b15426118...339dd4ace545

          dogfood added a comment -

          Integrated in jenkins_main_trunk #4300
          [FIXED JENKINS-29876] CheckForNull job in ReverseBuildTrigger (Revision 45e4e990269325ba1f8bca25959ff8dcaa21f398)

          Result = SUCCESS
          kanstantsin.sha : 45e4e990269325ba1f8bca25959ff8dcaa21f398
          Files :

          • test/src/test/java/jenkins/triggers/ReverseBuildTriggerTest.java
          • core/src/main/java/jenkins/triggers/ReverseBuildTrigger.java

          dogfood added a comment - Integrated in jenkins_main_trunk #4300 [FIXED JENKINS-29876] CheckForNull job in ReverseBuildTrigger (Revision 45e4e990269325ba1f8bca25959ff8dcaa21f398) Result = SUCCESS kanstantsin.sha : 45e4e990269325ba1f8bca25959ff8dcaa21f398 Files : test/src/test/java/jenkins/triggers/ReverseBuildTriggerTest.java core/src/main/java/jenkins/triggers/ReverseBuildTrigger.java

          Daniel Beck added a comment -

          This does not affect 1.625.x LTS as the original change by Kostya which surfaced this issue has been reverted. Integrating it again (+ this fix) will result in behavioral changes without one LTS line, so I doubt that should be done. We'll just have to live that there are entirely too many triggers processed in the 1.625.x line.

          Daniel Beck added a comment - This does not affect 1.625.x LTS as the original change by Kostya which surfaced this issue has been reverted. Integrating it again (+ this fix) will result in behavioral changes without one LTS line, so I doubt that should be done. We'll just have to live that there are entirely too many triggers processed in the 1.625.x line.

          Daniel Beck added a comment -

          Resolved towards 1.632.

          Daniel Beck added a comment - Resolved towards 1.632.

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

          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...

          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

          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 ...

          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

          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

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

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

          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.

          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 .

            integer Kanstantsin Shautsou
            mlemanczyk Marek Lemanczyk
            Votes:
            11 Vote for this issue
            Watchers:
            19 Start watching this issue

              Created:
              Updated:
              Resolved: