From 141f623669b2c9fb239f2d28933ba3da38736947 Mon Sep 17 00:00:00 2001 From: maurycy <5383+maurycy@users.noreply.github.com> Date: Sat, 13 Jun 2026 03:14:04 +0200 Subject: [PATCH 1/3] sync chunks? --- Modules/_remote_debugging/frames.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Modules/_remote_debugging/frames.c b/Modules/_remote_debugging/frames.c index d73cd080dc477f3..e7d2a2764390261 100644 --- a/Modules/_remote_debugging/frames.c +++ b/Modules/_remote_debugging/frames.c @@ -580,6 +580,14 @@ collect_frames_with_cache( return full_hit < 0 ? -1 : 0; } + assert(ctx->chunks != NULL); + + if (ctx->chunks->count == 0) { + if (copy_stack_chunks(unwinder, ctx->thread_state_addr, ctx->chunks) < 0) { + PyErr_Clear(); + } + } + Py_ssize_t frames_before = PyList_GET_SIZE(ctx->frame_info); if (process_frame_chain(unwinder, ctx) < 0) { From 8b7f97d86a3363c919afccda6bf4c8e14933f6cc Mon Sep 17 00:00:00 2001 From: maurycy <5383+maurycy@users.noreply.github.com> Date: Sat, 13 Jun 2026 04:11:05 +0200 Subject: [PATCH 2/3] news --- .../Library/2026-06-13-04-11-00.gh-issue-151426.f2V67e.rst | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 Misc/NEWS.d/next/Library/2026-06-13-04-11-00.gh-issue-151426.f2V67e.rst diff --git a/Misc/NEWS.d/next/Library/2026-06-13-04-11-00.gh-issue-151426.f2V67e.rst b/Misc/NEWS.d/next/Library/2026-06-13-04-11-00.gh-issue-151426.f2V67e.rst new file mode 100644 index 000000000000000..df8c73377ba76b9 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2026-06-13-04-11-00.gh-issue-151426.f2V67e.rst @@ -0,0 +1,4 @@ +Fix impossible stack traces (callers and callees cross called, orphans and +incorrect lines) in the Tachyon profiler, by snapshotting the stack chunks +before walking the frame chain on a cache miss. Patch by Maurycy +Pawłowski-Wieroński. From 39564f8adb5cd0145a9bd2417d2f2deb32643267 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maurycy=20Paw=C5=82owski-Wiero=C5=84ski?= Date: Sat, 13 Jun 2026 11:29:08 +0200 Subject: [PATCH 3/3] better news --- .../Library/2026-06-13-04-11-00.gh-issue-151426.f2V67e.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Misc/NEWS.d/next/Library/2026-06-13-04-11-00.gh-issue-151426.f2V67e.rst b/Misc/NEWS.d/next/Library/2026-06-13-04-11-00.gh-issue-151426.f2V67e.rst index df8c73377ba76b9..428302e5f847f36 100644 --- a/Misc/NEWS.d/next/Library/2026-06-13-04-11-00.gh-issue-151426.f2V67e.rst +++ b/Misc/NEWS.d/next/Library/2026-06-13-04-11-00.gh-issue-151426.f2V67e.rst @@ -1,4 +1,4 @@ Fix impossible stack traces (callers and callees cross called, orphans and -incorrect lines) in the Tachyon profiler, by snapshotting the stack chunks -before walking the frame chain on a cache miss. Patch by Maurycy -Pawłowski-Wieroński. +incorrect lines) in the Tachyon profiler when caching frames, by snapshotting +the stack chunks before walking the frame chain on a cache miss. Patch by +Maurycy Pawłowski-Wieroński.