summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Gross <colesbury@gmail.com>2024-04-09 15:50:49 (GMT)
committerGitHub <noreply@github.com>2024-04-09 15:50:49 (GMT)
commit6edde8a91c753dba03c92315b7585209931c704b (patch)
tree50fe580caf047e273d704055c3409d396ba45fa0
parentfa58e75a8605146a89ef72b58b4529669ac48366 (diff)
downloadcpython-6edde8a91c753dba03c92315b7585209931c704b.zip
cpython-6edde8a91c753dba03c92315b7585209931c704b.tar.gz
cpython-6edde8a91c753dba03c92315b7585209931c704b.tar.bz2
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.
-rw-r--r--Lib/test/test_faulthandler.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_faulthandler.py b/Lib/test/test_faulthandler.py
index 200f34d..61ec8fe 100644
--- a/Lib/test/test_faulthandler.py
+++ b/Lib/test/test_faulthandler.py
@@ -575,10 +575,12 @@ class FaultHandlerTests(unittest.TestCase):
lineno = 8
else:
lineno = 10
+ # When the traceback is dumped, the waiter thread may be in the
+ # `self.running.set()` call or in `self.stop.wait()`.
regex = r"""
^Thread 0x[0-9a-f]+ \(most recent call first\):
(?: File ".*threading.py", line [0-9]+ in [_a-z]+
- ){{1,3}} File "<string>", line 23 in run
+ ){{1,3}} File "<string>", line (?:22|23) in run
File ".*threading.py", line [0-9]+ in _bootstrap_inner
File ".*threading.py", line [0-9]+ in _bootstrap