playground update blocks if bzr produces a lot of output

Bug #592662 reported by Maciej Muehleisen on 2010-06-11
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openWNS SDK
Medium
Karsten Klagges

Bug Description

If a huge commit changed a lot of files playground.py upgrade will produce a lot of output. wnbsbase/rcs/Output.py uses stderr and stdout directly from the subprocess, causing blocking as described in http://docs.python.org/library/subprocess.html 17.1.2 Unfortunately I have no idea how to use communicate() to prevent the subprocess from blocking.

Changed in openwns-sdk:
status: New → Confirmed
importance: Undecided → Medium

I am not sure if this is easy to fix. I have tried to remove the call to subprocess.wait() in wnsbase.rcs.Bazaar which causes the blocking. At the moment I cannot verify that it fixes the problem. Could you provide a test or something, so that I can reproduce the bug?

Changed in openwns-sdk:
status: Confirmed → Incomplete
Maciej Muehleisen (mue-comnets) wrote :

import subprocess
p = subprocess.Popen("ls -R ./", shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True)
p.wait()

This subprocess (listing directories recursively) produces a lot of output and therefore blocks when nobody "collects" it from stderr and stdin. In the shell "ls -R" takes a few seconds and is done. Above code results in a deadlock.

Changed in openwns-sdk:
status: Incomplete → Triaged
assignee: nobody → Karsten Klagges (karsten.klagges)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers