File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -2469,16 +2469,20 @@ def recv_msg():
24692469
24702470 def get_thread_frames (target_funcs ):
24712471 """Get frames for thread matching target functions."""
2472- for _ in range (3 ):
2473- try :
2472+ retries = 0
2473+ for _ in busy_retry (SHORT_TIMEOUT ):
2474+ if retries >= 5 :
2475+ break
2476+ retries += 1
2477+ # On Windows, ReadProcessMemory can fail with OSError
2478+ # (WinError 299) when frame pointers are in flux
2479+ with contextlib .suppress (RuntimeError , OSError ):
24742480 traces = unwinder .get_stack_trace ()
24752481 for interp in traces :
24762482 for thread in interp .threads :
24772483 funcs = [f .funcname for f in thread .frame_info ]
24782484 if any (f in funcs for f in target_funcs ):
24792485 return funcs
2480- except RuntimeError :
2481- pass
24822486 return None
24832487
24842488 # Track results for each sync point
You can’t perform that action at this time.
0 commit comments