Jenkins queue stuck because of simple queue-prioritizing plugin

22 views
Skip to first unread message

George Cimpoies

unread,
May 30, 2018, 5:29:01 AM5/30/18
to jenkin...@googlegroups.com

Hi!

 

I have developed a quite straightforward Jenkins plugin (packaged as .hpi) to prioritize (push to the front of the queue) some builds that arrive in the queue based on certain conditions.

 

You can find the source code below in CustomSorter.java where I basically just override the default comparator and load it at Jenkins initialization.

The comparator then takes the decision between lhs and rhs based on my custom criteria.

 

After I load the plugin (for 8-12 hours) everything works fine & as expected (builds that meet my criteria get pushed to the front of the queue), but then for no apparent reason the queue gets stuck and thus very long since no jobs are executed even if all(or most of) the executors are free.

 

I have absolutely no idea what might be causing the issue and how I could track down the root cause(I’ve added logging to each comparison so that I have the result of each comparison in the Jenkins logs).

 

I’ll leave the .hpi and .java file below.


P.S. I've also opened a bug here https://issues.jenkins-ci.org/browse/JENKINS-51600.


Link to the plugin .hpi

https://drive.google.com/file/d/1lN8Bw0jqCGk-OpSCKMH6QvksGSKr7-Oi/view?usp=sharing

 

Thanks in advance,

George



--
George Cimpoies| Software Engineer - Cluj | ULLINK
1 Victor Deleu Street, 2nd & 3rd Floor | Cluj-Napoca, Cluj 400112 | george....@ullink.com |

The information contained in or attached to this email is strictly confidential. If you are not the intended recipient, please notify us immediately by telephone and return the message to us.
CustomSorter.java

Daniel Beck

unread,
May 30, 2018, 7:14:28 AM5/30/18
to Jenkins Developers

> On 30. May 2018, at 11:23, George Cimpoies <george....@ullink.com> wrote:
>
> I have absolutely no idea what might be causing the issue and how I could track down the root cause(I’ve added logging to each comparison so that I have the result of each comparison in the Jenkins logs).
>

Try https://wiki.jenkins.io/display/JENKINS/Obtaining+a+thread+dump

George Cimpoies

unread,
May 30, 2018, 8:16:46 AM5/30/18
to jenkin...@googlegroups.com
Obtaining a thread dump would be useful only after the problem is reproduced, but since I can't reproduce it on demand (since it's unpredictable) I'm not sure how that would help.


--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/4409C1B3-05C4-4637-8014-826453C75A91%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.



--
George Cimpoies| Implementation Engineer - Cluj | ULLINK | T: +40 364 413 815
1 Victor Deleu Street, 2nd & 3rd Floor | Cluj-Napoca, Cluj 400112 | george....@ullink.com |

Daniel Beck

unread,
May 30, 2018, 9:05:41 AM5/30/18
to jenkin...@googlegroups.com

> On 30. May 2018, at 13:20, George Cimpoies <george....@ullink.com> wrote:
>
> Obtaining a thread dump would be useful only after the problem is reproduced, but since I can't reproduce it on demand (since it's unpredictable) I'm not sure how that would help.

Once the problem happens, this might tell you why the queue is stuck (assuming threads are busy somewhere). Of course, needs the problem to occur to have potentially useful output.


Reply all
Reply to author
Forward
0 new messages