Status: Closed (View Workflow)
Xvfb plugin 1.0.15
Jenkins ver. 1.580.3
Rebuilder plugin 1.22
Environment Script Plugin 1.1.2
When rebuilding a single module of a multi-module project, I have an environment script which happens to fail (because $WORKSPACE is different from a normal top-level build, but any failure should do). When this environment script fails, the job naturally fails too, but the Xvfb plugin fails to terminate the Xvfb process it started, leading to problems in subsequent builds.
I'm having trouble coming up with an easy minimal reproducer, because I think it only happens when a multi-module build is involved. I suspect the failure has to happen in a Jenkins plugin (like Environment Script) too: a normal build failure is not enough.
This is the log from the rebuild which failed:
Building remotely on jenkins-slave-f20-kvm-7 (amd64-Fedora 20 amd64-Fedora-20 Fedora-20 Fedora kvm amd64) in workspace /home/fedora/jenkins/workspace/zanata-server-github-pull-requests/functional-test Xvfb starting$ Xvfb :1 -screen 0 1024x768x24 -fbdir /home/fedora/jenkins/xvfb-2015-04-28_11-25-15-3566362744314223079.fbdir [functional-test] $ /bin/sh -xe /tmp/org.zanata:functional-test6279959920485140886.sh + etc/scripts/allocate-jboss-ports /tmp/org.zanata:functional-test6279959920485140886.sh: line 1: etc/scripts/allocate-jboss-ports: No such file or directory FATAL: Unable to execute script, return code 1 Started calculate disk usage of build Finished Calculation of disk usage of build in 0 seconds Started calculate disk usage of workspace Finished Calculation of disk usage of workspace in 0 seconds Finished: FAILURE
Code changed in jenkins
User: Zoran Regvart
JENKINS-28147 Perform Environment tearDown if BuildWrapper signals error
Code changed in jenkins
Merge pull request #42 from zregvart/master
JENKINS-28147 Perform Environment tearDown if BuildWrapper fails
The pull request was merged against the maven plugin, it should be fixed with the release of version 2.13.
Hi, thanks for reporting the issue and excuse me for not getting back sooner.
I've managed to reproduce the issue and traced it down to an issue within the Maven job type in Jenkins. The Xvfb plugin is not notified of the failure of the Script environment plugin, and is not aware that the build failed so that it could terminate the started Xvfb process.
I've created a pull request against the Jenkins Maven plugin (see https://github.com/jenkinsci/maven-plugin/pull/42).
I'll monitor the updates of the pull request and close this issue if it gets merged and released.