-
Bug
-
Resolution: Won't Do
-
Minor
-
None
-
Ubuntu 14.04
We were getting the following intermittent error on our builds:
FATAL: /var/lib/jenkins/xvfb-157-8380869945976165128.fbdir/.nfs00000000000ad5a20004f107: Device or resource busy
java.nio.file.FileSystemException: /var/lib/jenkins/xvfb-157-8380869945976165128.fbdir/.nfs00000000000ad5a20004f107: Device or resource busy
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91)
In order to address this, I started passing the following flag: "-fbdir /tmp"
See attached screen shot.
The error seems to have gone away, but in the console log, I see that the -fbdir flag is being passed twice. Does Xvfb ignore the first -fbdir parameter and only read the 2nd one?
Here is the new message in the console log:
Xvfb starting$ /usr/bin//Xvfb -displayfd 2 -screen 0 1024x768x24 -fbdir /var/lib/jenkins/xvfb-381-8251290578769946893.fbdir -fbdir /tmp
By looking at the Xorg source xserver/tree/hw/vfb/InitOutput.c:365 you can see that the last fbdir argument takes precedence. I would strongly suggest that you leave the management of fbdir argument to the Xvfb Jenkins plugin and see if you can fix the underlaying OS problem (Device or resource busy). Setting the fbdir to a non unique directory will fail your build as the Xvfb would not be able to run if the job is run in parallel with (another or same) job that uses the same fbdir directory.
If you absolutely need to specify your own fbdir directory and take it upon yourself to maintain the uniqueness of it across all your builds I could modify the Jenkins Xvfb plugin to use the specified instead of the temporary directory unique to each run.