Enabling the Xvfb plugin on matrix jobs starts a Xvfb server for the job itself and one for each configuration.

      The Xvfb servers for the configurations are stoppd properly, but the Xvfb server for the job itself keeps running when the job finishes. This ends up in locked screens and a vast number of directories.

      We experienced that on a master only instance as well as in master-slave mode.

      Xvfb plugin version 1.0.2

          [JENKINS-14483] Remaining Xvfb processes in matrix jobs

          Code changed in jenkins
          User: Zoran Regvart
          Path:
          src/main/java/org/jenkinsci/plugins/xvfb/XvfbBuildWrapper.java
          src/main/java/org/jenkinsci/plugins/xvfb/XvfbEnvironment.java
          http://jenkins-ci.org/commit/xvfb-plugin/b25ee74766b91b268f740640590f985191323a21
          Log:
          JENKINS-14483 Remaining Xvfb processes in matrix jobs

          implemented as kindly suggested by Chris Jonhson on jenkins-dev mailing
          list

          https://groups.google.com/d/topic/jenkinsci-dev/KQVDCV9ATm8/discussion

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Zoran Regvart Path: src/main/java/org/jenkinsci/plugins/xvfb/XvfbBuildWrapper.java src/main/java/org/jenkinsci/plugins/xvfb/XvfbEnvironment.java http://jenkins-ci.org/commit/xvfb-plugin/b25ee74766b91b268f740640590f985191323a21 Log: JENKINS-14483 Remaining Xvfb processes in matrix jobs implemented as kindly suggested by Chris Jonhson on jenkins-dev mailing list https://groups.google.com/d/topic/jenkinsci-dev/KQVDCV9ATm8/discussion

          zregvart added a comment -

          Thorsten, Chris Johnson helped me a great deal on the jenkins-dev mailing list (https://groups.google.com/d/topic/jenkinsci-dev/KQVDCV9ATm8/discussion) so I'm pretty confident that the version I've uploaded to Dropbox, finally, solves this issue. Now Xvfb is launched only for individual matrix jobs and should terminate and clean up when the job finishes. If I may be so bold to ask you to test on your end one more time, so that when you confirm that it's OK I can release version 1.0.4.

          Thank you!

          zregvart added a comment - Thorsten, Chris Johnson helped me a great deal on the jenkins-dev mailing list ( https://groups.google.com/d/topic/jenkinsci-dev/KQVDCV9ATm8/discussion ) so I'm pretty confident that the version I've uploaded to Dropbox, finally, solves this issue. Now Xvfb is launched only for individual matrix jobs and should terminate and clean up when the job finishes. If I may be so bold to ask you to test on your end one more time, so that when you confirm that it's OK I can release version 1.0.4. Thank you!

          Hi Zoran, this is the error message (in matrix job) after installing your latest snapshot version:

          Started by user Thorsten Kahler
          [EnvInject] - Preparing an environment for the job.
          [EnvInject] - Jenkins system variables are kept.
          [EnvInject] - Jenkins build variables are kept.
          [EnvInject] - [ERROR] - SEVERE ERROR occurs: null
          Finished: FAILURE
          

          This might be a compatibility issue with our outdated Jenkins version 1.434?

          Thorsten Kahler added a comment - Hi Zoran, this is the error message (in matrix job) after installing your latest snapshot version: Started by user Thorsten Kahler [EnvInject] - Preparing an environment for the job. [EnvInject] - Jenkins system variables are kept. [EnvInject] - Jenkins build variables are kept. [EnvInject] - [ERROR] - SEVERE ERROR occurs: null Finished: FAILURE This might be a compatibility issue with our outdated Jenkins version 1.434?

          zregvart added a comment -

          I'm guessing that env-inject plugin catches NullPointerException (probably here: https://github.com/jenkinsci/envinject-plugin/blob/master/src/main/java/org/jenkinsci/plugins/envinject/EnvInjectListener.java#L60), this could be due to setup method of xvfb plugin now returning null (https://github.com/jenkinsci/xvfb-plugin/blob/master/src/main/java/org/jenkinsci/plugins/xvfb/XvfbBuildWrapper.java#L255) on non unix platforms. Can it be that one of your slave is non-unix (windows)? It would probably be better for backward compatibility that the xvfb plugin does not return null on non-unix platforms, as it did in previous versions. I'll make that change and upload a new version on dropbox in a few minutes.

          zregvart added a comment - I'm guessing that env-inject plugin catches NullPointerException (probably here: https://github.com/jenkinsci/envinject-plugin/blob/master/src/main/java/org/jenkinsci/plugins/envinject/EnvInjectListener.java#L60 ), this could be due to setup method of xvfb plugin now returning null ( https://github.com/jenkinsci/xvfb-plugin/blob/master/src/main/java/org/jenkinsci/plugins/xvfb/XvfbBuildWrapper.java#L255 ) on non unix platforms. Can it be that one of your slave is non-unix (windows)? It would probably be better for backward compatibility that the xvfb plugin does not return null on non-unix platforms, as it did in previous versions. I'll make that change and upload a new version on dropbox in a few minutes.

          Code changed in jenkins
          User: Zoran Regvart
          Path:
          src/main/java/org/jenkinsci/plugins/xvfb/XvfbBuildWrapper.java
          http://jenkins-ci.org/commit/xvfb-plugin/a53ce0e6cf6acc96ad5a2020d1f0492e9e7b6492
          Log:
          JENKINS-14483 Remaining Xvfb processes in matrix jobs

          return empty environment instead of null from setUp method

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Zoran Regvart Path: src/main/java/org/jenkinsci/plugins/xvfb/XvfbBuildWrapper.java http://jenkins-ci.org/commit/xvfb-plugin/a53ce0e6cf6acc96ad5a2020d1f0492e9e7b6492 Log: JENKINS-14483 Remaining Xvfb processes in matrix jobs return empty environment instead of null from setUp method

          zregvart added a comment -

          Thorsten, I've uploaded a new snapshot on Dropbox, if it's OK now I'll release 1.0.4 later this afternoon.

          zregvart added a comment - Thorsten, I've uploaded a new snapshot on Dropbox, if it's OK now I'll release 1.0.4 later this afternoon.

          Hi Zoran, still the same error.

          Thorsten Kahler added a comment - Hi Zoran, still the same error.

          Code changed in jenkins
          User: Zoran Regvart
          Path:
          src/main/java/org/jenkinsci/plugins/xvfb/XvfbBuildWrapper.java
          http://jenkins-ci.org/commit/xvfb-plugin/81e7a1ff832b99bf2652b022c56eb1e81c96163c
          Log:
          JENKINS-14483 Remaining Xvfb processes in matrix jobs

          fix NPE with Environment Injector Plugin installed

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Zoran Regvart Path: src/main/java/org/jenkinsci/plugins/xvfb/XvfbBuildWrapper.java http://jenkins-ci.org/commit/xvfb-plugin/81e7a1ff832b99bf2652b022c56eb1e81c96163c Log: JENKINS-14483 Remaining Xvfb processes in matrix jobs fix NPE with Environment Injector Plugin installed

          zregvart added a comment -

          Hi Thorsten I was able to reproduce your problem with Environment Injector Plugin installed, luckily it was a very simple fix, and as usual I need your help testing the new version I've just uploaded to Dropbox.

          Thank you

          zregvart added a comment - Hi Thorsten I was able to reproduce your problem with Environment Injector Plugin installed, luckily it was a very simple fix, and as usual I need your help testing the new version I've just uploaded to Dropbox. Thank you

          zregvart added a comment -

          fixed in 1.0.4, changes in behavior are noted in the wiki (https://wiki.jenkins-ci.org/display/JENKINS/Xvfb+Plugin)

          zregvart added a comment - fixed in 1.0.4, changes in behavior are noted in the wiki ( https://wiki.jenkins-ci.org/display/JENKINS/Xvfb+Plugin )

            zregvart zregvart
            tkahler Thorsten Kahler
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: