Skip to content

Commit 6edde8a

Browse files
authored
gh-117658: Fix check_dump_traceback_threads in free-threaded build (#117659)
With the GIL disabled, the waiting thread may still be in the `self.running.set() ` call when faulthandler dumps tracebacks.
1 parent fa58e75 commit 6edde8a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Lib/test/test_faulthandler.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,10 +575,12 @@ def run(self):
575575
lineno = 8
576576
else:
577577
lineno = 10
578+
# When the traceback is dumped, the waiter thread may be in the
579+
# `self.running.set()` call or in `self.stop.wait()`.
578580
regex = r"""
579581
^Thread 0x[0-9a-f]+ \(most recent call first\):
580582
(?: File ".*threading.py", line [0-9]+ in [_a-z]+
581-
){{1,3}} File "<string>", line 23 in run
583+
){{1,3}} File "<string>", line (?:22|23) in run
582584
File ".*threading.py", line [0-9]+ in _bootstrap_inner
583585
File ".*threading.py", line [0-9]+ in _bootstrap
584586

0 commit comments

Comments
 (0)