source-builder randomly hangs
Chris Johns
chrisj at rtems.org
Tue May 5 07:54:14 UTC 2020
On 5/5/20 5:26 pm, Anders Montonen wrote:
>> 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.
OK.
>> 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.
We need to support python 2.7 but I like what you are suggesting. Any
chance of a patch for execute.py? Anything that helps in this area is
welcome. It is a hot spot for performance as well.
Thanks for looking into this.
Chris
More information about the users
mailing list