I ran into an issue where, while building a new container image that is based upon the NI container image, if VIPM or Lab view are running at the time a RUN statement in the docker file finishes/ends, then this will leave an X11 lock file that will prevent new instances of the xvfb display from starting up in a subsequent RUN statement or running a container based on that new image.
I haven’t looked into the inner workings of the scripts that start up the display when it is needed, but it may be a good idea to find a way to clean up these lock files if it’s possible to detect when the container is starting up cold.
One thought that I have is that the counter that is inside of that National Instruments cache file should probably be more sophisticated and keep a line inside that file for the process ID and it’s start time, rather than using a simple counter. That will make it easier to detect if all of those processes are still running and then clean up lock files before attempting to start another display. This is just a wild guess to hopefully get some ideas flowing.
I hope it’s helpful. Let me know if you have questions or need help reproducing. I’m away from my computer so I don’t have the exact error messages in front of me at the moment.
I ran into an issue where, while building a new container image that is based upon the NI container image, if VIPM or Lab view are running at the time a RUN statement in the docker file finishes/ends, then this will leave an X11 lock file that will prevent new instances of the xvfb display from starting up in a subsequent RUN statement or running a container based on that new image.
I haven’t looked into the inner workings of the scripts that start up the display when it is needed, but it may be a good idea to find a way to clean up these lock files if it’s possible to detect when the container is starting up cold.
One thought that I have is that the counter that is inside of that National Instruments cache file should probably be more sophisticated and keep a line inside that file for the process ID and it’s start time, rather than using a simple counter. That will make it easier to detect if all of those processes are still running and then clean up lock files before attempting to start another display. This is just a wild guess to hopefully get some ideas flowing.
I hope it’s helpful. Let me know if you have questions or need help reproducing. I’m away from my computer so I don’t have the exact error messages in front of me at the moment.