[Bug 1169468] New: devel:gcc/gdb: Bug gdb errors when exec'd from 'other' pyenv
http://bugzilla.opensuse.org/show_bug.cgi?id=1169468 Bug ID: 1169468 Summary: devel:gcc/gdb: Bug gdb errors when exec'd from 'other' pyenv Classification: openSUSE Product: openSUSE.org Version: unspecified Hardware: x86-64 OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: 3rd party software Assignee: matz@suse.com Reporter: pgnet.dev@gmail.com QA Contact: bnc-team-screening@forge.provo.novell.com CC: rguenther@suse.com Found By: --- Blocker: --- running lsb_release -rd Description: openSUSE Leap 15.1 Release: 15.1 gdb -devel pkg rpm -qa | grep ^gdb- gdb-8.3.1-lp151.4.6.1.x86_64 from installs & execs nicely, with system-installed python. if, however, a separate pyenv has been installed, and is active, e.g., pyenv versions 2.7.17 * 3.8-dev (set by /usr/local/pyenv/version) then exec of packaged gdb fails (sort of), /usr/bin/gdb Error processing line 1 of /usr/lib/python3.6/site-packages/Paste-3.0.4-py2.7-nspkg.pth: Traceback (most recent call last): File "/usr/lib64/python3.6/site.py", line 168, in addpackage exec(line) File "<string>", line 1, in <module> File "<frozen importlib._bootstrap>", line 568, in module_from_spec AttributeError: 'NoneType' object has no attribute 'loader' Remainder of file ignored Error processing line 1 of /usr/lib/python3.6/site-packages/jaraco.functools-1.20-py3.6-nspkg.pth: Traceback (most recent call last): File "/usr/lib64/python3.6/site.py", line 168, in addpackage exec(line) File "<string>", line 1, in <module> File "<frozen importlib._bootstrap>", line 568, in module_from_spec AttributeError: 'NoneType' object has no attribute 'loader' Remainder of file ignored Error processing line 1 of /usr/lib/python3.6/site-packages/sphinxcontrib_websupport-1.1.0-py3.5-nspkg.pth: Traceback (most recent call last): File "/usr/lib64/python3.6/site.py", line 168, in addpackage exec(line) File "<string>", line 1, in <module> File "<frozen importlib._bootstrap>", line 568, in module_from_spec AttributeError: 'NoneType' object has no attribute 'loader' Remainder of file ignored GNU gdb (GDB; openSUSE Leap 15.1) 8.3.1 Copyright (C) 2019 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-suse-linux". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://bugs.opensuse.org/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word". (gdb) iiuc, due to the hardcoded build-time spec's --with-python=%{_bindir}/%{python} \ &/or the runtime ldd /usr/bin/gdb | grep py libpython3.6m.so.1.0 => /usr/lib64/libpython3.6m.so.1.0 (0x00007f8262a54000) a *local* build/install of gdb, built _within_ the pyenv, spec'ing its repective "--with-python", which gdb /usr/local/gdb/bin/gdb gdb --version GNU gdb (GDB) 10.0.50.20200414-git Copyright (C) 2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. works fine, also linked to the pyenv's correct python lib ldd `which gdb` | grep py libpython3.8.so.1.0 => /usr/local/pyenv/versions/3.8-dev/lib/libpython3.8.so.1.0 (0x00007f1eb6bba000) the exec errors should be cleared or avoided iiuc, system-packaged gdb should either link rpath'd to system python, and possibly spec PYTHON* env, so as not to fire errors when used in a pyenv or, adapt (not clear yet if/how this works) to being exec'd from within an active, non-system pyenv -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1169468 pgnd _ <pgnet.dev@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tdevries@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1169468 pgnd _ <pgnet.dev@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Found By|--- |Community User -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1169468 http://bugzilla.opensuse.org/show_bug.cgi?id=1169468#c1 Tom de Vries <tdevries@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |matz@suse.com Assignee|matz@suse.com |tdevries@suse.com --- Comment #1 from Tom de Vries <tdevries@suse.com> --- This change: ... Index: gdb.spec =================================================================== --- gdb.spec (revision 245) +++ gdb.spec (working copy) @@ -755,7 +755,7 @@ --without-libexpat-prefix \ --enable-tui \ %if 0%{!?_without_python:1} - --with-python=%{_bindir}/%{python} \ + --with-python=$(readlink -e %{_bindir}/%{python}) \ %else --without-python \ %endif ... make sure we have: ... $ configure ... --with-python=/usr/bin/python3.8 ... instead of: ... $ configure ... --with-python=/usr/bin/python3 ... -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1169468 http://bugzilla.opensuse.org/show_bug.cgi?id=1169468#c4 --- Comment #4 from Tom de Vries <tdevries@suse.com> ---
/usr/bin/gdb Error processing line 1 of /usr/lib/python3.6/site-packages/Paste-3.0.4-py2.7-nspkg.pth:
This looks suspicious. You're using leap 15.1. The python-Paste version that goes with that is 2.0.3. The version shown here is 3.0.4. That's not the one tumbleweed currently uses, that's 3.4.0. And looking at tumbleweed history, I don't find any package to use 3.0.4 (version jump went from 2.0.3 to 3.0.5). So, what is the provenance of that package? Furthermore, it seems curious that a python2.7 package landed in the python 3.6 site-package directory. Looking at the tumbleweed package: ... $ rpm -qlp ~/Downloads/python2-Paste-3.4.0-1.1.noarch.rpm \ | grep Paste-3.4.0-py2.7-nspkg.pth /usr/lib/python2.7/site-packages/Paste-3.4.0-py2.7-nspkg.pth ... things land in the correct directory. So, is there an actual file /usr/lib/python3.6/site-packages/Paste-3.0.4-py2.7-nspkg.pth on your system? How did it get there? --- I think we need to establish whether there's a gdb problem, or whether your system python is broken. I locally (on my openSUSE Leap 15.1 system) created a file: ... $ cat /usr/lib/python3.6/site-packages/Paste-3.4.0-py2.7-nspkg.pth import sys, types, os;raise NameError('HiThere') ... and with system gdb, I see: ... $ gdb -q Error processing line 1 of /usr/lib/python3.6/site-packages/Paste-3.4.0-py2.7-nspkg.pth: Traceback (most recent call last): File "/usr/lib64/python3.6/site.py", line 168, in addpackage exec(line) File "<string>", line 1, in <module> NameError: HiThere Remainder of file ignored (gdb) ... and with system python, I see that same: ... $ /usr/bin/python3.6 Error processing line 1 of /usr/lib/python3.6/site-packages/Paste-3.4.0-py2.7-nspkg.pth: Traceback (most recent call last): File "/usr/lib64/python3.6/site.py", line 168, in addpackage exec(line) File "<string>", line 1, in <module> NameError: HiThere Remainder of file ignored Python 3.6.10 (default, Jan 16 2020, 09:12:04) [GCC] on linux Type "help", "copyright", "credits" or "license" for more information.
...
So, to me it looks like you have a broken system python. I cannot comment on the root cause, but it seems increasingly likely that there is no gdb issue here. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com