Deadlock running out of executors waiting on subjobs via parameterized trigger plugin

491 views
Skip to first unread message

Brent Scriver

unread,
Feb 13, 2015, 9:27:24 PM2/13/15
to jenkins...@googlegroups.com

I'm looking for some help/direction at resolving an odd problem.  We currently only have one node (still in the midst of setting up/configuring hardware), and we encountered a scenario where we have just a couple executors that can run on the machine at once (say 2).  If I start jobs A & B which run jobs C & D via the parameterized trigger plugin and wait for those to complete, no jobs ever finish.  C & D are never started due to lack of executors and A & B cannot complete waiting for those jobs.

We are using Perforce and I am trying to be efficient with workspaces as syncing new workspaces is really expensive (we are already at gigs of data) part of the objective is to reuse the workspace between the jobs (so C & D can run within the workspaces set up by A & B).

Is there a detail I'm missing?  None of the jobs are set up to block waiting for upstream or downstream jobs to finish.

I'm on (with versions of job related plugins in case there is an interaction):
* Jenkins 1.592
* Build Pipeline Plugin 1.4.5
* External Job Monitor Plugin 1,4
* Join Plugin 1.15
* Matrix Project Plugin 1.4
* Node & Label Parameter Plugin 1.5.1
* Parameterized Trigger Plugin 2.25

I did have the job weight plugin at one point, but no longer.


Ginga, Dick

unread,
Feb 17, 2015, 12:54:09 PM2/17/15
to jenkins...@googlegroups.com

If you do not need A and B to wait for C and D to complete, then trigger them using a post-build trigger using the Trigger Parameterized Build plugin. This will run before A completes but not cause A to wait. Then an executor will become available as A terminates

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1fc6b4ef-f34d-4e45-a4aa-96e22cb57a79%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Brent Scriver

unread,
Feb 17, 2015, 2:02:31 PM2/17/15
to jenkins...@googlegroups.com

Unfortunately I do need A & B to wait to make sure A & B do not run again until C & D are done with those workspaces.

--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/iR4GsaOWHAQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/6C6EE445A6F6CE4E8A0FFB51B071A4E26E4F997C%40AMERMBX02.PERKINELMER.NET.

Ginga, Dick

unread,
Feb 17, 2015, 2:11:28 PM2/17/15
to jenkins...@googlegroups.com

You can use locks to prevent them from running again via the Lock and Latches plugin or maybe the Block build when downstream project is building under advanced project options will work. I have used the first but not the second.

Brent Scriver

unread,
Feb 17, 2015, 2:16:02 PM2/17/15
to jenkins...@googlegroups.com

Hmm, if I do that, while it remedies the deadlock, it means I no longer can have multiple runs in parallel in different workspaces, correct?

Ginga, Dick

unread,
Feb 17, 2015, 2:24:25 PM2/17/15
to jenkins...@googlegroups.com

You can use 2 locks, one locks A from running until B completes and one for C and D.

 

In a different approach, IF C and D ONLY need the built artifacts from A and B, then you can have A and B “archive the artifacts” and then have C and D “Copy the artifacts” into their workspace and run the tests.

Brent Scriver

unread,
Feb 23, 2015, 3:33:25 PM2/23/15
to jenkins...@googlegroups.com

I was hoping to avoid having to create new workspaces and add archiving and restoring artifacts as it is gigs of data (sadly even incrementals), especially since C & D are relatively small and fast in comparison.

With the locks though that would prevent them from running concurrently unnecessarily, correct? I would also have to do this for all jobs that involve more than one job as well to ensure they are unique as I add more.  Is it not possible to pass the "executor baton" to a sub-job when waiting and restore it on completion?

Thank you for taking the time to follow up on this!
Brent

Kitu

unread,
Apr 9, 2021, 10:59:31 AM4/9/21
to Jenkins Users
Hi,


were able to find some solution on this?

Thanks

Reply all
Reply to author
Forward
0 new messages