If the VNC server segfaults the sanity test script can't start a new one because the lock file still exists: Warning: ubuntu1204:1 is taken because of /tmp/.X1-lock Remove this file if there is no X server ubuntu1204:1 A VNC server is already running as :1 I suggest that if the socket isn't open, the lock file should be deleted before starting the VNC server. Also the netstat invocation can be improved as netstat -an|grep 5901 will match a unix socket open on /tmp/lolo5901lolol. netstat -tnl | grep :5901 will have less false positives.
I'd propose adding a script to the autobuilder somewhere in PATH which handles setting up VNC. The actual tasks can then just call the script to ensure its setup there rather than putting all this logic in the tasks.
Created a script to check for a running vnc server, and if not running cleanup dangling lock files and restart the server. Invoke the script from the various sanity test build steps. Patch submitted to mailing list.
Patch merged to master by Joshua on 8/31.