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
profiling.sampling may cause assert!(has_gil && gil_requested) to fail #142207
./python -m profiling.sampling run --live -i 1 -d 100000 -a -m test
the fix:
seems because its remote we can not fix it in ceval_gil.c
and drop the assert way works in my side
diff --git a/Modules/_remote_debugging/threads.c b/Modules/_remote_debugging/threads.c
index 99147b01a1b..69a85761562 100644
--- a/Modules/_remote_debugging/threads.c+++ b/Modules/_remote_debugging/threads.c@@ -335,12 +335,9 @@ unwind_stack_for_thread(
#endif
if (has_gil) {
status_flags |= THREAD_STATUS_HAS_GIL;
+ gil_requested = 0;
}
- // Assert that we never have both HAS_GIL and GIL_REQUESTED set at the same time- // This would indicate a race condition in the GIL state tracking- assert(!(has_gil && gil_requested));-
// Check CPU status
long pthread_id = GET_MEMBER(long, ts, unwinder->debug_offsets.thread_state.thread_id);
changed the title [-][3.15] profiling.sampling may cause assertssertion `!(has_gil && gil_requested)' failed.[/-][+]profiling.sampling may cause `assert!(has_gil && gil_requested)` to fail[/+]on Dec 6, 2025
Activity
[-][3.15] profiling.sampling may cause assertssertion `!(has_gil && gil_requested)' failed.[/-][+]profiling.sampling may cause `assert!(has_gil && gil_requested)` to fail[/+]gh-142207: remove assertions incompatible under `profiling.sampling` (#…