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
{{ message }}
Repository navigation
test_external_inspection: test_popping_python_frame_is_not_native() fails with a timeout (30 sec) on some buildbots #162251
The test was modified recently by commit eeafc73 of issue gh-160986 to "Fix flaky test_popping_python_frame_is_not_native". The change adds a new _get_stack_trace_with_retry() function and that's the function which fails with a timeout.
The "AssertionError: timeout" error is not new. Example of a RISC-V 64-bit Ubuntu 3.x build, 12 days ago: https://buildbot.python.org/#/builders/2237/builds/853. I failed with AssertionError: timeout (60.0 seconds) (and similar logs).
Reproduced on my Arch (screen recording):QQ20261119-194551.mp4
The RemoteUnwinder caches parent interpreter addresses before child has the time to execve() to replace addresses copied from the forked parent address space. After execve() those cached addresses become invalid, from where finding leaf frame fails. Should let the child send a signal when it finishes the execve(), and initialize RemoteUnwinder only after that.
OK I have updated in a63e693 to use /proc/<pid>/cmdline to determine whether child has called execve(). Wait until cmdline contains child's script before creating RemoteUnwinder.
Activity
vstinner commentedon Nov 19, 2026
The test was modified recently by commit eeafc73 of issue gh-160986 to "Fix flaky test_popping_python_frame_is_not_native". The change adds a new
_get_stack_trace_with_retry()function and that's the function which fails with a timeout.Before this change, the test failed differently. Example of a RISC-V 64-bit Ubuntu 3.x build, one month ago: https://buildbot.python.org/#/builders/2237/builds/720
vstinner commentedon Nov 19, 2026
The "AssertionError: timeout" error is not new. Example of a RISC-V 64-bit Ubuntu 3.x build, 12 days ago: https://buildbot.python.org/#/builders/2237/builds/853. I failed with
AssertionError: timeout (60.0 seconds)(and similar logs).vstinner commentedon Nov 19, 2026
I failed to reproduce the issue locally on my Fedora 45. I ran a test for 6 minutes (test_external_inspection ran 209 times).
./configure --prefix '$(PWD)/target' 'CFLAGS=-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer'./python -m test test_external_inspection -j2 -F -Wtanloong commentedon Nov 19, 2026
Reproduced on my Arch (screen recording):
QQ20261119-194551.mp4
The
RemoteUnwindercaches parent interpreter addresses before child has the time toexecve()to replace addresses copied from the forked parent address space. Afterexecve()those cached addresses become invalid, from where findingleafframe fails. Should let the child send a signal when it finishes theexecve(), and initializeRemoteUnwinderonly after that.vstinner commentedon Nov 19, 2026
Oh. It reminds me my commit 6fd15f0 fix which waits until the child process calls execve(). Maybe we need a similar check here?
tanloong commentedon Nov 19, 2026
OK I have updated in a63e693 to use
/proc/<pid>/cmdlineto determine whether child has calledexecve(). Wait untilcmdlinecontains child'sscriptbefore creatingRemoteUnwinder.