Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault on Python 3.13.0rc3 (free-threaded) with requests #124984

Closed
AA-Turner opened this issue Oct 4, 2024 · 11 comments
Closed

Segfault on Python 3.13.0rc3 (free-threaded) with requests #124984

AA-Turner opened this issue Oct 4, 2024 · 11 comments
Labels
3.13 bugs and security fixes 3.14 new features, bugs and security fixes extension-modules C modules in the Modules dir topic-free-threading topic-SSL type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@AA-Turner
Copy link
Member

AA-Turner commented Oct 4, 2024

Crash report

What happened?

Reproducer:

import queue
import threading

import requests


class HyperlinkAvailabilityCheckWorker(threading.Thread):
    def __init__(self, rqueue, wqueue) -> None:
        self.rqueue = rqueue
        self.wqueue = wqueue
        self._session = requests.Session()
        super().__init__(daemon=True)

    def run(self) -> None:
        while True:
            uri = self.wqueue.get()
            if not uri:
                self._session.close()
                break

            self._session.request(
                'HEAD',
                url=uri,
                timeout=30,
                verify=True,
            )
            self.rqueue.put(uri)
            self.wqueue.task_done()


def test_crash():
    for i in range(1_000):
        print(f'loop: {i}')

        # setup
        rqueue = queue.Queue()
        wqueue = queue.Queue()
        workers: list[HyperlinkAvailabilityCheckWorker] = []

        # invoke threads
        num_workers = 2
        for _ in range(num_workers):
            thread = HyperlinkAvailabilityCheckWorker(rqueue, wqueue)
            thread.start()
            workers.append(thread)

        # check
        total_links = 0
        for hyperlink in (
            'https://python.org/dev/',
            'https://peps.python.org/pep-0008/',
        ):
            wqueue.put(hyperlink, False)
            total_links += 1

        done = 0
        while done < total_links:
            result = rqueue.get()
            print(result)
            done += 1

        # shutdown_threads
        wqueue.join()
        for _worker in workers:
            wqueue.put('', False)


if __name__ == '__main__':
    import sys

    print(f'GIL enabled?: {sys._is_gil_enabled()}')
    print()
    test_crash()

Sample output:

GIL enabled?: False

loop: 0
https://peps.python.org/pep-0008/
https://python.org/dev/
loop: 1
https://peps.python.org/pep-0008/
https://python.org/dev/
loop: 2
https://peps.python.org/pep-0008/
https://python.org/dev/
loop: 3
Fatal Python error: Segmentation fault

Thread 0x00007f3dc5e00640 (most recent call first):
  File "/usr/lib/python3.13/ssl.py", line 513 in set_alpn_protocols
  File "/home/runner/venv-3.13/lib/python3.13t/site-packages/urllib3/util/ssl_.py", line 467 in ssl_wrap_socket
  File "/home/runner/venv-3.13/lib/python3.13t/site-packages/urllib3/connection.py", line 909 in _ssl_wrap_socket_and_match_hostname
  File "/home/runner/venv-3.13/lib/python3.13t/site-packages/urllib3/connection.py", line 730 in connect
  File "/home/runner/venv-3.13/lib/python3.13t/site-packages/urllib3/connectionpool.py", line 1095 in _validate_conn
  File "/home/runner/venv-3.13/lib/python3.13t/site-packages/urllib3/connectionpool.py", line 466 in _make_request
  File "/home/runner/venv-3.13/lib/python3.13t/site-packages/urllib3/connectionpool.py", line 789 in urlopen
  File "/home/runner/venv-3.13/lib/python3.13t/site-packages/requests/adapters.py", line 667 in send
  File "/home/runner/venv-3.13/lib/python3.13t/site-packages/requests/sessions.py", line 703 in send
  File "/home/runner/venv-3.13/lib/python3.13t/site-packages/requests/sessions.py", line 589 in request
  File "/home/runner/work/sphinx/sphinx/./tests/test_build.py", line 21 in run
  File "/usr/lib/python3.13/threading.py", line 1041 in _bootstrap_inner
  File "/usr/lib/python3.13/threading.py", line 1012 in _bootstrap

Current thread 0x00007f3dbfe00640 (most recent call first):
  File "/usr/lib/python3.13/ssl.py", line 1372 in do_handshake
  File "/usr/lib/python3.13/ssl.py", line 1076 in _create
  File "/usr/lib/python3.13/ssl.py", line 455 in wrap_socket
  File "/home/runner/venv-3.13/lib/python3.13t/site-packages/urllib3/util/ssl_.py", line 513 in _ssl_wrap_socket_impl
  File "/home/runner/venv-3.13/lib/python3.13t/site-packages/urllib3/util/ssl_.py", line 469 in ssl_wrap_socket
  File "/home/runner/venv-3.13/lib/python3.13t/site-packages/urllib3/connection.py", line 909 in _ssl_wrap_socket_and_match_hostname
  File "/home/runner/venv-3.13/lib/python3.13t/site-packages/urllib3/connection.py", line 730 in connect
  File "/home/runner/venv-3.13/lib/python3.13t/site-packages/urllib3/connectionpool.py", line 1095 in _validate_conn
  File "/home/runner/venv-3.13/lib/python3.13t/site-packages/urllib3/connectionpool.py", line 466 in _make_request
  File "/home/runner/venv-3.13/lib/python3.13t/site-packages/urllib3/connectionpool.py", line 789 in urlopen
  File "/home/runner/venv-3.13/lib/python3.13t/site-packages/requests/adapters.py", line 667 in send
  File "/home/runner/venv-3.13/lib/python3.13t/site-packages/requests/sessions.py", line 703 in send
  File "/home/runner/venv-3.13/lib/python3.13t/site-packages/requests/sessions.py", line 589 in request
  File "/home/runner/work/sphinx/sphinx/./tests/test_build.py", line 21 in run
  File "/usr/lib/python3.13/threading.py", line 1041 in _bootstrap_inner
  File "/usr/lib/python3.13/threading.py", line 1012 in _bootstrap

Thread 0x00007f3dc9140000 (most recent call first):
  File "/usr/lib/python3.13/threading.py", line 359 in wait
  File "/usr/lib/python3.13/queue.py", line 202 in get
  File "/home/runner/work/sphinx/sphinx/./tests/test_build.py", line 58 in test_crash
  File "/home/runner/work/sphinx/sphinx/./tests/test_build.py", line 73 in <module>
/home/runner/work/_temp/f534164e-5195-4157-abd9-f2f4e6fed6dd.sh: line 5:  2783 Segmentation fault      (core dumped) python -u ./tests/test_build.py

@JelleZijlstra ran this on macOS with the following lldb traceback:

(lldb) bt
* thread #6, stop reason = signal SIGABRT
  * frame #0: 0x0000000194852a60 libsystem_kernel.dylib`__pthread_kill + 8
    frame #1: 0x000000019488ac20 libsystem_pthread.dylib`pthread_kill + 288
    frame #2: 0x0000000194797a30 libsystem_c.dylib`abort + 180
    frame #3: 0x00000001946a7dc4 libsystem_malloc.dylib`malloc_vreport + 896
    frame #4: 0x00000001946ab430 libsystem_malloc.dylib`malloc_report + 64
    frame #5: 0x00000001946c5494 libsystem_malloc.dylib`find_zone_and_free + 528
    frame #6: 0x0000000100871448 libssl.3.dylib`SSL_CTX_set_alpn_protos + 180
    frame #7: 0x000000010075e5d0 _ssl.cpython-313t-darwin.so`_ssl__SSLContext__set_alpn_protocols [inlined] _ssl__SSLContext__set_alpn_protocols_impl(self=0x0000028ca0798f30, protos=0x0000000172eaa3e0) at _ssl.c:3381:9 [opt]
    frame #8: 0x000000010075e59c _ssl.cpython-313t-darwin.so`_ssl__SSLContext__set_alpn_protocols(self=0x0000028ca0798f30, arg=<unavailable>) at _ssl.c.h:528:20 [opt]
    frame #9: 0x0000000100066354 python`method_vectorcall_O(func=0x0000028ca09bec90, args=0x00000001005ecc20, nargsf=<unavailable>, kwnames=<unavailable>) at descrobject.c:475:24 [opt]
    frame #10: 0x00000001000585d0 python`PyObject_Vectorcall [inlined] _PyObject_VectorcallTstate(tstate=0x000000010380a600, callable=0x0000028ca09bec90, args=<unavailable>, nargsf=<unavailable>, kwnames=<unavailable>) at pycore_call.h:168:11 [opt]
    frame #11: 0x00000001000585a8 python`PyObject_Vectorcall(callable=0x0000028ca09bec90, args=<unavailable>, nargsf=<unavailable>, kwnames=<unavailable>) at call.c:327:12 [opt]
    frame #12: 0x0000000100194098 python`_PyEval_EvalFrameDefault(tstate=<unavailable>, frame=<unavailable>, throwflag=<unavailable>) at generated_cases.c.h:813:23 [opt]
python(84085,0x172eab000) malloc: *** error for object 0x600000840000: pointer being freed was not allocated
python(84085,0x172eab000) malloc: *** set a breakpoint in malloc_error_break to debug

