Community
Participate
Working Groups
With the frequent restarts of Hudson, there seem to be stale Xvnc processes. Currently there are these (most probably) stale processes: ps -eouid,pid,stime,command | grep Xvnc ... 55011 23366 May17 Xvnc :22 -geometry 1024x768 -depth 24 -ac 55011 31113 May17 Xvnc :20 -geometry 1024x768 -depth 24 -ac 55011 32133 03:07 Xvnc :21 -geometry 1024x768 -depth 24 -ac note that all of those had been stared before the Hudson was last restarted: ps -eouid,pid,stime,command | grep hudson.war 55011 4057 14:41 /shared/common/ibm-java-ppc64-60-SR7/bin/java -Xms512m -Xmx1024m -jar /opt/users/hudsonbuild/hudson.war --configure=/opt/users/hudsonbuild/ Since the Xvnc plugin for Hudson is not aware of these processes this leads to errors like this: [workspace] $ Xvnc :21 -geometry 1024x768 -depth 24 -ac Fatal server error: Server is already active for display 21 If this server is no longer running, remove /tmp/.X21-lock and start again. which makes it effectively impossible to run tests which require GUI as part of our builds. Could you please make sure such stale processes are cleaned up upon restart of Hudson?
Given the command in Hudson to run Xvnc is this: Xvnc :${portnumber} -geometry 1024x768 -depth 24 -ac How about running something like this, when starting up Hudson? #!/bin/bash xvncProcesses=$(ps -eopid,command | grep -v grep | grep Xvnc | grep ac | sed "s/ /_/g") if [[ $xvncProcesses ]]; then for procline in $xvncProcesses; do procnum=$(echo $procline | sed "s#\(_Xvnc.\+\)##") #echo " '"${procline//_/ }"'" echo " kill -9 $procnum" kill -9 $procnum done fi
Seems like a script integrated with start/restart is a good idea to me. Or, webmasters, do you think it should be a separate script? I can't "read" the script in comment #1 well enough to know if it is correct, but I know tonight I restarted hudson and "manually" killed all the Xvnc processes running under hudsonbuild id. Kind of a hassle. Assigning to webmasters in case you agree it should be integrated with rchudson start/restart. If that's not possible, or you think it should be a separate step, feel free to reassign back to default inbox. Thanks,
I smell a script war! How about a simplified version: #!/bin/bash for i in $(ps -eopid,command | egrep "[X]vnc.*-ac" | awk '{print $1}'); do echo "kill -9 $i" kill -9 $i done
*** Bug 308981 has been marked as a duplicate of this bug. ***
I've added Denis script to the hudson startup script on build. -M.
As there are currently no stale vnc processes list I'm going to close this bug. -M.