jenkinsci / jenkinsci/matrix-project-plugin

[JENKINS-52482] Jenkins using wrong build node using user-defined axis

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

Description

If using a project with user-defined axis, Jenkins doesn't trigger the given build node after checkout.

Here's a sample output (only the important parts), showing the correct checkout, after triggering axis failure (some names changed to xxx/yyy/uuu, the important parts bold):

 

Started by user uuu

Building remotely on WinMachine (windows) in workspace C:\Users\JenkinsSlave\workspace\xxx\yyy

[WS-CLEANUP] Deleting project workspace...

[WS-CLEANUP] Done

Checking out a fresh workspace because there's no workspace at C:\Users\JenkinsSlave\workspace\xxx\yyy

Cleaning local Directory .

Checking out ...

[...]

Triggering xxx » yyy » TARGET=zzz

xxx » yyy » TARGET=zzzz completed with result FAILURE

Touchstone configurations resulted in FAILURE, so aborting...

Finished: FAILURE

 

A look at the detailed results from the axis build shows Jenkins isn't using the given build node (WinMachine) after checkout:

 

Started by upstream project "xxx/yyy" build number 14

originally caused by:

Started by user uuu

Building on master in workspace /var/lib/jenkins/jobs/xxx/jobs/yyy/workspace/TARGET/ttt

[WS-CLEANUP] Deleting project workspace...

[WS-CLEANUP] Done

Checking out a fresh workspace because there's no workspace at /var/lib/jenkins/jobs/xxx/jobs/yyy/workspace/TARGET/ttt

Cleaning local Directory .

Checking out ...

[...]

[ttt] $ cmd /c call /tmp/jenkins3181971576682401817.bat

FATAL: command execution failed

java.io.IOException: error=2, No such file or directory

at java.lang.UNIXProcess.forkAndExec(Native Method)

at java.lang.UNIXProcess.(UNIXProcess.java:247)

at java.lang.ProcessImpl.start(ProcessImpl.java:134)

at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)

Caused: java.io.IOException: Cannot run program "cmd" (in directory "/var/lib/jenkins/jobs/xxx/jobs/yyy/workspace/TARGET/ttt"): error=2, No such file or directory

at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)

at hudson.Proc$LocalProc.(Proc.java:249)

at hudson.Proc$LocalProc.(Proc.java:218)

at hudson.Launcher$LocalLauncher.launch(Launcher.java:929)

at hudson.Launcher$ProcStarter.start(Launcher.java:449)

at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:109)

at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:66)

at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)

at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)

at hudson.model.Build$BuildExecution.build(Build.java:206)

at hudson.model.Build$BuildExecution.doRun(Build.java:163)

at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)

at hudson.model.Run.execute(Run.java:1794)

at hudson.matrix.MatrixRun.run(MatrixRun.java:153)

at hudson.model.ResourceController.execute(ResourceController.java:97)

at hudson.model.Executor.run(Executor.java:429)

Build step 'Execute Windows batch command' marked build as failure

Finished: FAILURE

 

---
Originally reported by gcopoix, imported from: Jenkins using wrong build node using user-defined axis


  • assignee: escoem
  • status: Open
  • priority: Critical
  • component(s): matrix-project-plugin
  • label(s): slave, windows
  • resolution: Unresolved
  • votes: 0
  • watchers: 2
  • imported: 2025-12-06

Raw content of original issue

If using a project with user-defined axis, Jenkins doesn't trigger the given build node after checkout.

Here's a sample output (only the important parts), showing the correct checkout, after triggering axis failure (some names changed to xxx/yyy/uuu, the important parts bold):

 

Started by user uuu
Building remotely on WinMachine (windows) in workspace C:\Users\JenkinsSlave\workspace\xxx\yyy
[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Done
Checking out a fresh workspace because there's no workspace at C:\Users\JenkinsSlave\workspace\xxx\yyy
Cleaning local Directory .
Checking out ...
[...]
Triggering xxx » yyy » TARGET=zzz
xxx » yyy » TARGET=zzzz completed with result FAILURE
Touchstone configurations resulted in FAILURE, so aborting...
Finished: FAILURE

 

A look at the detailed results from the axis build shows Jenkins isn't using the given build node (WinMachine) after checkout:

 

Started by upstream project "xxx/yyy" build number 14
originally caused by:
Started by user uuu
Building on master in workspace /var/lib/jenkins/jobs/xxx/jobs/yyy/workspace/TARGET/ttt
[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Done
Checking out a fresh workspace because there's no workspace at /var/lib/jenkins/jobs/xxx/jobs/yyy/workspace/TARGET/ttt
Cleaning local Directory .
Checking out ...
[...]
[ttt] $ cmd /c call /tmp/jenkins3181971576682401817.bat
FATAL: command execution failed
java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
Caused: java.io.IOException: Cannot run program "cmd" (in directory "/var/lib/jenkins/jobs/xxx/jobs/yyy/workspace/TARGET/ttt"): error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at hudson.Proc$LocalProc.<init>(Proc.java:249)
at hudson.Proc$LocalProc.<init>(Proc.java:218)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:929)
at hudson.Launcher$ProcStarter.start(Launcher.java:449)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:109)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:66)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
at hudson.model.Build$BuildExecution.build(Build.java:206)
at hudson.model.Build$BuildExecution.doRun(Build.java:163)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
at hudson.model.Run.execute(Run.java:1794)
at hudson.matrix.MatrixRun.run(MatrixRun.java:153)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Build step 'Execute Windows batch command' marked build as failure
Finished: FAILURE

 

environment

```
Jenkins 2.121.1, Windows node connected by JLNP agent,

Project bounded to a dedicated build node (by label or by node name).
```

Contributor guide

Open the contributing guide

Research direction

Start at the matrix-project-plugin execution path named in the trace, especially MatrixRun.run, and reproduce the user-defined-axis build with the dedicated Windows node described in the environment. Compare the node used before and after checkout; done means the axis build continues on the configured node and no longer tries to run cmd on master.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, ci-cd
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.