GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — `_remote_debugging`: No frame limit in `get_async_stack_trace()` · Issue #153364 · python/cpython

_remote_debugging: No frame limit in get_async_stack_trace() #153364

New issue
Copy link
New issue
Copy link
Closed
Closed
_remote_debugging: No frame limit in get_async_stack_trace()#153364
Copy link
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirtopic-profilingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@maurycy
maurycy
opened on Jul 8, 2026
Issue body actions

Bug report

Bug description:

We've got it in process_frame_chain():

cpython/Modules/_remote_debugging/frames.c

Lines 308 to 326 in 548c731

const size_t MAX_FRAMES = 1024 + 512;
size_t frame_count = 0;
assert(MAX_FRAMES > 0 && MAX_FRAMES < 10000);
ctx->stopped_at_cached_frame = 0;
ctx->last_frame_visited = 0;
while ((void*)frame_addr != NULL) {
PyObject *frame = NULL;
uintptr_t next_frame_addr = 0;
uintptr_t stackpointer = 0;
last_frame_addr = frame_addr;
if (++frame_count > MAX_FRAMES) {
PyErr_SetString(PyExc_RuntimeError, "Too many stack frames (possible infinite loop)");
set_exception_cause(unwinder, PyExc_RuntimeError, "Frame chain iteration limit exceeded");
return -1;
}
assert(frame_count <= MAX_FRAMES);

There's no such limit in parse_async_frame_chain():

cpython/Modules/_remote_debugging/asyncio.c

Line 937 in c843cb7

process_running_task_chain(

cpython/Modules/_remote_debugging/asyncio.c

Line 767 in c843cb7

parse_async_frame_chain(

cpython/Modules/_remote_debugging/asyncio.c

Line 989 in c843cb7

process_thread_for_async_stack_trace(

CPython versions tested on:

CPython main branch

Operating systems tested on:

macOS

Linked PRs

  • gh-153364: Make frame, coroutine, and task-waiter chain walks iterative and bounded #153365
  • [3.15] gh-153364: Make frame, coroutine, and task-waiter chain walks iterative and bounded (GH-153365) #158813
  • [3.14] gh-153364: Make frame, coroutine, and task-waiter chain walks iterative and bounded (GH-153365) #158814

Activity

  1. maurycy
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Jul 8, 2026
  2. picnixz
    added
    topic-profiling
    extension-modulesC modules in the Modules dirC modules in the Modules dir
    on Jul 9, 2026
  3. pablogsal
    added 4 commits that reference this issue on Oct 4, 2026

    gh-153364: Make frame, coroutine, and task-waiter chain walks iterati…

    e0861c6

    [3.15] gh-153364: Make frame, coroutine, and task-waiter chain walks …

    9e401cf

    [3.14] gh-153364: Make frame, coroutine, and task-waiter chain walks …

    f660816

    Revert "[3.15] pythongh-153364: Make frame, coroutine, and task-waite…

    4b5d623
  4. StanFromIreland
    closed this as completedon Oct 11, 2026
  5. pablogsal
    added a commit that references this issue on Oct 11, 2026

    [3.15] Restore deferred backports for 3.15.1, including GH-158874 (#1…

    4ceb3fa
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

    extension-modulesC modules in the Modules dirC modules in the Modules dirtopic-profilingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.