New submission from Miro Hrončok <m...@hroncok.cz>: 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. ---------- components: Tests messages: 367641 nosy: hroncok, vstinner priority: normal severity: normal status: open title: pythoninfo collect_gdb() blows up when gdb fails to run versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40436> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com