CPython versions tested on:

3.13

Operating systems tested on:

Linux, macOS

Output from running 'python -VV' on the command line:

Python 3.13.0rc3+ experimental free-threading build (main, Oct 4 2024, 08:50:03) [GCC 11.4.0]

Linked PRs

@AA-Turner AA-Turner added the type-crash A hard crash of the interpreter, possibly with a core dump label Oct 4, 2024
@AA-Turner AA-Turner changed the title Segfault on Python 3.13.0rc3 with requests. Segfault on Python 3.13.0rc3 with requests Oct 4, 2024
@AA-Turner
Copy link
Member Author

AA-Turner commented Oct 4, 2024

I ran this in CI to test TSan (TSan archive):

==================
WARNING: ThreadSanitizer: data race (pid=12552)
  Read of size 4 at 0x557c934e9338 by thread T1:
    #0 atexit_register /home/runner/work/cpython/cpython/./Modules/atexitmodule.c:195:16 (python+0x6125dc) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #1 cfunction_call /home/runner/work/cpython/cpython/Objects/methodobject.c:540:18 (python+0x31c3f0) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #2 _PyObject_MakeTpCall /home/runner/work/cpython/cpython/Objects/call.c:242:18 (python+0x25f973) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #3 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:166:16 (python+0x25f23b) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #4 PyObject_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c:327:12 (python+0x260d10) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #5 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:813:23 (python+0x4b7a07) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #6 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #7 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #8 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x26122c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #9 _PyObject_VectorcallDictTstate /home/runner/work/cpython/cpython/Objects/call.c:135:15 (python+0x25f4d8) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #10 _PyObject_Call_Prepend /home/runner/work/cpython/cpython/Objects/call.c:504:24 (python+0x261692) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #11 slot_tp_init /home/runner/work/cpython/cpython/Objects/typeobject.c:9783:15 (python+0x399b9c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #12 type_call /home/runner/work/cpython/cpython/Objects/typeobject.c:1993:19 (python+0x387906) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #13 _PyObject_MakeTpCall /home/runner/work/cpython/cpython/Objects/call.c:242:18 (python+0x25f973) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #14 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:166:16 (python+0x25f23b) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #15 PyObject_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c:327:12 (python+0x260d10) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #16 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:813:23 (python+0x4b7a07) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #17 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #18 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #19 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x26122c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #20 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x266f61) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #21 method_vectorcall /home/runner/work/cpython/cpython/Objects/classobject.c:62:18 (python+0x265449) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #22 _PyVectorcall_Call /home/runner/work/cpython/cpython/Objects/call.c:285:24 (python+0x260b8f) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #23 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:348:16 (python+0x260e73) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #24 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x261057) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #25 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:1355:26 (python+0x4bae31) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #26 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #27 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #28 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x26122c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #29 _PyObject_VectorcallDictTstate /home/runner/work/cpython/cpython/Objects/call.c:146:15 (python+0x25f4b4) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #30 _PyObject_Call_Prepend /home/runner/work/cpython/cpython/Objects/call.c:504:24 (python+0x261692) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #31 slot_tp_init /home/runner/work/cpython/cpython/Objects/typeobject.c:9783:15 (python+0x399b9c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #32 type_call /home/runner/work/cpython/cpython/Objects/typeobject.c:1993:19 (python+0x387906) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #33 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:361:18 (python+0x260ecb) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #34 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x261057) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #35 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:1355:26 (python+0x4bae31) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #36 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #37 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #38 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x26122c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #39 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x266f61) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #40 method_vectorcall /home/runner/work/cpython/cpython/Objects/classobject.c:62:18 (python+0x265449) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #41 _PyVectorcall_Call /home/runner/work/cpython/cpython/Objects/call.c:285:24 (python+0x260b8f) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #42 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:348:16 (python+0x260e73) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #43 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x261057) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #44 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:1355:26 (python+0x4bae31) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #45 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #46 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #47 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x26122c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #48 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x266f61) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #49 method_vectorcall /home/runner/work/cpython/cpython/Objects/classobject.c:62:18 (python+0x265449) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #50 _PyVectorcall_Call /home/runner/work/cpython/cpython/Objects/call.c:285:24 (python+0x260b8f) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #51 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:348:16 (python+0x260e73) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #52 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x261057) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #53 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:1355:26 (python+0x4bae31) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #54 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #55 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #56 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x26122c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #57 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x266f61) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #58 method_vectorcall /home/runner/work/cpython/cpython/Objects/classobject.c:62:18 (python+0x265449) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #59 _PyVectorcall_Call /home/runner/work/cpython/cpython/Objects/call.c:285:24 (python+0x260b8f) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #60 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:348:16 (python+0x260e73) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #61 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x261057) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #62 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:1355:26 (python+0x4bae31) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #63 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #64 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #65 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x26122c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #66 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x266f61) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #67 method_vectorcall /home/runner/work/cpython/cpython/Objects/classobject.c:70:20 (python+0x265480) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #68 _PyVectorcall_Call /home/runner/work/cpython/cpython/Objects/call.c:273:16 (python+0x260bdd) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #69 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:348:16 (python+0x260e73) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #70 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x261057) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #71 thread_run /home/runner/work/cpython/cpython/./Modules/_threadmodule.c:337:21 (python+0x6bbad8) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #72 pythread_wrapper /home/runner/work/cpython/cpython/Python/thread_pthread.h:243:5 (python+0x5f2d3b) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)

  Previous write of size 4 at 0x557c934e9338 by thread T2:
    #0 atexit_register /home/runner/work/cpython/cpython/./Modules/atexitmodule.c:219:39 (python+0x61287a) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #1 cfunction_call /home/runner/work/cpython/cpython/Objects/methodobject.c:540:18 (python+0x31c3f0) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #2 _PyObject_MakeTpCall /home/runner/work/cpython/cpython/Objects/call.c:242:18 (python+0x25f973) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #3 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:166:16 (python+0x25f23b) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #4 PyObject_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c:327:12 (python+0x260d10) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #5 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:813:23 (python+0x4b7a07) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #6 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #7 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #8 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x26122c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #9 _PyObject_VectorcallDictTstate /home/runner/work/cpython/cpython/Objects/call.c:135:15 (python+0x25f4d8) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #10 _PyObject_Call_Prepend /home/runner/work/cpython/cpython/Objects/call.c:504:24 (python+0x261692) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #11 slot_tp_init /home/runner/work/cpython/cpython/Objects/typeobject.c:9783:15 (python+0x399b9c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #12 type_call /home/runner/work/cpython/cpython/Objects/typeobject.c:1993:19 (python+0x387906) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #13 _PyObject_MakeTpCall /home/runner/work/cpython/cpython/Objects/call.c:242:18 (python+0x25f973) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #14 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:166:16 (python+0x25f23b) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #15 PyObject_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c:327:12 (python+0x260d10) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #16 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:813:23 (python+0x4b7a07) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #17 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #18 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #19 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x26122c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #20 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x266f61) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #21 method_vectorcall /home/runner/work/cpython/cpython/Objects/classobject.c:62:18 (python+0x265449) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #22 _PyVectorcall_Call /home/runner/work/cpython/cpython/Objects/call.c:285:24 (python+0x260b8f) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #23 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:348:16 (python+0x260e73) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #24 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x261057) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #25 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:1355:26 (python+0x4bae31) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #26 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #27 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #28 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x26122c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #29 _PyObject_VectorcallDictTstate /home/runner/work/cpython/cpython/Objects/call.c:146:15 (python+0x25f4b4) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #30 _PyObject_Call_Prepend /home/runner/work/cpython/cpython/Objects/call.c:504:24 (python+0x261692) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #31 slot_tp_init /home/runner/work/cpython/cpython/Objects/typeobject.c:9783:15 (python+0x399b9c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #32 type_call /home/runner/work/cpython/cpython/Objects/typeobject.c:1993:19 (python+0x387906) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #33 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:361:18 (python+0x260ecb) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #34 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x261057) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #35 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:1355:26 (python+0x4bae31) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #36 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #37 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #38 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x26122c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #39 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x266f61) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #40 method_vectorcall /home/runner/work/cpython/cpython/Objects/classobject.c:62:18 (python+0x265449) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #41 _PyVectorcall_Call /home/runner/work/cpython/cpython/Objects/call.c:285:24 (python+0x260b8f) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #42 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:348:16 (python+0x260e73) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #43 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x261057) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #44 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:1355:26 (python+0x4bae31) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #45 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #46 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #47 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x26122c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #48 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x266f61) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #49 method_vectorcall /home/runner/work/cpython/cpython/Objects/classobject.c:62:18 (python+0x265449) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #50 _PyVectorcall_Call /home/runner/work/cpython/cpython/Objects/call.c:285:24 (python+0x260b8f) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #51 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:348:16 (python+0x260e73) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #52 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x261057) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #53 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:1355:26 (python+0x4bae31) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #54 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #55 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #56 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x26122c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #57 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x266f61) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #58 method_vectorcall /home/runner/work/cpython/cpython/Objects/classobject.c:62:18 (python+0x265449) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #59 _PyVectorcall_Call /home/runner/work/cpython/cpython/Objects/call.c:285:24 (python+0x260b8f) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #60 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:348:16 (python+0x260e73) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #61 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x261057) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #62 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:1355:26 (python+0x4bae31) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #63 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #64 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #65 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x26122c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #66 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x266f61) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #67 method_vectorcall /home/runner/work/cpython/cpython/Objects/classobject.c:70:20 (python+0x265480) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #68 _PyVectorcall_Call /home/runner/work/cpython/cpython/Objects/call.c:273:16 (python+0x260bdd) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #69 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:348:16 (python+0x260e73) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #70 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x261057) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #71 thread_run /home/runner/work/cpython/cpython/./Modules/_threadmodule.c:337:21 (python+0x6bbad8) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #72 pythread_wrapper /home/runner/work/cpython/cpython/Python/thread_pthread.h:243:5 (python+0x5f2d3b) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)

  Location is global '_PyRuntime' of size 346752 at 0x557c934c72c0 (python+0x987338)

  Thread T1 (tid=12555, running) created by main thread at:
    #0 pthread_create <null> (python+0xdcccb) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #1 do_start_joinable_thread /home/runner/work/cpython/cpython/Python/thread_pthread.h:290:14 (python+0x5f19a6) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #2 PyThread_start_joinable_thread /home/runner/work/cpython/cpython/Python/thread_pthread.h:314:9 (python+0x5f17ba) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #3 ThreadHandle_start /home/runner/work/cpython/cpython/./Modules/_threadmodule.c:422:9 (python+0x6bb5df) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #4 do_start_new_thread /home/runner/work/cpython/cpython/./Modules/_threadmodule.c:1882:9 (python+0x6bb5df)
    #5 thread_PyThread_start_joinable_thread /home/runner/work/cpython/cpython/./Modules/_threadmodule.c:2005:14 (python+0x6ba05a) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #6 cfunction_call /home/runner/work/cpython/cpython/Objects/methodobject.c:540:18 (python+0x31c3f0) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #7 _PyObject_MakeTpCall /home/runner/work/cpython/cpython/Objects/call.c:242:18 (python+0x25f973) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #8 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:166:16 (python+0x25f23b) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #9 PyObject_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c:327:12 (python+0x260d10) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #10 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:1502:19 (python+0x4bbf00) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #11 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #12 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #13 PyEval_EvalCode /home/runner/work/cpython/cpython/Python/ceval.c:596:21 (python+0x4b19ca) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #14 run_eval_code_obj /home/runner/work/cpython/cpython/Python/pythonrun.c:1323:9 (python+0x5d3ca3) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #15 run_mod /home/runner/work/cpython/cpython/Python/pythonrun.c:1408:19 (python+0x5d3795) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #16 pyrun_file /home/runner/work/cpython/cpython/Python/pythonrun.c:1241:15 (python+0x5ce1c3) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #17 _PyRun_SimpleFileObject /home/runner/work/cpython/cpython/Python/pythonrun.c:490:13 (python+0x5ce1c3)
    #18 _PyRun_AnyFileObject /home/runner/work/cpython/cpython/Python/pythonrun.c:77:15 (python+0x5cd91b) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #19 pymain_run_file_obj /home/runner/work/cpython/cpython/Modules/main.c:409:15 (python+0x60e8b3) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #20 pymain_run_file /home/runner/work/cpython/cpython/Modules/main.c:428:15 (python+0x60e8b3)
    #21 pymain_run_python /home/runner/work/cpython/cpython/Modules/main.c:696:21 (python+0x60e8b3)
    #22 Py_RunMain /home/runner/work/cpython/cpython/Modules/main.c:775:5 (python+0x60e8b3)
    #23 pymain_main /home/runner/work/cpython/cpython/Modules/main.c:805:12 (python+0x60f389) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #24 Py_BytesMain /home/runner/work/cpython/cpython/Modules/main.c:829:12 (python+0x60f409) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #25 main /home/runner/work/cpython/cpython/./Programs/python.c:15:12 (python+0x163e70) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)

  Thread T2 (tid=12556, running) created by main thread at:
    #0 pthread_create <null> (python+0xdcccb) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #1 do_start_joinable_thread /home/runner/work/cpython/cpython/Python/thread_pthread.h:290:14 (python+0x5f19a6) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #2 PyThread_start_joinable_thread /home/runner/work/cpython/cpython/Python/thread_pthread.h:314:9 (python+0x5f17ba) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #3 ThreadHandle_start /home/runner/work/cpython/cpython/./Modules/_threadmodule.c:422:9 (python+0x6bb5df) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #4 do_start_new_thread /home/runner/work/cpython/cpython/./Modules/_threadmodule.c:1882:9 (python+0x6bb5df)
    #5 thread_PyThread_start_joinable_thread /home/runner/work/cpython/cpython/./Modules/_threadmodule.c:2005:14 (python+0x6ba05a) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #6 cfunction_call /home/runner/work/cpython/cpython/Objects/methodobject.c:540:18 (python+0x31c3f0) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #7 _PyObject_MakeTpCall /home/runner/work/cpython/cpython/Objects/call.c:242:18 (python+0x25f973) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #8 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:166:16 (python+0x25f23b) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #9 PyObject_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c:327:12 (python+0x260d10) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #10 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:1502:19 (python+0x4bbf00) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #11 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #12 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #13 PyEval_EvalCode /home/runner/work/cpython/cpython/Python/ceval.c:596:21 (python+0x4b19ca) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #14 run_eval_code_obj /home/runner/work/cpython/cpython/Python/pythonrun.c:1323:9 (python+0x5d3ca3) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #15 run_mod /home/runner/work/cpython/cpython/Python/pythonrun.c:1408:19 (python+0x5d3795) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #16 pyrun_file /home/runner/work/cpython/cpython/Python/pythonrun.c:1241:15 (python+0x5ce1c3) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #17 _PyRun_SimpleFileObject /home/runner/work/cpython/cpython/Python/pythonrun.c:490:13 (python+0x5ce1c3)
    #18 _PyRun_AnyFileObject /home/runner/work/cpython/cpython/Python/pythonrun.c:77:15 (python+0x5cd91b) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #19 pymain_run_file_obj /home/runner/work/cpython/cpython/Modules/main.c:409:15 (python+0x60e8b3) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #20 pymain_run_file /home/runner/work/cpython/cpython/Modules/main.c:428:15 (python+0x60e8b3)
    #21 pymain_run_python /home/runner/work/cpython/cpython/Modules/main.c:696:21 (python+0x60e8b3)
    #22 Py_RunMain /home/runner/work/cpython/cpython/Modules/main.c:775:5 (python+0x60e8b3)
    #23 pymain_main /home/runner/work/cpython/cpython/Modules/main.c:805:12 (python+0x60f389) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #24 Py_BytesMain /home/runner/work/cpython/cpython/Modules/main.c:829:12 (python+0x60f409) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #25 main /home/runner/work/cpython/cpython/./Programs/python.c:15:12 (python+0x163e70) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)

