I am writing a program to run svn up in parallel, and this causes the machine to freeze. When this happens, the server does not experience a boot problem.
Commands are launched using ThreadPool.map() on subprocess.Popen() :
def cmd2args(cmd): if isinstance(cmd, basestring): return cmd if sys.platform == 'win32' else shlex.split(cmd) return cmd def logrun(cmd): popen = subprocess.Popen(cmd2args(cmd), stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=curdir, shell=sys.platform == 'win32') for line in iter(popen.stdout.readline, ""): sys.stdout.write(line) sys.stdout.flush() ... pool = multiprocessing.pool.ThreadPool(argv.jobcount) pool.map(logrun, _commands)
argv.jobcount is a smaller multiprocessing.cpu_count() and the number of tasks to perform (in this case, 4). _commands - a list of lines with the commands below. shell set to True on Windows, so the shell can find executables because Windows does not have a which command, and finding the executable is a bit more complicated on Windows (the commands used for the cd directory&&svn up .. form, which also requires shell=True , but now this is done using the cwd parameter).
executable commands
svn up w:/srv/lib/dktabular svn up w:/srv/lib/dkmath svn up w:/srv/lib/dkforms svn up w:/srv/lib/dkorm
where each folder is a separate project / repository, but exists on the same Subversion server. The svn executable is a package with TortoiseSVN 1.8.8 (build 25755 - 64 bits). Code updated (i.e. svn up - no-op).
When the client freezes, the memory panel in the task manager is empty first:

and sometimes everything gets dark

If I wait a while (a few minutes), the car will eventually return.
Q1: Does it cocassify in parallel to trigger svn ?
Q2: Are there any problems with the way I use ThreadPool.map() and subprocess.Popen() ?
Q3: Are there any tools / strategies for debugging these problems?