Message367641
We had this weird traceback when running pythoninfo in Fedora build with Python 3.9.0a6:
+ /builddir/build/BUILD/Python-3.9.0a6/build/optimized/python -m test.pythoninfo
ERROR: collect_gdb() failed
Traceback (most recent call last):
File "/builddir/build/BUILD/Python-3.9.0a6/Lib/test/pythoninfo.py", line 761, in collect_info
collect_func(info_add)
File "/builddir/build/BUILD/Python-3.9.0a6/Lib/test/pythoninfo.py", line 383, in collect_gdb
version = version.splitlines()[0]
IndexError: list index out of range
I have debugged the problem and it is:
>>> subprocess.run(["gdb", "-nx", "--version"])
CompletedProcess(args=['gdb', '-nx', '--version'], returncode=-11)
There is a segfault. Possibly because gdb was linked to libpython from 3.9.0a5 and we run it trough subprocess from 3.9.0a6.
The code in pythoninfo is:
try:
proc = subprocess.Popen(["gdb", "-nx", "--version"],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
universal_newlines=True)
version = proc.communicate()[0]
except OSError:
return
That means it is designed to ignore errors. But it only ignores some errors. Should it only attempt to parse the version when proc.returncode is 0?
I don't know yet if the tests will fail as well, maybe the problem will be bigger. |
|
Date |
User |
Action |
Args |
2020-04-29 11:36:45 | hroncok | set | recipients:
+ hroncok, vstinner |
2020-04-29 11:36:45 | hroncok | set | messageid: <1588160205.58.0.824942554925.issue40436@roundup.psfhosted.org> |
2020-04-29 11:36:45 | hroncok | link | issue40436 messages |
2020-04-29 11:36:45 | hroncok | create | |
|