-
Bug
-
Resolution: Fixed
-
Blocker
-
None
-
OS Linux Red Hat 6.3, Jenkins core 1.529, build pipeline plugin 1.4.2, parametrized trigger plugin 2.21
-
Powered by SuggestiMate
a new run with "retry" link on failed job get stuck without any output in console. log exception:
Nov 9, 2013 1:04:34 AM hudson.model.Executor run
SEVERE: Executor threw an exception
java.lang.NullPointerException
at hudson.model.CauseAction.onAttached(CauseAction.java:120)
at hudson.model.Run.addAction(Run.java:349)
at hudson.model.Executor.run(Executor.java:238)
the run cannot be aborted or cancelled. the only way to stop it is restarting Jenkins.
[JENKINS-20499] unable to retry job execution for failed job in build-pipeline
This repos on the following environment:
Windows Server 2008 R2
Jenkins core 1.537
Build Pipeline plugin 1.4.1
Parametrized Trigger plugin 2.18
It occurs when a build is forced (Click "Build with Parameters", click "Build") after a failed build.
I am getting exactly the same problem and stacktrace (version 1.4.1 with Jenkins LTS 1.509.4) After triggering the same downstream project from two different upstream projects
Steps to reproduce:
1. Create a downstream project D
2. Create Projects A and B. As post-build action select "Build Other Projects (manual step)" and select for both: Project D. Add some predefined parameters: (e.g MY_VAR = VALUE)
3. Create two Build Pipeline Views: One for Project A and one for Project B
4. Trigger downstream project D from Project A using its corresponding Build Pipeline View
5. Trigger downstream project D from Project B using its corresponding Build Pipeline View
6. Repeat 4 and 5 a couple of times. D runs broken and cannot be aborted
Same problem here, with the same NullPointerException.
CentOS 6.4
Jenkins 1.536
Build Pipeline 1.4.2
Same problem but without parameterized-trigger involved
CentOS 6.4
Jenkins LTS 1.532.1
Build Pipeline 1.4.2
#1 A (success) -> B (success)
#2 A (failure) -> B (skipped)
#3 A (stuck)
Though i was not able to reproduce it myself yet
Same problem here
Jenkins ver. 1.532.1
Parameterized Trigger plugin 2.22
Build Pipeline Plugin 1.4.2
Same here
Jenkins 1.550
Parameterized Trigger plugin 2.22
Build Pipeline Plugin 1.4.2
Same problem:
Ubuntu 12.04.4 LTS
Jenkins: 1.551
Build Pipeline Plugin: 1.4.2
Not using Parameterized Triggers, but plugin 2.22 is installed for other projects
Same issue:
CentOS release 6.4
Jenkins: 1.553
Build Pipeline Plugin: 1.4.2
Parameterized Trigger plugin: 2.22
It works if you change the previous build to trigger the next build manually but doesn't if it an automatic trigger
From comments, this seems happen even without using parameterized trigger plugin.
Removed parameterized-trigger from component/s.
We have seen this on a job triggered by a SCM change, so it does not seem to be related to build-pipeline plugin either.
Jenkins: 1.525
I ran into same issue.
Auto trigger from SCM without using"parameterized plugin".
Any workaround for this ? How do I kill that build ? I even restarted jenkins but all in vain. Here is my stack track.
javax.servlet.ServletException: org.apache.commons.jelly.JellyTagException: jar:file:/var/cache/jenkins/war/WEB-INF/lib/jenkins-core-1.560.jar!/hudson/model/CauseAction/summary.jelly:30:65: <st:include> No page found 'description.jelly' for class hudson.model.CauseAction
at org.kohsuke.stapler.jelly.JellyClassTearOff.serveIndexJelly(JellyClassTearOff.java:117)
at org.kohsuke.stapler.jelly.JellyFacet.handleIndexRequest(JellyFacet.java:127)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:717)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:390)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:248)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:248)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:631)
at org.kohsuke.stapler.Stapler.service(Stapler.java:225)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:96)
at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:58)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:99)
at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:88)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:174)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at jenkins.security.ApiTokenFilter.doFilter(ApiTokenFilter.java:74)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:46)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:370)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:949)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1011)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:701)
Caused by: org.apache.commons.jelly.JellyTagException: jar:file:/var/cache/jenkins/war/WEB-INF/lib/jenkins-core-1.560.jar!/hudson/model/CauseAction/summary.jelly:30:65: <st:include> No page found 'description.jelly' for class hudson.model.CauseAction
at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:124)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
at org.apache.commons.jelly.tags.core.ForEachTag.doTag(ForEachTag.java:150)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
at org.apache.commons.jelly.tags.core.OtherwiseTag.doTag(OtherwiseTag.java:41)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
at org.apache.commons.jelly.tags.core.ChooseTag.doTag(ChooseTag.java:38)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:81)
at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:147)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
at org.apache.commons.jelly.tags.core.ForEachTag.doTag(ForEachTag.java:150)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:81)
at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:63)
at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:53)
at org.kohsuke.stapler.jelly.JellyClassTearOff.serveIndexJelly(JellyClassTearOff.java:112)
... 74 more
Could someone please provide clear step-by-step instructions on how yo reproduce the problem on a pristine Jenkins instance (be verbose, include the plugin installation and everythign!)? I tried davfuenmayor's instructions, but they don't work for me (Jenkins 1.561, Build Pipeline 1.4.2).
A clue could be that since we upgraded the build pipeline plugin to 11088e6301 we ONLY see this happening on the first job in the pipeline and never on downstream jobs like we saw before. We have seen it hang on both SCM trigger and rebuild. Unsure if it ever happened on a plain manual trigger, but I don't think it has. We believe that it was the fix for JENKINS-21527 in 8ee14444e7 (merged to mainline in 376b460e12) that fixed it.
I think this is interesting because it highlights what was wrong and maybe a similar fix needs to be applied somewhere else.
BuildPipelineView.triggerBuild(AbstractProject,AbstractBuild,Action) has a code path that leads to a null Cause being added to the CauseAction.
Core cannot handle that.
Code changed in jenkins
User: Daniel Beck
Path:
core/src/main/java/hudson/model/CauseAction.java
http://jenkins-ci.org/commit/jenkins/aa677ed8486559433ff71a50cf4f5bbf8fc46cd8
Log:
JENKINS-20499 Don't fail horribly with null causes
Code changed in jenkins
User: Oleg Nenashev
Path:
core/src/main/java/hudson/model/CauseAction.java
http://jenkins-ci.org/commit/jenkins/0c76f85f8dd563963072323c68f25236d901a9ca
Log:
Merge pull request #1248 from daniel-beck/JENKINS-20499
JENKINS-20499 Don't fail horribly with null causes
Compare: https://github.com/jenkinsci/jenkins/compare/b3bb235d5740...0c76f85f8dd5
Integrated in jenkins_main_trunk #3417
JENKINS-20499 Don't fail horribly with null causes (Revision aa677ed8486559433ff71a50cf4f5bbf8fc46cd8)
Result = SUCCESS
daniel-beck : aa677ed8486559433ff71a50cf4f5bbf8fc46cd8
Files :
- core/src/main/java/hudson/model/CauseAction.java
Oleg: Better file a separate issue to make PR 1248 eligible for LTS. Oliver will never even see this unresolved issue for a different component. (And I still maintain this is a Build Pipeline bug, adding a null cause shouldn't happen)
See in:
Core: Jenkins ver. 1.532.2
Build Pipeline Plugin: 1.4.3
Parameterized Trigger Plugin: 2.20
Jenkins 1.554.2 and Build Pipeline Plugin: 1.4.5
Steps to reproduce:
1. Create project C with a build step that will fail
2. Create project A with post build action “Build other projects” triggering project C
3. Create project B with post build action “Build other projects” triggering project C
4. Trigger build on B
5. Create a Build Pipeline View with Initial Job B
6. Go to view and retry project C
The problem is that the wrong upstream project (A) is picked when triggering so no upstream build is found. It will add null as the UpstreamCause which core can't handle. Exactly as Daniel Beck mention in a previous comment.
Created a PR with a proposed fix:
https://github.com/jenkinsci/build-pipeline-plugin/pull/65
Please test it.
Code changed in jenkins
User: Patrik Boström
Path:
src/main/java/au/com/centrumsystems/hudson/plugin/buildpipeline/BuildPipelineView.java
src/main/java/au/com/centrumsystems/hudson/plugin/buildpipeline/PipelineBuild.java
src/main/resources/au/com/centrumsystems/hudson/plugin/buildpipeline/BuildPipelineView/bpp.jelly
src/test/java/au/com/centrumsystems/hudson/plugin/buildpipeline/PipelineBuildTest.java
http://jenkins-ci.org/commit/build-pipeline-plugin/7a52b7429065821552f89946784853ee70a6d0dc
Log:
JENKINS-20499 If a job has two upstream dependencies and it has been triggered by anything except the manual trigger it will always take the first upstream job as the upstream dependency even if it is incorrect. Added check to not add a null Cause if upstream build is null.
Code changed in jenkins
User: Geoff Bullen
Path:
src/main/java/au/com/centrumsystems/hudson/plugin/buildpipeline/BuildPipelineView.java
src/main/java/au/com/centrumsystems/hudson/plugin/buildpipeline/PipelineBuild.java
src/main/resources/au/com/centrumsystems/hudson/plugin/buildpipeline/BuildPipelineView/bpp.jelly
src/test/java/au/com/centrumsystems/hudson/plugin/buildpipeline/PipelineBuildTest.java
http://jenkins-ci.org/commit/build-pipeline-plugin/f4a8d984a2b169219d6eb7187aaef49af9d9fc4c
Log:
Merge pull request #65 from patbos/JENKINS-20499
merged JENKINS-20499
Compare: https://github.com/jenkinsci/build-pipeline-plugin/compare/fe118c684376...f4a8d984a2b1
This one should be fixed now... but you need to update Core and pipeline plugin: I can see most of you are using a very old version of Jenkins and Pipeline plugin. I am pretty sure an update would fix this. I would recommend you to run at least Jenkins version 1.580.3 + Build Pipeline Plugin 1.4.5
Hello,
I'm using Jenkins version 1.596.1 + Build Pipeline Plugin 1.4.5, and still got the problem with the retry of a broken build - still the problem "java.lang.IllegalStateException: No upstream trigger found for this projectTest12 ..."
Since the merge of "pull request #65 from patbos/JENKINS-20499" is very new and the pipeline plugin version is built on November, 26th, I have the question if there is a workaround for this error?
When there might be a new version of the PipelinePlugin including the fix?
Hello Toralf... what happens if you disable the option "Prevent Cross Site Request Forgery exploits"?
I found the perfect combination!
Jenkins-CORE 1.565 http://mirrors.jenkins-ci.org/war/1.565/jenkins.war
build-pipeline-plugin 1.4.3 http://maven.jenkins-ci.org/content/repositories/releases/org/jenkins-ci/plugins/build-pipeline-plugin/1.4.3/build-pipeline-plugin-1.4.3.hpi
Hello Libero,
the option is disabled by default. So this option doesn't help, sadly.
Removing lts-candidate label as PR 1248 is a part of 1.596 baseline.
the run status page shows this exception:
javax.servlet.ServletException: org.apache.commons.jelly.JellyTagException: jar:file:/var/cache/jenkins/war/WEB-INF/lib/jenkins-core-1.529.jar!/hudson/model/CauseAction/summary.jelly:30:65: <st:include> No page found 'description.jelly' for class hudson.model.CauseAction
at org.kohsuke.stapler.jelly.JellyClassTearOff.serveIndexJelly(JellyClassTearOff.java:117)
at org.kohsuke.stapler.jelly.JellyFacet.handleIndexRequest(JellyFacet.java:127)
find full stacktrace attached