[llvm-bugs] [Bug 43776] New: Hang when lit output redirected to file with python 3
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Oct 23 09:02:39 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=43776
Bug ID: 43776
Summary: Hang when lit output redirected to file with python 3
Product: Test Suite
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: lit
Assignee: unassignedbugs at nondot.org
Reporter: russell_gallop at sn.scee.net
CC: daniel at zuster.org, llvm-bugs at lists.llvm.org
With python 3.6.8, lit hangs if producing output with non-ascii characters and
redirecting to a file on Windows. This can happen if a test fails and has
non-ascii in the Script: output. Below I'm using the -a option to show all
output to elicit this so it doesn't need to fail.
To reproduce (with revision 689ce810598bec7b35dd7ebe33ce5c5cce1453c7)
>python --version
Python 3.6.8
>python build/bin/llvm-lit.py llvm/test/Other -a > afile.txt
llvm-lit.py: F:/git/llvm-project/llvm\utils\lit\lit\run.py:170: warning: Failed
to raise process limit: No module named 'resource'
Exception in thread Thread-5:
Traceback (most recent call last):
File "C:\Python36\lib\threading.py", line 916, in _bootstrap_inner
self.run()
File "C:\Python36\lib\threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "C:\Python36\lib\multiprocessing\pool.py", line 479, in _handle_results
cache[job]._set(i, obj)
File "C:\Python36\lib\multiprocessing\pool.py", line 649, in _set
self._callback(self._value)
File "F:/git/llvm-project/llvm\utils\lit\lit\run.py", line 134, in <lambda>
callback=lambda r, t=test: self._process_result(t, r))
File "F:/git/llvm-project/llvm\utils\lit\lit\run.py", line 80, in
_process_result
self.progress_callback(test)
File "F:/git/llvm-project/llvm\utils\lit\lit\main.py", line 189, in
progress_callback
display.update(test)
File "F:/git/llvm-project/llvm\utils\lit\lit\display.py", line 52, in update
self.print_result(test)
File "F:/git/llvm-project/llvm\utils\lit\lit\display.py", line 73, in
print_result
print(test.result.output)
File "C:\Python36\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode characters in position
304-305: character maps to <undefined>
This should complete in a second or two but hangs instead.
This works fine with python 2.7.15, or with one thread (-j 1), or not
outputting the script with non-ascii, or not redirecting to a file.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20191023/5019d69c/attachment.html>
More information about the llvm-bugs
mailing list