gh-142207: remove assertions incompatible under profiling.sampling (#142331)

This commit is contained in:
yihong 2025-12-08 12:45:04 +08:00 committed by GitHub
parent 7099af8f5e
commit 3db7bf2d18
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View file

@ -0,0 +1,2 @@
Fix: profiling.sampling may cause assertion ``!(has_gil &&
gil_requested)``

View file

@ -339,12 +339,10 @@ unwind_stack_for_thread(
#endif
if (has_gil) {
status_flags |= THREAD_STATUS_HAS_GIL;
// gh-142207 for remote debugging.
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);