jenkinsci / jenkinsci/matrix-project-plugin

[JENKINS-11162] Matrix builds get stuck in the queue

Open
#474 0 comments 0 reactions 0 assignees View on GitHub
component:matrix-project-plugin imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
17
Forks
85
Avg merge
4h 27m
Merged PRs (30d)
5

Description

We recently updated our Jenkins installation from 1.409 to 1.421. Since doing that, matrix builds end up stuck in the build queue waiting for an available executor. These are jobs that have existed for quite a long time (over a year), and the Jenkins upgrade is the only thing that I can pinpoint as a change. Updating to 1.423, 1.425, and 1.428 did not resolve the issue for us. I saw that there is one somewhat similar item in the issue tracker, although in our case, it doesn't matter if the slaves are idle or active. Our matrix builds just never start.

I am able to reproduce it using a freshly created job. I made a new matrix build that references no SCM repository and has a single build step that executes the following Python script:

import os

print os.environ

I added an axis for the slave nodes and set it to run on a specific node. I have let that build sit as pending for about half an hour while other non-matrix builds destined for the same build node are passing it by in the queue. Our production matrix builds have even ended up sitting for a day or more in the queue

We do not use any plug-ins that manipulate matrix builds. In particular, we do not have the "Exclude flyweight" plug-in installed. I tried removing /var/run/jenkins/war, but that did not fix our problem.

---
Originally reported by patrick, imported from: Matrix builds get stuck in the queue


  • status: Open
  • priority: Major
  • component(s): matrix-project-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 2025-12-06

Raw content of original issue

We recently updated our Jenkins installation from 1.409 to 1.421. Since doing that, matrix builds end up stuck in the build queue waiting for an available executor. These are jobs that have existed for quite a long time (over a year), and the Jenkins upgrade is the only thing that I can pinpoint as a change. Updating to 1.423, 1.425, and 1.428 did not resolve the issue for us. I saw that there is one somewhat similar item in the issue tracker, although in our case, it doesn't matter if the slaves are idle or active. Our matrix builds just never start.

I am able to reproduce it using a freshly created job. I made a new matrix build that references no SCM repository and has a single build step that executes the following Python script:



import os

print os.environ


I added an axis for the slave nodes and set it to run on a specific node. I have let that build sit as pending for about half an hour while other non-matrix builds destined for the same build node are passing it by in the queue. Our production matrix builds have even ended up sitting for a day or more in the queue

We do not use any plug-ins that manipulate matrix builds. In particular, we do not have the "Exclude flyweight" plug-in installed. I tried removing /var/run/jenkins/war, but that did not fix our problem.

  • environment: Ubuntu 10.04.3, Java 1.6.0_22-b04 (installed using sun-java6-bin 6.22-0ubuntu1~8.04.1), Jenkins 1.421 through 1.428 (and possibly newer)

Contributor guide

Open the contributing guide

Research direction

No source files or tests are named. Start by reproducing the issue with a fresh matrix job, a node axis, and the provided Python build step, then trace how matrix builds enter and wait in the Jenkins build queue. Done means matrix builds acquire an available executor and start ahead of, or consistently with, other queued builds.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, ci-cd, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.