SUMMARY: ThreadSanitizer: data race /home/runner/work/cpython/cpython/./Modules/atexitmodule.c:195:16 in atexit_register
==================
==================
WARNING: ThreadSanitizer: data race (pid=12552)
  Read of size 1 at 0x7fbad20f0e48 by thread T11:
    #0 _PyMem_DebugCheckAddress /home/runner/work/cpython/cpython/Objects/obmalloc.c:2927:16 (python+0x350078) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #1 _PyMem_DebugRawFree /home/runner/work/cpython/cpython/Objects/obmalloc.c:2757:5 (python+0x3507e0) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #2 _PyMem_DebugFree /home/runner/work/cpython/cpython/Objects/obmalloc.c:2899:5 (python+0x3507e0)
    #3 PyMem_Free /home/runner/work/cpython/cpython/Objects/obmalloc.c:1018:5 (python+0x34d968) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #4 _ssl__SSLContext__set_alpn_protocols_impl /home/runner/work/cpython/cpython/./Modules/_ssl.c:3374:5 (_ssl.cpython-313td-x86_64-linux-gnu.so+0x1cfdd) (BuildId: 38c44a62e4a7366c8119e0c5dd369aa70ba6e5da)
    #5 _ssl__SSLContext__set_alpn_protocols /home/runner/work/cpython/cpython/./Modules/clinic/_ssl.c.h:528:20 (_ssl.cpython-313td-x86_64-linux-gnu.so+0x1cfdd)
    #6 method_vectorcall_O /home/runner/work/cpython/cpython/Objects/descrobject.c:475:24 (python+0x27a31e) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #7 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x25f211) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #8 PyObject_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c:327:12 (python+0x260d10) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #9 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:813:23 (python+0x4b7a07) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #10 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #11 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #12 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x26122c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #13 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x266f61) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #14 method_vectorcall /home/runner/work/cpython/cpython/Objects/classobject.c:62:18 (python+0x265449) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #15 _PyVectorcall_Call /home/runner/work/cpython/cpython/Objects/call.c:285:24 (python+0x260b8f) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #16 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:348:16 (python+0x260e73) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #17 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x261057) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #18 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:1355:26 (python+0x4bae31) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #19 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #20 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #21 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x26122c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #22 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x266f61) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #23 method_vectorcall /home/runner/work/cpython/cpython/Objects/classobject.c:62:18 (python+0x265449) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #24 _PyVectorcall_Call /home/runner/work/cpython/cpython/Objects/call.c:285:24 (python+0x260b8f) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #25 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:348:16 (python+0x260e73) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #26 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x261057) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #27 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:1355:26 (python+0x4bae31) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #28 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #29 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #30 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x26122c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #31 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x266f61) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #32 method_vectorcall /home/runner/work/cpython/cpython/Objects/classobject.c:62:18 (python+0x265449) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #33 _PyVectorcall_Call /home/runner/work/cpython/cpython/Objects/call.c:285:24 (python+0x260b8f) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #34 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:348:16 (python+0x260e73) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #35 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x261057) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #36 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:1355:26 (python+0x4bae31) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #37 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #38 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #39 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x26122c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #40 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x266f61) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #41 method_vectorcall /home/runner/work/cpython/cpython/Objects/classobject.c:70:20 (python+0x265480) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #42 _PyVectorcall_Call /home/runner/work/cpython/cpython/Objects/call.c:273:16 (python+0x260bdd) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #43 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:348:16 (python+0x260e73) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #44 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x261057) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #45 thread_run /home/runner/work/cpython/cpython/./Modules/_threadmodule.c:337:21 (python+0x6bbad8) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #46 pythread_wrapper /home/runner/work/cpython/cpython/Python/thread_pthread.h:243:5 (python+0x5f2d3b) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)

  Previous write of size 8 at 0x7fbad20f0e48 by thread T12:
    #0 __tsan_memset <null> (python+0xd8a04) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #1 _PyMem_DebugRawFree /home/runner/work/cpython/cpython/Objects/obmalloc.c:2760:5 (python+0x35083a) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #2 _PyMem_DebugFree /home/runner/work/cpython/cpython/Objects/obmalloc.c:2899:5 (python+0x35083a)
    #3 PyMem_Free /home/runner/work/cpython/cpython/Objects/obmalloc.c:1018:5 (python+0x34d968) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #4 _ssl__SSLContext__set_alpn_protocols_impl /home/runner/work/cpython/cpython/./Modules/_ssl.c:3374:5 (_ssl.cpython-313td-x86_64-linux-gnu.so+0x1cfdd) (BuildId: 38c44a62e4a7366c8119e0c5dd369aa70ba6e5da)
    #5 _ssl__SSLContext__set_alpn_protocols /home/runner/work/cpython/cpython/./Modules/clinic/_ssl.c.h:528:20 (_ssl.cpython-313td-x86_64-linux-gnu.so+0x1cfdd)
    #6 method_vectorcall_O /home/runner/work/cpython/cpython/Objects/descrobject.c:475:24 (python+0x27a31e) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #7 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x25f211) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #8 PyObject_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c:327:12 (python+0x260d10) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #9 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:813:23 (python+0x4b7a07) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #10 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #11 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #12 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x26122c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #13 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x266f61) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #14 method_vectorcall /home/runner/work/cpython/cpython/Objects/classobject.c:62:18 (python+0x265449) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #15 _PyVectorcall_Call /home/runner/work/cpython/cpython/Objects/call.c:285:24 (python+0x260b8f) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #16 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:348:16 (python+0x260e73) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #17 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x261057) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #18 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:1355:26 (python+0x4bae31) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #19 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #20 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #21 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x26122c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #22 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x266f61) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #23 method_vectorcall /home/runner/work/cpython/cpython/Objects/classobject.c:62:18 (python+0x265449) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #24 _PyVectorcall_Call /home/runner/work/cpython/cpython/Objects/call.c:285:24 (python+0x260b8f) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #25 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:348:16 (python+0x260e73) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #26 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x261057) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #27 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:1355:26 (python+0x4bae31) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #28 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #29 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #30 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x26122c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #31 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x266f61) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #32 method_vectorcall /home/runner/work/cpython/cpython/Objects/classobject.c:62:18 (python+0x265449) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #33 _PyVectorcall_Call /home/runner/work/cpython/cpython/Objects/call.c:285:24 (python+0x260b8f) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #34 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:348:16 (python+0x260e73) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #35 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x261057) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #36 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:1355:26 (python+0x4bae31) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #37 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #38 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #39 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x26122c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #40 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x266f61) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #41 method_vectorcall /home/runner/work/cpython/cpython/Objects/classobject.c:70:20 (python+0x265480) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #42 _PyVectorcall_Call /home/runner/work/cpython/cpython/Objects/call.c:273:16 (python+0x260bdd) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #43 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:348:16 (python+0x260e73) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #44 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x261057) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #45 thread_run /home/runner/work/cpython/cpython/./Modules/_threadmodule.c:337:21 (python+0x6bbad8) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #46 pythread_wrapper /home/runner/work/cpython/cpython/Python/thread_pthread.h:243:5 (python+0x5f2d3b) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)

  Thread T11 (tid=12566, running) created by main thread at:
    #0 pthread_create <null> (python+0xdcccb) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #1 do_start_joinable_thread /home/runner/work/cpython/cpython/Python/thread_pthread.h:290:14 (python+0x5f19a6) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #2 PyThread_start_joinable_thread /home/runner/work/cpython/cpython/Python/thread_pthread.h:314:9 (python+0x5f17ba) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #3 ThreadHandle_start /home/runner/work/cpython/cpython/./Modules/_threadmodule.c:422:9 (python+0x6bb5df) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #4 do_start_new_thread /home/runner/work/cpython/cpython/./Modules/_threadmodule.c:1882:9 (python+0x6bb5df)
    #5 thread_PyThread_start_joinable_thread /home/runner/work/cpython/cpython/./Modules/_threadmodule.c:2005:14 (python+0x6ba05a) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #6 cfunction_call /home/runner/work/cpython/cpython/Objects/methodobject.c:540:18 (python+0x31c3f0) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #7 _PyObject_MakeTpCall /home/runner/work/cpython/cpython/Objects/call.c:242:18 (python+0x25f973) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #8 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:166:16 (python+0x25f23b) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #9 PyObject_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c:327:12 (python+0x260d10) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #10 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:1502:19 (python+0x4bbf00) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #11 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #12 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #13 PyEval_EvalCode /home/runner/work/cpython/cpython/Python/ceval.c:596:21 (python+0x4b19ca) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #14 run_eval_code_obj /home/runner/work/cpython/cpython/Python/pythonrun.c:1323:9 (python+0x5d3ca3) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #15 run_mod /home/runner/work/cpython/cpython/Python/pythonrun.c:1408:19 (python+0x5d3795) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #16 pyrun_file /home/runner/work/cpython/cpython/Python/pythonrun.c:1241:15 (python+0x5ce1c3) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #17 _PyRun_SimpleFileObject /home/runner/work/cpython/cpython/Python/pythonrun.c:490:13 (python+0x5ce1c3)
    #18 _PyRun_AnyFileObject /home/runner/work/cpython/cpython/Python/pythonrun.c:77:15 (python+0x5cd91b) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #19 pymain_run_file_obj /home/runner/work/cpython/cpython/Modules/main.c:409:15 (python+0x60e8b3) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #20 pymain_run_file /home/runner/work/cpython/cpython/Modules/main.c:428:15 (python+0x60e8b3)
    #21 pymain_run_python /home/runner/work/cpython/cpython/Modules/main.c:696:21 (python+0x60e8b3)
    #22 Py_RunMain /home/runner/work/cpython/cpython/Modules/main.c:775:5 (python+0x60e8b3)
    #23 pymain_main /home/runner/work/cpython/cpython/Modules/main.c:805:12 (python+0x60f389) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #24 Py_BytesMain /home/runner/work/cpython/cpython/Modules/main.c:829:12 (python+0x60f409) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #25 main /home/runner/work/cpython/cpython/./Programs/python.c:15:12 (python+0x163e70) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)

  Thread T12 (tid=12567, running) created by main thread at:
    #0 pthread_create <null> (python+0xdcccb) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #1 do_start_joinable_thread /home/runner/work/cpython/cpython/Python/thread_pthread.h:290:14 (python+0x5f19a6) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #2 PyThread_start_joinable_thread /home/runner/work/cpython/cpython/Python/thread_pthread.h:314:9 (python+0x5f17ba) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #3 ThreadHandle_start /home/runner/work/cpython/cpython/./Modules/_threadmodule.c:422:9 (python+0x6bb5df) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #4 do_start_new_thread /home/runner/work/cpython/cpython/./Modules/_threadmodule.c:1882:9 (python+0x6bb5df)
    #5 thread_PyThread_start_joinable_thread /home/runner/work/cpython/cpython/./Modules/_threadmodule.c:2005:14 (python+0x6ba05a) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #6 cfunction_call /home/runner/work/cpython/cpython/Objects/methodobject.c:540:18 (python+0x31c3f0) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #7 _PyObject_MakeTpCall /home/runner/work/cpython/cpython/Objects/call.c:242:18 (python+0x25f973) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #8 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:166:16 (python+0x25f23b) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #9 PyObject_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c:327:12 (python+0x260d10) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #10 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:1502:19 (python+0x4bbf00) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #11 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #12 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #13 PyEval_EvalCode /home/runner/work/cpython/cpython/Python/ceval.c:596:21 (python+0x4b19ca) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #14 run_eval_code_obj /home/runner/work/cpython/cpython/Python/pythonrun.c:1323:9 (python+0x5d3ca3) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #15 run_mod /home/runner/work/cpython/cpython/Python/pythonrun.c:1408:19 (python+0x5d3795) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #16 pyrun_file /home/runner/work/cpython/cpython/Python/pythonrun.c:1241:15 (python+0x5ce1c3) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #17 _PyRun_SimpleFileObject /home/runner/work/cpython/cpython/Python/pythonrun.c:490:13 (python+0x5ce1c3)
    #18 _PyRun_AnyFileObject /home/runner/work/cpython/cpython/Python/pythonrun.c:77:15 (python+0x5cd91b) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #19 pymain_run_file_obj /home/runner/work/cpython/cpython/Modules/main.c:409:15 (python+0x60e8b3) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #20 pymain_run_file /home/runner/work/cpython/cpython/Modules/main.c:428:15 (python+0x60e8b3)
    #21 pymain_run_python /home/runner/work/cpython/cpython/Modules/main.c:696:21 (python+0x60e8b3)
    #22 Py_RunMain /home/runner/work/cpython/cpython/Modules/main.c:775:5 (python+0x60e8b3)
    #23 pymain_main /home/runner/work/cpython/cpython/Modules/main.c:805:12 (python+0x60f389) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #24 Py_BytesMain /home/runner/work/cpython/cpython/Modules/main.c:829:12 (python+0x60f409) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #25 main /home/runner/work/cpython/cpython/./Programs/python.c:15:12 (python+0x163e70) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)

