Skip to content

[3.13] gdb py-bt does not work #142096

Closed as duplicate
Closed as duplicate

Description

@cielavenir

Bug report

Bug description:

gdb ./python
r
Ctrl-C
py-bt
(gdb) py-bt
Traceback (most recent call first):
  (unable to read python frame information)
  <built-in method exec of module object at remote 0x7ffff7c39850>
  (unable to read python frame information)

3.13.3 is affected and 3.13.2 is not affected. (regression in point release, not good idea)

Also I bisected git and found 5646f6f . And reverting it onto 3.13.9 fixes py-bt:

(gdb) py-bt
Traceback (most recent call first):
  File "/home/user/devel/cpython/Lib/_pyrepl/unix_console.py", line 448, in wait
    or bool(self.pollob.poll(timeout))
  File "/home/usr/devel/cpython/Lib/_pyrepl/reader.py", line 705, in handle1
    self.console.wait(100)
  File "/home/user/devel/cpython/Lib/_pyrepl/reader.py", line 750, in readline
    self.handle1()
  File "/home/user/devel/cpython/Lib/_pyrepl/readline.py", line 390, in multiline_input
    return reader.readline()
  File "/home/user/devel/cpython/Lib/_pyrepl/simple_interact.py", line 146, in run_multiline_interactive_console
    statement = multiline_input(more_lines, ps1, ps2)
  File "/home/user/devel/cpython/Lib/_pyrepl/main.py", line 59, in interactive_console
    run_multiline_interactive_console(console)
  File "/home/user/devel/cpython/Lib/_pyrepl/__main__.py", line 10, in <module>
    __pyrepl_interactive_console()
  <built-in method exec of module object at remote 0x7ffff7c39850>
  File "<frozen runpy>", line 88, in _run_code
  File "<frozen runpy>", line 198, in _run_module_as_main

This can be confirmed by building https://github.com/cielavenir/cpython/commits/3.13.9-pybt .

However I don't know why "removing _PyReftracerTrack" fixes py-bt. Moreover, this commit does not affect py-bt on 3.14.

There is a similar report #127147 but this issue happens without --enable-optimizations.

Tested on Debian 13, GCC 14


The reason is unlikely the same as #142095 , so I separated the issue.

CPython versions tested on:

3.13

Operating systems tested on:

Linux

Activity

  1. StanFromIreland commented on Nov 29, 2025

    @StanFromIreland
    Member

    We do not need separate issues for each affected version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions