source-builder randomly hangs

Anders Montonen Anders.Montonen at iki.fi
Tue May 5 07:26:19 UTC 2020


Hi,

> On 4 May 2020, at 4:05, Chris Johns <chrisj at rtems.org> wrote:
> 
> On 2/5/20 10:04 pm, Anders Montonen wrote:
>> A couple of times I’ve had source-builder hang seemingly randomly, with the following Python backtrace:
> Do you see this problem with the bootstrap script 'rtems-bootstrap' in the top of the rtems.git rep?

I haven’t seen it yet, but I haven’t run it very many times.

> Interesting and your analysis sounds right. I am not sure how this could be handled. A test case with execute.py would be a good start, see the end of the file.


We could try passing “universal_newlines=True” to the subprocess.Popen() constructor. This will open stdin/stdout/stderr in text mode, using the current locale setting. Python 3.6+ allows specifying the encoding in the constructor, if that makes a difference. Another option would be to manually wrap the output streams in an io.TextIOWrapper, which is essentially what Popen() does when given any of these arguments.

Regards,
Anders


More information about the users mailing list