SUMMARY: ThreadSanitizer: data race /home/runner/work/cpython/cpython/Objects/obmalloc.c:2927:16 in _PyMem_DebugCheckAddress
==================
==================
WARNING: ThreadSanitizer: data race (pid=12552)
  Write of size 8 at 0x7fbacc76bb08 by thread T12:
    #0 _ssl__SSLContext__set_alpn_protocols_impl /home/runner/work/cpython/cpython/./Modules/_ssl.c:3375:26 (_ssl.cpython-313td-x86_64-linux-gnu.so+0x1cff1) (BuildId: 38c44a62e4a7366c8119e0c5dd369aa70ba6e5da)
    #1 _ssl__SSLContext__set_alpn_protocols /home/runner/work/cpython/cpython/./Modules/clinic/_ssl.c.h:528:20 (_ssl.cpython-313td-x86_64-linux-gnu.so+0x1cff1)
    #2 method_vectorcall_O /home/runner/work/cpython/cpython/Objects/descrobject.c:475:24 (python+0x27a31e) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #3 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x25f211) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #4 PyObject_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c:327:12 (python+0x260d10) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #5 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:813:23 (python+0x4b7a07) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #6 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #7 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #8 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x26122c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #9 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x266f61) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #10 method_vectorcall /home/runner/work/cpython/cpython/Objects/classobject.c:62:18 (python+0x265449) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #11 _PyVectorcall_Call /home/runner/work/cpython/cpython/Objects/call.c:285:24 (python+0x260b8f) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #12 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:348:16 (python+0x260e73) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #13 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x261057) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #14 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:1355:26 (python+0x4bae31) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #15 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #16 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #17 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x26122c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #18 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x266f61) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #19 method_vectorcall /home/runner/work/cpython/cpython/Objects/classobject.c:62:18 (python+0x265449) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #20 _PyVectorcall_Call /home/runner/work/cpython/cpython/Objects/call.c:285:24 (python+0x260b8f) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #21 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:348:16 (python+0x260e73) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #22 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x261057) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #23 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:1355:26 (python+0x4bae31) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #24 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #25 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #26 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x26122c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #27 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x266f61) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #28 method_vectorcall /home/runner/work/cpython/cpython/Objects/classobject.c:62:18 (python+0x265449) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #29 _PyVectorcall_Call /home/runner/work/cpython/cpython/Objects/call.c:285:24 (python+0x260b8f) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #30 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:348:16 (python+0x260e73) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #31 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x261057) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #32 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:1355:26 (python+0x4bae31) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #33 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #34 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #35 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x26122c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #36 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x266f61) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #37 method_vectorcall /home/runner/work/cpython/cpython/Objects/classobject.c:70:20 (python+0x265480) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #38 _PyVectorcall_Call /home/runner/work/cpython/cpython/Objects/call.c:273:16 (python+0x260bdd) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #39 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:348:16 (python+0x260e73) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #40 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x261057) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #41 thread_run /home/runner/work/cpython/cpython/./Modules/_threadmodule.c:337:21 (python+0x6bbad8) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #42 pythread_wrapper /home/runner/work/cpython/cpython/Python/thread_pthread.h:243:5 (python+0x5f2d3b) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)

  Previous read of size 8 at 0x7fbacc76bb08 by thread T11:
    #0 _ssl__SSLContext__set_alpn_protocols_impl /home/runner/work/cpython/cpython/./Modules/_ssl.c:3374:22 (_ssl.cpython-313td-x86_64-linux-gnu.so+0x1cfd4) (BuildId: 38c44a62e4a7366c8119e0c5dd369aa70ba6e5da)
    #1 _ssl__SSLContext__set_alpn_protocols /home/runner/work/cpython/cpython/./Modules/clinic/_ssl.c.h:528:20 (_ssl.cpython-313td-x86_64-linux-gnu.so+0x1cfd4)
    #2 method_vectorcall_O /home/runner/work/cpython/cpython/Objects/descrobject.c:475:24 (python+0x27a31e) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #3 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x25f211) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #4 PyObject_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c:327:12 (python+0x260d10) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #5 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:813:23 (python+0x4b7a07) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #6 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #7 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #8 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x26122c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #9 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x266f61) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #10 method_vectorcall /home/runner/work/cpython/cpython/Objects/classobject.c:62:18 (python+0x265449) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #11 _PyVectorcall_Call /home/runner/work/cpython/cpython/Objects/call.c:285:24 (python+0x260b8f) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #12 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:348:16 (python+0x260e73) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #13 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x261057) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #14 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:1355:26 (python+0x4bae31) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #15 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #16 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #17 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x26122c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #18 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x266f61) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #19 method_vectorcall /home/runner/work/cpython/cpython/Objects/classobject.c:62:18 (python+0x265449) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #20 _PyVectorcall_Call /home/runner/work/cpython/cpython/Objects/call.c:285:24 (python+0x260b8f) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #21 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:348:16 (python+0x260e73) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #22 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x261057) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #23 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:1355:26 (python+0x4bae31) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #24 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #25 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #26 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x26122c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #27 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x266f61) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #28 method_vectorcall /home/runner/work/cpython/cpython/Objects/classobject.c:62:18 (python+0x265449) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #29 _PyVectorcall_Call /home/runner/work/cpython/cpython/Objects/call.c:285:24 (python+0x260b8f) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #30 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:348:16 (python+0x260e73) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #31 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x261057) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #32 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:1355:26 (python+0x4bae31) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #33 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #34 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #35 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x26122c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #36 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x266f61) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #37 method_vectorcall /home/runner/work/cpython/cpython/Objects/classobject.c:70:20 (python+0x265480) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #38 _PyVectorcall_Call /home/runner/work/cpython/cpython/Objects/call.c:273:16 (python+0x260bdd) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #39 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:348:16 (python+0x260e73) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #40 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x261057) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #41 thread_run /home/runner/work/cpython/cpython/./Modules/_threadmodule.c:337:21 (python+0x6bbad8) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #42 pythread_wrapper /home/runner/work/cpython/cpython/Python/thread_pthread.h:243:5 (python+0x5f2d3b) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)

  Thread T12 (tid=12567, running) created by main thread at:
    #0 pthread_create <null> (python+0xdcccb) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #1 do_start_joinable_thread /home/runner/work/cpython/cpython/Python/thread_pthread.h:290:14 (python+0x5f19a6) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #2 PyThread_start_joinable_thread /home/runner/work/cpython/cpython/Python/thread_pthread.h:314:9 (python+0x5f17ba) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #3 ThreadHandle_start /home/runner/work/cpython/cpython/./Modules/_threadmodule.c:422:9 (python+0x6bb5df) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #4 do_start_new_thread /home/runner/work/cpython/cpython/./Modules/_threadmodule.c:1882:9 (python+0x6bb5df)
    #5 thread_PyThread_start_joinable_thread /home/runner/work/cpython/cpython/./Modules/_threadmodule.c:2005:14 (python+0x6ba05a) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #6 cfunction_call /home/runner/work/cpython/cpython/Objects/methodobject.c:540:18 (python+0x31c3f0) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #7 _PyObject_MakeTpCall /home/runner/work/cpython/cpython/Objects/call.c:242:18 (python+0x25f973) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #8 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:166:16 (python+0x25f23b) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #9 PyObject_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c:327:12 (python+0x260d10) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #10 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:1502:19 (python+0x4bbf00) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #11 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #12 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #13 PyEval_EvalCode /home/runner/work/cpython/cpython/Python/ceval.c:596:21 (python+0x4b19ca) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #14 run_eval_code_obj /home/runner/work/cpython/cpython/Python/pythonrun.c:1323:9 (python+0x5d3ca3) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #15 run_mod /home/runner/work/cpython/cpython/Python/pythonrun.c:1408:19 (python+0x5d3795) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #16 pyrun_file /home/runner/work/cpython/cpython/Python/pythonrun.c:1241:15 (python+0x5ce1c3) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #17 _PyRun_SimpleFileObject /home/runner/work/cpython/cpython/Python/pythonrun.c:490:13 (python+0x5ce1c3)
    #18 _PyRun_AnyFileObject /home/runner/work/cpython/cpython/Python/pythonrun.c:77:15 (python+0x5cd91b) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #19 pymain_run_file_obj /home/runner/work/cpython/cpython/Modules/main.c:409:15 (python+0x60e8b3) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #20 pymain_run_file /home/runner/work/cpython/cpython/Modules/main.c:428:15 (python+0x60e8b3)
    #21 pymain_run_python /home/runner/work/cpython/cpython/Modules/main.c:696:21 (python+0x60e8b3)
    #22 Py_RunMain /home/runner/work/cpython/cpython/Modules/main.c:775:5 (python+0x60e8b3)
    #23 pymain_main /home/runner/work/cpython/cpython/Modules/main.c:805:12 (python+0x60f389) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #24 Py_BytesMain /home/runner/work/cpython/cpython/Modules/main.c:829:12 (python+0x60f409) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #25 main /home/runner/work/cpython/cpython/./Programs/python.c:15:12 (python+0x163e70) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)

  Thread T11 (tid=12566, running) created by main thread at:
    #0 pthread_create <null> (python+0xdcccb) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #1 do_start_joinable_thread /home/runner/work/cpython/cpython/Python/thread_pthread.h:290:14 (python+0x5f19a6) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #2 PyThread_start_joinable_thread /home/runner/work/cpython/cpython/Python/thread_pthread.h:314:9 (python+0x5f17ba) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #3 ThreadHandle_start /home/runner/work/cpython/cpython/./Modules/_threadmodule.c:422:9 (python+0x6bb5df) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #4 do_start_new_thread /home/runner/work/cpython/cpython/./Modules/_threadmodule.c:1882:9 (python+0x6bb5df)
    #5 thread_PyThread_start_joinable_thread /home/runner/work/cpython/cpython/./Modules/_threadmodule.c:2005:14 (python+0x6ba05a) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #6 cfunction_call /home/runner/work/cpython/cpython/Objects/methodobject.c:540:18 (python+0x31c3f0) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #7 _PyObject_MakeTpCall /home/runner/work/cpython/cpython/Objects/call.c:242:18 (python+0x25f973) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #8 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:166:16 (python+0x25f23b) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #9 PyObject_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c:327:12 (python+0x260d10) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #10 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:1502:19 (python+0x4bbf00) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #11 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #12 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #13 PyEval_EvalCode /home/runner/work/cpython/cpython/Python/ceval.c:596:21 (python+0x4b19ca) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #14 run_eval_code_obj /home/runner/work/cpython/cpython/Python/pythonrun.c:1323:9 (python+0x5d3ca3) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #15 run_mod /home/runner/work/cpython/cpython/Python/pythonrun.c:1408:19 (python+0x5d3795) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #16 pyrun_file /home/runner/work/cpython/cpython/Python/pythonrun.c:1241:15 (python+0x5ce1c3) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #17 _PyRun_SimpleFileObject /home/runner/work/cpython/cpython/Python/pythonrun.c:490:13 (python+0x5ce1c3)
    #18 _PyRun_AnyFileObject /home/runner/work/cpython/cpython/Python/pythonrun.c:77:15 (python+0x5cd91b) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #19 pymain_run_file_obj /home/runner/work/cpython/cpython/Modules/main.c:409:15 (python+0x60e8b3) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #20 pymain_run_file /home/runner/work/cpython/cpython/Modules/main.c:428:15 (python+0x60e8b3)
    #21 pymain_run_python /home/runner/work/cpython/cpython/Modules/main.c:696:21 (python+0x60e8b3)
    #22 Py_RunMain /home/runner/work/cpython/cpython/Modules/main.c:775:5 (python+0x60e8b3)
    #23 pymain_main /home/runner/work/cpython/cpython/Modules/main.c:805:12 (python+0x60f389) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #24 Py_BytesMain /home/runner/work/cpython/cpython/Modules/main.c:829:12 (python+0x60f409) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #25 main /home/runner/work/cpython/cpython/./Programs/python.c:15:12 (python+0x163e70) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)

