[JIRA] (JENKINS-54215) NullPointerException when the build result is null

7 views
Skip to first unread message

aburdajewicz@cloudbees.com (JIRA)

unread,
Oct 24, 2018, 2:25:02 AM10/24/18
to jenkinsc...@googlegroups.com
Allan BURDAJEWICZ created an issue
 
Jenkins / Bug JENKINS-54215
NullPointerException when the build result is null
Issue Type: Bug Bug
Assignee: Kanstantsin Shautsou
Components: block-queued-job-plugin
Created: 2018-10-24 06:24
Priority: Major Major
Reporter: Allan BURDAJEWICZ

If the last build is a job that is currently building but has a null build result, the JobResultBlockQueueCondition throws a NullPointerException:

Oct 24, 2018 4:21:46 PM jenkins.util.AtmostOneTaskExecutor$1 call
WARNING: null
java.lang.NullPointerException
	at org.jenkinsci.plugins.blockqueuedjob.condition.JobResultBlockQueueCondition.isBlocked(JobResultBlockQueueCondition.java:70)
	at org.jenkinsci.plugins.blockqueuedjob.BlockItemQueueTaskDispatcher.canRun(BlockItemQueueTaskDispatcher.java:35)
	at hudson.model.Queue.getCauseOfBlockageForItem(Queue.java:1196)
	at hudson.model.Queue.maintain(Queue.java:1553)
	at hudson.model.Queue$1.call(Queue.java:324)
	at hudson.model.Queue$1.call(Queue.java:321)
	at jenkins.util.AtmostOneTaskExecutor$1.call(AtmostOneTaskExecutor.java:108)
	at jenkins.util.AtmostOneTaskExecutor$1.call(AtmostOneTaskExecutor.java:98)
	at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:71)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:112)
	at java.lang.Thread.run(Thread.java:748)

How to reproduce

Create 2 pipeline job `node

{sleep 10}

` and one of those pipeline should be configured to block the build depending on the other one: "Block/Unblock task in queue > Block when last build result" with status UNSTABLE.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

aburdajewicz@cloudbees.com (JIRA)

unread,
Oct 24, 2019, 7:21:03 PM10/24/19
to jenkinsc...@googlegroups.com
Allan BURDAJEWICZ updated an issue
Change By: Allan BURDAJEWICZ
If the last build is a job that is currently building but has a {{null}} build result, the JobResultBlockQueueCondition throws a NullPointerException:

{code}

Oct 24, 2018 4:21:46 PM jenkins.util.AtmostOneTaskExecutor$1 call
WARNING: null
java.lang.NullPointerException
at org.jenkinsci.plugins.blockqueuedjob.condition.JobResultBlockQueueCondition.isBlocked(JobResultBlockQueueCondition.java:70)
at org.jenkinsci.plugins.blockqueuedjob.BlockItemQueueTaskDispatcher.canRun(BlockItemQueueTaskDispatcher.java:35)
at hudson.model.Queue.getCauseOfBlockageForItem(Queue.java:1196)
at hudson.model.Queue.maintain(Queue.java:1553)
at hudson.model.Queue$1.call(Queue.java:324)
at hudson.model.Queue$1.call(Queue.java:321)
at jenkins.util.AtmostOneTaskExecutor$1.call(AtmostOneTaskExecutor.java:108)
at jenkins.util.AtmostOneTaskExecutor$1.call(AtmostOneTaskExecutor.java:98)
at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:71)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:112)
at java.lang.Thread.run(Thread.java:748)
{code}

h3. How to reproduce

Create 2 pipeline job
_node { {node { sleep 10} }} _ and one of those pipeline should be configured to block the build depending on the other one: "Block/Unblock task in queue > Block when last build result" with status UNSTABLE.
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

aburdajewicz@cloudbees.com (JIRA)

unread,
Oct 24, 2019, 7:21:03 PM10/24/19
to jenkinsc...@googlegroups.com
Create 2 pipeline job ` {{ node {sleep 10} ` }} and one of those pipeline should be configured to block the build depending on the other one: "Block/Unblock task in queue > Block when last build result" with status UNSTABLE.

aburdajewicz@cloudbees.com (JIRA)

unread,
Oct 24, 2019, 7:22:02 PM10/24/19
to jenkinsc...@googlegroups.com
Create 2 pipeline job the do "node \ { sleep 10 \ }" and one of those pipeline should be configured to block the build depending on the other one: "Block/Unblock task in queue > Block when last build result" with status UNSTABLE.

aburdajewicz@cloudbees.com (JIRA)

unread,
Oct 24, 2019, 7:22:04 PM10/24/19
to jenkinsc...@googlegroups.com
Create 2 pipeline job _node the do "node { sleep 10 } _ " and one of those pipeline should be configured to block the build depending on the other one: "Block/Unblock task in queue > Block when last build result" with status UNSTABLE.
Reply all
Reply to author
Forward
0 new messages