Uh oh!
There was an error while loading. Please reload this page.
GH-126910: Make _Py_get_machine_stack_pointer return the actual stack pointer - #149103
Conversation
…ething close it), but not the frame pointer * Make _Py_ReachedRecursionLimit inline again * Remove _Py_MakeRecCheck replacing its use with _Py_ReachedRecursionLimit * Move the check for C stack swtiching into _Py_CheckRecursiveCall
Documentation build overview
66 files changed · |
bedevere-bot
commented
Apr 29, 2026
🤖 New build scheduled with the buildbot fleet by @markshannon for commit 01fe604 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F149103%2Fmerge If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
bedevere-bot
commented
May 6, 2026
🤖 New build scheduled with the buildbot fleet by @markshannon for commit 98073f5 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F149103%2Fmerge If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
markshannon
commented
May 6, 2026
@pablogsal |
pablogsal
commented
May 6, 2026
Perf should add the Python function below that one, yes. I need time to investigate I will try to do it this week but I am a bit overwhelmed with pending things. I will try to take a look as soon as possible. |
I spent several hours digging into this one and was able to reproduce theCentOS9 NoGIL failure locally in a CentOS Stream 9 podman container with GCC 11.5 and perf 5.14. The short version is: the PR itself did not break perf-map generation. The generated perf map still contains the On the failing build, __builtin_frame_address(0)After this PR, on x86-64 it reads the real stack pointer with inline asm: __asm__("{movq %%rsp, %0" : "=r" (result));The new behavior is the right semantic direction for the stack-pointer work, but the old That matters because the perf trampoline test depends on frame-pointer unwinding. On the failing CentOS9/GCC 11.5 build, __attribute__((optimize ("no-tree-slp-vectorize")))With the new _PyEval_EvalFrameDefault:push %r15push %r14push %r13push %r12push %rbxsub$0x180,%rsp ...mov %rsp,%raxWith the old _PyEval_EvalFrameDefault:push %rbpmov %rsp,%rbppush %r15 ...So before this PR, the test passed because The fix is to keep the new real stack-pointer behavior, but make the eval-loop optimization attribute explicitly preserve frame pointers too: #defineDONT_SLP_VECTORIZE \
__attribute__((optimize ("no-tree-slp-vectorize", "no-omit-frame-pointer")))I verified this in the CentOS Stream 9 reproduction:
push %rbpmov %rsp,%rbp |
markshannon
commented
May 18, 2026
Thanks a lot for digging into this. Much appreciated |
bedevere-bot
commented
May 18, 2026
🤖 New build scheduled with the buildbot fleet by @markshannon for commit c971274 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F149103%2Fmerge If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
markshannon
commented
May 21, 2026
!buildbot Alpine |
bedevere-bot
commented
May 21, 2026
🤖 New build scheduled with the buildbot fleet by @markshannon for commit 0d3a7fb 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F149103%2Fmerge The command will test the builders whose names match following regular expression: The builders matched are:
|
markshannon
commented
May 21, 2026
The three buildobot failures were preexisting failures or time outs. |
diegorusso
left a comment
There was a problem hiding this comment.
Very nit comments, it looks good. Thanks!
| // Overflow if stack pointer is between soft limit and the base of the hardware stack. | ||
| // If it is below the hardware stack base, assume that we have the wrong stack limits, and do nothing. | ||
| // We could have the wrong stack limits because of limited platform support, or user-space threads. | ||
| // Possible overflow if stack pointer is beyond the soft limit. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
(or something close it), but not the frame pointer
This is a rebase of #147945 which was reverted due to a non-reproducable buildbot failure.