SUMMARY: ThreadSanitizer: data race /home/runner/work/cpython/cpython/./Modules/_ssl.c:3375:26 in _ssl__SSLContext__set_alpn_protocols_impl
==================
==================
WARNING: ThreadSanitizer: data race (pid=12552)
  Read of size 1 at 0x7fbad20f0e40 by thread T11:
    #0 read_size_t /home/runner/work/cpython/cpython/Objects/obmalloc.c:2585:21 (python+0x35bc31) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #1 _PyObject_DebugDumpAddress /home/runner/work/cpython/cpython/Objects/obmalloc.c:2976:14 (python+0x35bc31)
    #2 _PyMem_DebugCheckAddress /home/runner/work/cpython/cpython/Objects/obmalloc.c:2929:9 (python+0x350166) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #3 _PyMem_DebugRawFree /home/runner/work/cpython/cpython/Objects/obmalloc.c:2757:5 (python+0x3507e0) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #4 _PyMem_DebugFree /home/runner/work/cpython/cpython/Objects/obmalloc.c:2899:5 (python+0x3507e0)
    #5 PyMem_Free /home/runner/work/cpython/cpython/Objects/obmalloc.c:1018:5 (python+0x34d968) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #6 _ssl__SSLContext__set_alpn_protocols_impl /home/runner/work/cpython/cpython/./Modules/_ssl.c:3374:5 (_ssl.cpython-313td-x86_64-linux-gnu.so+0x1cfdd) (BuildId: 38c44a62e4a7366c8119e0c5dd369aa70ba6e5da)
    #7 _ssl__SSLContext__set_alpn_protocols /home/runner/work/cpython/cpython/./Modules/clinic/_ssl.c.h:528:20 (_ssl.cpython-313td-x86_64-linux-gnu.so+0x1cfdd)
    #8 method_vectorcall_O /home/runner/work/cpython/cpython/Objects/descrobject.c:475:24 (python+0x27a31e) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #9 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x25f211) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #10 PyObject_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c:327:12 (python+0x260d10) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #11 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:813:23 (python+0x4b7a07) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #12 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #13 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #14 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x26122c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #15 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x266f61) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #16 method_vectorcall /home/runner/work/cpython/cpython/Objects/classobject.c:62:18 (python+0x265449) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #17 _PyVectorcall_Call /home/runner/work/cpython/cpython/Objects/call.c:285:24 (python+0x260b8f) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #18 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:348:16 (python+0x260e73) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #19 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x261057) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #20 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:1355:26 (python+0x4bae31) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #21 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #22 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #23 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x26122c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #24 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x266f61) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #25 method_vectorcall /home/runner/work/cpython/cpython/Objects/classobject.c:62:18 (python+0x265449) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #26 _PyVectorcall_Call /home/runner/work/cpython/cpython/Objects/call.c:285:24 (python+0x260b8f) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #27 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:348:16 (python+0x260e73) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #28 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x261057) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #29 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:1355:26 (python+0x4bae31) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #30 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #31 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #32 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x26122c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #33 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x266f61) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #34 method_vectorcall /home/runner/work/cpython/cpython/Objects/classobject.c:62:18 (python+0x265449) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #35 _PyVectorcall_Call /home/runner/work/cpython/cpython/Objects/call.c:285:24 (python+0x260b8f) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #36 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:348:16 (python+0x260e73) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #37 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x261057) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #38 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:1355:26 (python+0x4bae31) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #39 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #40 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #41 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x26122c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #42 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x266f61) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #43 method_vectorcall /home/runner/work/cpython/cpython/Objects/classobject.c:70:20 (python+0x265480) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #44 _PyVectorcall_Call /home/runner/work/cpython/cpython/Objects/call.c:273:16 (python+0x260bdd) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #45 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:348:16 (python+0x260e73) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #46 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x261057) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #47 thread_run /home/runner/work/cpython/cpython/./Modules/_threadmodule.c:337:21 (python+0x6bbad8) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #48 pythread_wrapper /home/runner/work/cpython/cpython/Python/thread_pthread.h:243:5 (python+0x5f2d3b) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)

  Previous write of size 8 at 0x7fbad20f0e40 by thread T12:
    #0 __tsan_memset <null> (python+0xd8a04) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #1 _PyMem_DebugRawFree /home/runner/work/cpython/cpython/Objects/obmalloc.c:2760:5 (python+0x35083a) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #2 _PyMem_DebugFree /home/runner/work/cpython/cpython/Objects/obmalloc.c:2899:5 (python+0x35083a)
    #3 PyMem_Free /home/runner/work/cpython/cpython/Objects/obmalloc.c:1018:5 (python+0x34d968) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #4 _ssl__SSLContext__set_alpn_protocols_impl /home/runner/work/cpython/cpython/./Modules/_ssl.c:3374:5 (_ssl.cpython-313td-x86_64-linux-gnu.so+0x1cfdd) (BuildId: 38c44a62e4a7366c8119e0c5dd369aa70ba6e5da)
    #5 _ssl__SSLContext__set_alpn_protocols /home/runner/work/cpython/cpython/./Modules/clinic/_ssl.c.h:528:20 (_ssl.cpython-313td-x86_64-linux-gnu.so+0x1cfdd)
    #6 method_vectorcall_O /home/runner/work/cpython/cpython/Objects/descrobject.c:475:24 (python+0x27a31e) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #7 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x25f211) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #8 PyObject_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c:327:12 (python+0x260d10) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #9 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:813:23 (python+0x4b7a07) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #10 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #11 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #12 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x26122c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #13 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x266f61) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #14 method_vectorcall /home/runner/work/cpython/cpython/Objects/classobject.c:62:18 (python+0x265449) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #15 _PyVectorcall_Call /home/runner/work/cpython/cpython/Objects/call.c:285:24 (python+0x260b8f) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #16 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:348:16 (python+0x260e73) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #17 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x261057) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #18 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:1355:26 (python+0x4bae31) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #19 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #20 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #21 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x26122c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #22 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x266f61) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #23 method_vectorcall /home/runner/work/cpython/cpython/Objects/classobject.c:62:18 (python+0x265449) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #24 _PyVectorcall_Call /home/runner/work/cpython/cpython/Objects/call.c:285:24 (python+0x260b8f) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #25 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:348:16 (python+0x260e73) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #26 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x261057) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #27 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:1355:26 (python+0x4bae31) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #28 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #29 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #30 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x26122c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #31 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x266f61) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #32 method_vectorcall /home/runner/work/cpython/cpython/Objects/classobject.c:62:18 (python+0x265449) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #33 _PyVectorcall_Call /home/runner/work/cpython/cpython/Objects/call.c:285:24 (python+0x260b8f) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #34 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:348:16 (python+0x260e73) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #35 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x261057) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #36 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:1355:26 (python+0x4bae31) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #37 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #38 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #39 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x26122c) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #40 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:168:11 (python+0x266f61) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #41 method_vectorcall /home/runner/work/cpython/cpython/Objects/classobject.c:70:20 (python+0x265480) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #42 _PyVectorcall_Call /home/runner/work/cpython/cpython/Objects/call.c:273:16 (python+0x260bdd) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #43 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:348:16 (python+0x260e73) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #44 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x261057) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #45 thread_run /home/runner/work/cpython/cpython/./Modules/_threadmodule.c:337:21 (python+0x6bbad8) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #46 pythread_wrapper /home/runner/work/cpython/cpython/Python/thread_pthread.h:243:5 (python+0x5f2d3b) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)

  Thread T11 (tid=12566, running) created by main thread at:
    #0 pthread_create <null> (python+0xdcccb) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #1 do_start_joinable_thread /home/runner/work/cpython/cpython/Python/thread_pthread.h:290:14 (python+0x5f19a6) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #2 PyThread_start_joinable_thread /home/runner/work/cpython/cpython/Python/thread_pthread.h:314:9 (python+0x5f17ba) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #3 ThreadHandle_start /home/runner/work/cpython/cpython/./Modules/_threadmodule.c:422:9 (python+0x6bb5df) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #4 do_start_new_thread /home/runner/work/cpython/cpython/./Modules/_threadmodule.c:1882:9 (python+0x6bb5df)
    #5 thread_PyThread_start_joinable_thread /home/runner/work/cpython/cpython/./Modules/_threadmodule.c:2005:14 (python+0x6ba05a) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #6 cfunction_call /home/runner/work/cpython/cpython/Objects/methodobject.c:540:18 (python+0x31c3f0) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #7 _PyObject_MakeTpCall /home/runner/work/cpython/cpython/Objects/call.c:242:18 (python+0x25f973) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #8 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:166:16 (python+0x25f23b) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #9 PyObject_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c:327:12 (python+0x260d10) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #10 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:1502:19 (python+0x4bbf00) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #11 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #12 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #13 PyEval_EvalCode /home/runner/work/cpython/cpython/Python/ceval.c:596:21 (python+0x4b19ca) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #14 run_eval_code_obj /home/runner/work/cpython/cpython/Python/pythonrun.c:1323:9 (python+0x5d3ca3) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #15 run_mod /home/runner/work/cpython/cpython/Python/pythonrun.c:1408:19 (python+0x5d3795) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #16 pyrun_file /home/runner/work/cpython/cpython/Python/pythonrun.c:1241:15 (python+0x5ce1c3) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #17 _PyRun_SimpleFileObject /home/runner/work/cpython/cpython/Python/pythonrun.c:490:13 (python+0x5ce1c3)
    #18 _PyRun_AnyFileObject /home/runner/work/cpython/cpython/Python/pythonrun.c:77:15 (python+0x5cd91b) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #19 pymain_run_file_obj /home/runner/work/cpython/cpython/Modules/main.c:409:15 (python+0x60e8b3) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #20 pymain_run_file /home/runner/work/cpython/cpython/Modules/main.c:428:15 (python+0x60e8b3)
    #21 pymain_run_python /home/runner/work/cpython/cpython/Modules/main.c:696:21 (python+0x60e8b3)
    #22 Py_RunMain /home/runner/work/cpython/cpython/Modules/main.c:775:5 (python+0x60e8b3)
    #23 pymain_main /home/runner/work/cpython/cpython/Modules/main.c:805:12 (python+0x60f389) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #24 Py_BytesMain /home/runner/work/cpython/cpython/Modules/main.c:829:12 (python+0x60f409) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #25 main /home/runner/work/cpython/cpython/./Programs/python.c:15:12 (python+0x163e70) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)

  Thread T12 (tid=12567, running) created by main thread at:
    #0 pthread_create <null> (python+0xdcccb) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #1 do_start_joinable_thread /home/runner/work/cpython/cpython/Python/thread_pthread.h:290:14 (python+0x5f19a6) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #2 PyThread_start_joinable_thread /home/runner/work/cpython/cpython/Python/thread_pthread.h:314:9 (python+0x5f17ba) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #3 ThreadHandle_start /home/runner/work/cpython/cpython/./Modules/_threadmodule.c:422:9 (python+0x6bb5df) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #4 do_start_new_thread /home/runner/work/cpython/cpython/./Modules/_threadmodule.c:1882:9 (python+0x6bb5df)
    #5 thread_PyThread_start_joinable_thread /home/runner/work/cpython/cpython/./Modules/_threadmodule.c:2005:14 (python+0x6ba05a) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #6 cfunction_call /home/runner/work/cpython/cpython/Objects/methodobject.c:540:18 (python+0x31c3f0) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #7 _PyObject_MakeTpCall /home/runner/work/cpython/cpython/Objects/call.c:242:18 (python+0x25f973) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #8 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:166:16 (python+0x25f23b) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #9 PyObject_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c:327:12 (python+0x260d10) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #10 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:1502:19 (python+0x4bbf00) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #11 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4b1d64) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #12 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1806:12 (python+0x4b1d64)
    #13 PyEval_EvalCode /home/runner/work/cpython/cpython/Python/ceval.c:596:21 (python+0x4b19ca) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #14 run_eval_code_obj /home/runner/work/cpython/cpython/Python/pythonrun.c:1323:9 (python+0x5d3ca3) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #15 run_mod /home/runner/work/cpython/cpython/Python/pythonrun.c:1408:19 (python+0x5d3795) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #16 pyrun_file /home/runner/work/cpython/cpython/Python/pythonrun.c:1241:15 (python+0x5ce1c3) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #17 _PyRun_SimpleFileObject /home/runner/work/cpython/cpython/Python/pythonrun.c:490:13 (python+0x5ce1c3)
    #18 _PyRun_AnyFileObject /home/runner/work/cpython/cpython/Python/pythonrun.c:77:15 (python+0x5cd91b) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #19 pymain_run_file_obj /home/runner/work/cpython/cpython/Modules/main.c:409:15 (python+0x60e8b3) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #20 pymain_run_file /home/runner/work/cpython/cpython/Modules/main.c:428:15 (python+0x60e8b3)
    #21 pymain_run_python /home/runner/work/cpython/cpython/Modules/main.c:696:21 (python+0x60e8b3)
    #22 Py_RunMain /home/runner/work/cpython/cpython/Modules/main.c:775:5 (python+0x60e8b3)
    #23 pymain_main /home/runner/work/cpython/cpython/Modules/main.c:805:12 (python+0x60f389) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #24 Py_BytesMain /home/runner/work/cpython/cpython/Modules/main.c:829:12 (python+0x60f409) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)
    #25 main /home/runner/work/cpython/cpython/./Programs/python.c:15:12 (python+0x163e70) (BuildId: 94f5741a380ad69b355681b083430b4dbc3b6ba7)

