You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
kasium opened this issue
Nov 22, 2024
· 4 comments
Labels
3.13bugs and security fixes3.14bugs and security fixestriagedThe issue has been accepted as valid by a triager.type-bugAn unexpected behavior, bug, or error
Reading symbols from .pyenv/versions/3.13.0/bin/python...
Attaching to program: .pyenv/versions/3.13.0/bin/python, process 53537
Reading symbols from .pyenv/versions/3.13.0/lib/libpython3.13.so.1.0...
Reading symbols from /lib64/libpthread.so.0...
(No debugging symbols found in /lib64/libpthread.so.0)
Reading symbols from /lib64/libdl.so.2...
(No debugging symbols found in /lib64/libdl.so.2)
Reading symbols from /lib64/libutil.so.1...
(No debugging symbols found in /lib64/libutil.so.1)
Reading symbols from /lib64/libm.so.6...
(No debugging symbols found in /lib64/libm.so.6)
Reading symbols from /lib64/libc.so.6...
(No debugging symbols found in /lib64/libc.so.6)
Reading symbols from /lib64/ld-linux-x86-64.so.2...
(No debugging symbols found in /lib64/ld-linux-x86-64.so.2)
Reading symbols from .pyenv/versions/3.13.0/lib/python3.13/lib-dynload/readline.cpython-313-x86_64-linux-gnu.so...
Reading symbols from /lib64/libreadline.so.7...
(No debugging symbols found in /lib64/libreadline.so.7)
Reading symbols from /lib64/libtinfo.so.6...
(No debugging symbols found in /lib64/libtinfo.so.6)
Reading symbols from .pyenv/versions/3.13.0/lib/python3.13/lib-dynload/_opcode.cpython-313-x86_64-linux-gnu.so...
Reading symbols from .pyenv/versions/3.13.0/lib/python3.13/lib-dynload/unicodedata.cpython-313-x86_64-linux-gnu.so...
Reading symbols from .pyenv/versions/3.13.0/lib/python3.13/lib-dynload/select.cpython-313-x86_64-linux-gnu.so...
Reading symbols from .pyenv/versions/3.13.0/lib/python3.13/lib-dynload/_struct.cpython-313-x86_64-linux-gnu.so...
Reading symbols from .pyenv/versions/3.13.0/lib/python3.13/lib-dynload/termios.cpython-313-x86_64-linux-gnu.so...
Reading symbols from .pyenv/versions/3.13.0/lib/python3.13/lib-dynload/fcntl.cpython-313-x86_64-linux-gnu.so...
Reading symbols from .pyenv/versions/3.13.0/lib/python3.13/lib-dynload/_curses.cpython-313-x86_64-linux-gnu.so...
Reading symbols from /lib64/libncursesw.so.6...
(No debugging symbols found in /lib64/libncursesw.so.6)
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
0x00007f798865ea53 in poll () from /lib64/libc.so.6
--Type <RET> for more, q to quit, c to continue without paging--
Missing separate debuginfos, use: zypper install glibc-debuginfo-2.31-150300.89.2.x86_64 libncurses6-debuginfo-6.1-150000.5.27.1.x86_64 libreadline7-debuginfo-7.0-150400.27.3.2.x86_64
(gdb) py-bt
Traceback (most recent call first):
(unable to read python frame information)
<built-in method exec of module object at remote 0x7f7988499800>
(unable to read python frame information)
If the same setup is used but python is compiled in non-optimized mode (just don't set the CC and PYTHON_CONFIGURE_OPTS env variable), the backtrace works as expected. Same applies for python 3.12 and lower
Reading symbols from .pyenv/versions/3.13.0/bin/python...
Attaching to program: .pyenv/versions/3.13.0/bin/python, process 79951
Reading symbols from .pyenv/versions/3.13.0/lib/libpython3.13.so.1.0...
Reading symbols from /lib64/libpthread.so.0...
(No debugging symbols found in /lib64/libpthread.so.0)
Reading symbols from /lib64/libdl.so.2...
(No debugging symbols found in /lib64/libdl.so.2)
Reading symbols from /lib64/libutil.so.1...
(No debugging symbols found in /lib64/libutil.so.1)
Reading symbols from /lib64/libm.so.6...
(No debugging symbols found in /lib64/libm.so.6)
Reading symbols from /lib64/libc.so.6...
(No debugging symbols found in /lib64/libc.so.6)
Reading symbols from /lib64/ld-linux-x86-64.so.2...
(No debugging symbols found in /lib64/ld-linux-x86-64.so.2)
Reading symbols from .pyenv/versions/3.13.0/lib/python3.13/lib-dynload/readline.cpython-313-x86_64-linux-gnu.so...
Reading symbols from /lib64/libreadline.so.7...
(No debugging symbols found in /lib64/libreadline.so.7)
Reading symbols from /lib64/libtinfo.so.6...
(No debugging symbols found in /lib64/libtinfo.so.6)
Reading symbols from .pyenv/versions/3.13.0/lib/python3.13/lib-dynload/_opcode.cpython-313-x86_64-linux-gnu.so...
Reading symbols from .pyenv/versions/3.13.0/lib/python3.13/lib-dynload/unicodedata.cpython-313-x86_64-linux-gnu.so...
Reading symbols from .pyenv/versions/3.13.0/lib/python3.13/lib-dynload/select.cpython-313-x86_64-linux-gnu.so...
Reading symbols from .pyenv/versions/3.13.0/lib/python3.13/lib-dynload/_struct.cpython-313-x86_64-linux-gnu.so...
Reading symbols from .pyenv/versions/3.13.0/lib/python3.13/lib-dynload/termios.cpython-313-x86_64-linux-gnu.so...
Reading symbols from .pyenv/versions/3.13.0/lib/python3.13/lib-dynload/fcntl.cpython-313-x86_64-linux-gnu.so...
Reading symbols from .pyenv/versions/3.13.0/lib/python3.13/lib-dynload/_curses.cpython-313-x86_64-linux-gnu.so...
Reading symbols from /lib64/libncursesw.so.6...
(No debugging symbols found in /lib64/libncursesw.so.6)
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
0x00007f947f668a53 in poll () from /lib64/libc.so.6
--Type <RET> for more, q to quit, c to continue without paging--
Missing separate debuginfos, use: zypper install glibc-debuginfo-2.31-150300.89.2.x86_64 libncurses6-debuginfo-6.1-150000.5.27.1.x86_64 libreadline7-debuginfo-7.0-150400.27.3.2.x86_64
(gdb) py-bt
Traceback (most recent call first):
File ".pyenv/versions/3.13.0/lib/python3.13/_pyrepl/unix_console.py", line 426, in wait
or bool(self.pollob.poll(timeout))
File ".pyenv/versions/3.13.0/lib/python3.13/_pyrepl/reader.py", line 756, in handle1
self.console.wait(100)
File ".pyenv/versions/3.13.0/lib/python3.13/_pyrepl/reader.py", line 801, in readline
self.handle1()
File ".pyenv/versions/3.13.0/lib/python3.13/_pyrepl/readline.py", line 389, in multiline_input
return reader.readline()
File ".pyenv/versions/3.13.0/lib/python3.13/_pyrepl/simple_interact.py", line 151, in run_multiline_interactive_console
statement = multiline_input(more_lines, ps1, ps2)
File ".pyenv/versions/3.13.0/lib/python3.13/_pyrepl/main.py", line 59, in interactive_console
run_multiline_interactive_console(console)
File ".pyenv/versions/3.13.0/lib/python3.13/_pyrepl/__main__.py", line 6, in <module>
__pyrepl_interactive_console()
<built-in method exec of module object at remote 0x7f947f4a5800>
File "<frozen runpy>", line 88, in _run_code
File "<frozen runpy>", line 198, in _run_module_as_main
Steps to reproduce
install pyenv incl. all OS packages which are needed
kasium
changed the title
python 3.13 gdb extension does not work with optimized build
GDB extensions fails with optimized 3.13 due to cframe removal
Jan 9, 2025
With an optimized build, the first if evaluates to false, so that the code tries to read cframe. This variable was removed with #108036 so there needs to be some fix which changes the usage of cframe to the successor
I have basically 0 knowledge of that file. @markshannon has touched that one a few times I believe but not sure if he is the expert either. He is the expert on the cframe overall however. I can try to take a look if he's too busy.
The reference to cframe is clearly wrong, we should remove that.
It looks like the gdb extension for 3.13 needs debug symbols to work.
The exact behavior of the gdb plugin is neither tested or documented, it is just a "best effort".
The docs say only that a debug build is recommended, not required for debugging, so maybe we should treat this as a bug?
If it worked for 3.12, it would be nice if it worked for 3.13 and 3.14.
3.13bugs and security fixes3.14bugs and security fixestriagedThe issue has been accepted as valid by a triager.type-bugAn unexpected behavior, bug, or error
Bug report
Bug description:
When using the python gdb extention
python-gdb.py
on an optimized python 3.13 installation, gdb shows no backtrace:If the same setup is used but python is compiled in non-optimized mode (just don't set the
CC
andPYTHON_CONFIGURE_OPTS
env variable), the backtrace works as expected. Same applies for python 3.12 and lowerSteps to reproduce
export CC="gcc-12"
export PYTHON_CONFIGURE_OPTS="--enable-shared --with-lto --enable-optimizations"
pyenv install 3.13.0
6.1.
import os
6.2.
os.getpid()
6.3.
while True: pass
gdb -q <path-to-pyenv>/versions/3.13.0/bin/python -p <pid>
py-bt
OS: SUSE Linux Enterprise Server 15 SP4
CPython versions tested on:
3.13
Operating systems tested on:
Linux
The text was updated successfully, but these errors were encountered: