This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author hroncok
Recipients hroncok, vstinner
Date 2020-04-29.11:36:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1588160205.58.0.824942554925.issue40436@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2020-04-29 11:36:45hroncoksetrecipients: + hroncok, vstinner
2020-04-29 11:36:45hroncoksetmessageid: <1588160205.58.0.824942554925.issue40436@roundup.psfhosted.org>
2020-04-29 11:36:45hroncoklinkissue40436 messages
2020-04-29 11:36:45hroncokcreate