SUMMARY: ThreadSanitizer: data race /home/runner/work/cpython/cpython/Objects/obmalloc.c:2585:21 in read_size_t
==================

@AA-Turner AA-Turner changed the title Segfault on Python 3.13.0rc3 with requests Segfault on Python 3.13.0rc3 (free-threaded) with requests Oct 4, 2024
@AA-Turner AA-Turner added interpreter-core (Objects, Python, Grammar, and Parser dirs) 3.13 bugs and security fixes 3.14 new features, bugs and security fixes labels Oct 4, 2024
@AA-Turner
Copy link
Member Author

Running on a debug build (GHA log):

[... snip]
Debug memory block at address p=0x2001c0e0e50: API '�'
    9274605919691107786 bytes originally requested
    The 7 pad bytes at p-7 are not all FORBIDDENBYTE (0xfd):
        at p-7: 0xdd *** OUCH
        at p-6: 0xdd *** OUCH
        at p-5: 0xdd *** OUCH
        at p-4: 0xdd *** OUCH
        at p-3: 0xdd *** OUCH
        at p-2: 0xdd *** OUCH
        at p-1: 0xdd *** OUCH
    Because memory is corrupted at the start, the count of bytes requested
       may be bogus, and checking the trailing pad bytes may segfault.
    The 8 pad bytes at tail=0x80b606f206fa7c1a are Fatal Python error: Segmentation fault
