Repository navigation
[JENKINS-936] Matrix parent build shouldn't consume an executor. #311
Description
Hi,
On a multi-configuration project, I encounter a systematic deadlock because the
parent job and one of its child are queued on the same node.
The configuration matrix is as follows:
[x] Build on multiple nodes
[-] Individual nodes
[x] APOLLON (apollon)
[x] CHRONOS (chronos)
[x] DEMETER (demeter)
[ ] EOS (eos)
[x] EROS (eros)
[x] PAN (pan)
[x] PONTOS (pontos)
[ ] master (the master Hudson node)
[+] Labels
[ ] Axes
Here is the console output:
started
Building remotely on PONTOS
Triggering label=PAN
Triggering label=APOLLON
Triggering label=DEMETER
Triggering label=PONTOS
Triggering label=EROS
Triggering label=CHRONOS
All jobs except the ones on "PONTOS" successfully terminate.
The parent job keeps executing, waiting for all its children termination, but it
never stops as the child job supposed to run on "PONTOS" remains in the build queue.
Enabling the master Hudson node has no effect. Its corresponding job also
remains in the build queue.
Thank you for reading.
Regards,
Regis.
Originally reported by rdesgroppes, imported from: Matrix parent build shouldn't consume an executor.
- assignee: rdesgroppes
- status: Closed
- priority: Major
- component(s): matrix-project-plugin
- resolution: Fixed
- resolved: 2015-02-22T17:42:32+00:00
- votes: 24
- watchers: 10
- imported: 2025-12-06
Raw content of original issue
Hi,
On a multi-configuration project, I encounter a systematic deadlock because the parent job and one of its child are queued on the same node.
The configuration matrix is as follows: [x] Build on multiple nodes [-] Individual nodes [x] APOLLON (apollon) [x] CHRONOS (chronos) [x] DEMETER (demeter) [ ] EOS (eos) [x] EROS (eros) [x] PAN (pan) [x] PONTOS (pontos) [ ] master (the master Hudson node) [+] Labels [ ] Axes
Here is the console output:
started Building remotely on PONTOS Triggering label=PAN Triggering label=APOLLON Triggering label=DEMETER Triggering label=PONTOS Triggering label=EROS Triggering label=CHRONOS
All jobs except the ones on "PONTOS" successfully terminate. The parent job keeps executing, waiting for all its children termination, but it never stops as the child job supposed to run on "PONTOS" remains in the build queue.
Enabling the master Hudson node has no effect. Its corresponding job also remains in the build queue.
Thank you for reading.
Regards, Regis.
- environment:
Platform: All, OS: All
Activity
jenkins-infra-bot commentedon Oct 22, 2007
Raw content of original comment:
Right. The parent build needs to be run outside of the normal executors so that
it can let child builds use that executor.
In the mean time, a work around is to tie the parent build to somewhere where
more executors are available.
jenkins-infra-bot commentedon Oct 23, 2007
rdesgroppes:
Raw content of original comment:
I don't see how to put in place the workaround you propose, in that the
multi-project configuration page doesn't allow to tie the parent build to a
dedicated node.
jenkins-infra-bot commentedon Oct 29, 2007
Raw content of original comment:
jenkins-infra-bot commentedon Mar 19, 2008
Raw content of original comment:
jenkins-infra-bot commentedon Apr 18, 2008
musilt2:
Raw content of original comment:
jenkins-infra-bot commentedon Apr 18, 2008
musilt2:
Raw content of original comment:
what's the current status of this issue? any time-frame when the fix will be
available?
jenkins-infra-bot commentedon Apr 18, 2008
mirilovic:
Raw content of original comment:
It would be great to have a possibility to tie the parent job to particular
machine - and I personally think the best one would be Master.
jenkins-infra-bot commentedon Jul 6, 2008
Raw content of original comment:
Kohsuke, unless I'm mistaken, a code change in the Hudson Core is needed to even
try the work-around.
Like others, I'm not sure how to configure Hudson to tie the parent build to a
specific node. In node selection, I selected 1 label for multiple axes to use,
but I don't see any options for the parent build.
jenkins-infra-bot commentedon Jul 18, 2009
Raw content of original comment:
Code changed in hudson
User: : kohsuke
Path:
http://fisheye4.cenqua.com/changelog/hudson/?cs=19911
Log:
JENKINS-936Created a branch to experiment with the solution.jenkins-infra-bot commentedon Jul 18, 2009
Raw content of original comment:
Note to myself. There's two ways to do this.
One is to just add one more executor temporarily to compensate the effect. This
is easy, but the downside is that the added executor may end up doing something
else, and it might take a bit of time before they get released. Plus this will
cause a UI discrepancy between the user setting vs what they see.
Another is to add subtype of Executor and let it run just so that it can execute
the parent build. The trick is to find a situation where an executor shouldn't
run (like Hudson is shutting down) so that we won't lose the item.
jenkins-infra-bot commentedon Jul 19, 2009
Raw content of original comment:
Kohsuke, from your last comment, I think your second suggestion is a better solution. Just add a "virtual"
executor to the master that can run the composite builds, and also making the composite build of type
"virtual".
jenkins-infra-bot commentedon Jul 20, 2009
Raw content of original comment:
Code changed in hudson
User: : kohsuke
Path:
branches/matrix-parent/core/src/main/java/hudson/matrix/MatrixProject.java
branches/matrix-parent/core/src/main/java/hudson/model/Computer.java
branches/matrix-parent/core/src/main/java/hudson/model/Executor.java
branches/matrix-parent/core/src/main/java/hudson/model/OneOffExecutor.java
branches/matrix-parent/core/src/main/java/hudson/model/Queue.java
branches/matrix-parent/core/src/main/resources/lib/hudson/executors.jelly
http://fisheye4.cenqua.com/changelog/hudson/?cs=19998
Log:
JENKINS-936I believe this should do.jenkins-infra-bot commentedon Jul 21, 2009
Raw content of original comment:
Hudson 1.317 will include the fix for this, but because of a potential impact to
users, the fix is disabled by default for now. I'd like interested parties to
enable this (by setting the system property
hudson.model.Hudson.flyweightSupport=true on Hudson JVM), and report back if
this is working OK for you.
If the fix appears to work without any side effect, I'll enable the fix by default.
jenkins-infra-bot commentedon Aug 27, 2009
hydraswitch:
Raw content of original comment:
I set the property as described and hit Build Now for my multi configuration job.
thread?
The one Node that I did not select the job for is now showing a Dead
or something. Not sure what happened. It goes away if I stop and restart hudson.
It comes back again each time the job runs. It seems to run correctly on the nodes
that I checked it on for.
jenkins-infra-bot commentedon Sep 23, 2009
emmulator:
Raw content of original comment:
I was hoping this might help with the problems I've encountered in Issue 1022.
It does seem to address the problem of the deadlock, but without the ability to
have the parent job run on a different slave node from any of the children, the
interaction with perforce still causes one of the children to not sync its
workspace.
I found this issue when looking for how I would expose the
assignedNode/hasSlaveAffinity property of a MatrixProject, in the hopes that if
I could tie the parent to a particular node, it would no longer interfere with
the children. I've noticed that a few other people in this ticket were thinking
along the same lines, but you have chosen this virtual executor approach
instead. Is there a reason it would not be desirable to be able to tie the
parent to a particular node? And even if you don't like that approach for the
general release, could you please point me to where in the source I would go to
expose that property? I realize that the 'real' solution to Issue 1022 probably
involves modifying the perforce plugin, but that seems more complicated, and I
was hoping this would work as a workaround in the meantime.
Thanks!
32 remaining items
jenkins-infra-bot commentedon Feb 22, 2015
Raw content of original comment:
I still have this issue on latest LTS. It blocks our executors when Restrict label for matrix job is used!
jenkins-infra-bot commentedon Feb 22, 2015
Raw content of original comment:
See my latest comment
jenkins-infra-bot commentedon Feb 22, 2015
Raw content of original comment:
Please file a new issue, and include specific information on how to reproduce this.
https://wiki.jenkins-ci.org/display/JENKINS/How+to+report+an+issue
jenkins-infra-bot commentedon Dec 6, 2025
[Original
is_duplicated_byfrom Jira: JENKINS-4552]jenkins-infra-bot commentedon Dec 6, 2025
[Original
is_duplicated_byfrom Jira: JENKINS-1561]jenkins-infra-bot commentedon Dec 6, 2025
[Original
is_duplicated_byfrom Jira: JENKINS-961]jenkins-infra-bot commentedon Dec 6, 2025
[Original
is_duplicated_byfrom Jira: JENKINS-1432]