Thread 0x00007f5bda800640 (most recent call first):
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/encodings/idna.py", line 200 in encode
python: ../cpython-ro-srcdir/Include/internal/pycore_frame.h:81: _PyFrame_GetCode: Assertion `PyCode_Check(f->f_executable)' failed.
Fatal Python error: Aborted
/home/runner/work/_temp/ea01f641-6785-428b-baee-68d8867eda75.sh: line 5: 36518 Aborted                 (core dumped) ./python -E -u -X dev -X warn_default_encoding -W
[... snip]

Core dump download

@JelleZijlstra
Copy link
Member

JelleZijlstra commented Oct 4, 2024

Here's a reproducer without third-party packages:

import queue
import ssl
import threading


class HyperlinkAvailabilityCheckWorker(threading.Thread):
    def __init__(self, ctx, wqueue) -> None:
        self.ctx = ctx
        self.wqueue = wqueue
        super().__init__(daemon=True)

    def run(self) -> None:
        self.wqueue.get()
        for _ in range(10000):
            self.ctx.set_alpn_protocols(["h2"])


def test_crash2():
    for i in range(1_000):
        print(f"loop: {i}")

        # setup
        ctx = ssl.create_default_context()
        wqueue = queue.Queue()
        workers: list[HyperlinkAvailabilityCheckWorker] = []

        # invoke threads
        num_workers = 10
        for _ in range(num_workers):
            thread = HyperlinkAvailabilityCheckWorker(ctx, wqueue)
            thread.start()
            workers.append(thread)

        for _ in range(num_workers):
            wqueue.put(None)

        # check
        for thread in workers:
            thread.join()

if __name__ == "__main__":
    import sys

    print(f"GIL enabled?: {sys._is_gil_enabled()}")
    print()
    test_crash2()
 % python ~/Documents/crash2.py 
GIL enabled?: False

loop: 0
python(88507,0x16c43b000) malloc: Heap corruption detected, free list is damaged at 0x600000e8c040
*** Incorrect guard value: 176224512229440
python(88507,0x16d447000) malloc: *** error for object 0x600000e9ce50: pointer being freed was not allocated
python(88507,0x16d447000) malloc: *** set a breakpoint in malloc_error_break to debug
python(88507,0x172483000) malloc: Heap corruption detected, free list is damaged at 0x600000eb7e20
*** Incorrect guard value: 3303426
python(88507,0x16c43b000) malloc: *** set a breakpoint in malloc_error_break to debug
python(88507,0x172483000) malloc: *** set a breakpoint in malloc_error_break to debug
python(88507,0x17449b000) malloc: *** error for object 0x600000e9ce50: pointer being freed was not allocated
python(88507,0x17046b000) malloc: *** error for object 0x600000e8c040: pointer being freed was not allocated
python(88507,0x16e453000) malloc: Heap corruption detected, free list is damaged at 0x600000e8bff0
*** Incorrect guard value: 0
python(88507,0x17449b000) malloc: *** set a breakpoint in malloc_error_break to debug
python(88507,0x17046b000) malloc: *** set a breakpoint in malloc_error_break to debug
python(88507,0x16e453000) malloc: *** set a breakpoint in malloc_error_break to debug
zsh: abort      python ~/Documents/crash2.py

@ZeroIntensity ZeroIntensity added topic-SSL extension-modules C modules in the Modules dir and removed interpreter-core (Objects, Python, Grammar, and Parser dirs) labels Oct 5, 2024
@ZeroIntensity
Copy link
Member

ZeroIntensity commented Oct 5, 2024

#124993 should (hopefully) fix all the thread safety issues in _ssl. Jelle's reproducer doesn't fail on my PR, but I haven't had a chance to try it on the Sphinx test suite. Could you try that, @AA-Turner?

vstinner pushed a commit that referenced this issue Oct 19, 2024
Make SSL objects thread safe in Free Theaded build by
using critical sections.

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
@vstinner
Copy link
Member

I modified the reproducer to use more threads:

import queue
import threading

import requests


class HyperlinkAvailabilityCheckWorker(threading.Thread):
    def __init__(self, rqueue, wqueue) -> None:
        self.rqueue = rqueue
        self.wqueue = wqueue
        self._session = requests.Session()
        super().__init__(daemon=True)

    def run(self) -> None:
        while True:
            uri = self.wqueue.get()
            if not uri:
                self._session.close()
                break

            self._session.request(
                'HEAD',
                url=uri,
                timeout=30,
                verify=True,
            )
            self.rqueue.put(uri)
            self.wqueue.task_done()


def test_crash():
    for i in range(1_000):
        print(f'loop: {i}')

        # setup
        rqueue = queue.Queue()
        wqueue = queue.Queue()
        workers: list[HyperlinkAvailabilityCheckWorker] = []

        # invoke threads
        num_workers = 10
        for _ in range(num_workers):
            thread = HyperlinkAvailabilityCheckWorker(rqueue, wqueue)
            thread.start()
            workers.append(thread)

        # check
        total_links = 0
        for hyperlink in (
            'https://python.org/dev/',
            'https://peps.python.org/pep-0008/',
            'https://peps.python.org/pep-0600/',
            'https://peps.python.org/pep-0601/',
            'https://peps.python.org/pep-0602/',
            'https://peps.python.org/pep-0603/',
            'https://peps.python.org/pep-0604/',
            'https://peps.python.org/pep-0605/',
            'https://peps.python.org/pep-0606/',
            'https://peps.python.org/pep-0607/',
        ):
            wqueue.put(hyperlink, False)
            total_links += 1

        done = 0
        while done < total_links:
            result = rqueue.get()
            print(result)
            done += 1

        # shutdown_threads
        wqueue.join()
        for _worker in workers:
            wqueue.put('', False)


if __name__ == '__main__':
    import sys

    print(f'GIL enabled?: {sys._is_gil_enabled()}')
    print()
    test_crash()

Using this modified script, I can easily reproduce the crash.

With the fix 4c53b25 I can no longer reproduce the crash (I stopped the script at the 500th iteration). I confirm that the change fixed the requests crash.

Thanks @AA-Turner to the bug report!

ZeroIntensity added a commit to ZeroIntensity/cpython that referenced this issue Oct 21, 2024
Make SSL objects thread safe in Free Theaded build by
using critical sections.

(cherry picked from commit 4c53b25)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
@neonene
Copy link
Contributor

neonene commented Nov 15, 2024

Is there any plan to resolve the missing docstrings? I prefer them to be kept at least as comments in _ssl.c.

@JelleZijlstra
Copy link
Member

@neonene could you clarify what you are referring to? The issue is not about docstrings, and the merged PR (#124993) doesn't appear to remove any docstrings.

@ZeroIntensity
Copy link
Member

Oh wait, I guess some of the docstrings did get stripped in the transition over to AC in that PR. Is that worth trying to fix?

@JelleZijlstra
Copy link
Member

@ZeroIntensity yes, we should make sure docstrings are preserved.

@ZeroIntensity
Copy link
Member

I'll deal with that sometime in the next few days then.

Yhg1s pushed a commit that referenced this issue Dec 2, 2024
Make SSL objects thread safe in Free Theaded build by
using critical sections.

(cherry picked from commit 4c53b25)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
@ZeroIntensity
Copy link
Member

Now that the 3.13 backport is in, I consider this done. Thanks to everyone who reviewed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.13 bugs and security fixes 3.14 new features, bugs and security fixes extension-modules C modules in the Modules dir topic-free-threading topic-SSL type-crash A hard crash of the interpreter, possibly with a core dump
Projects
None yet
Development

No branches or pull requests

6 participants