Open
Open
Copy link
Description
Crash report
What happened?
On MacOS, calling ssl.SSLContext.load_verify_locations
from multiple threads causes a SIGSEGV
during process termination when an unhandled exception is raised.
I was able to create a repoduction case and I've attached the five MacOS crash reports here.
Reproduction
from multiprocessing.pool import ThreadPool
import ssl
import certifi
ctx = ssl.create_default_context()
location = certifi.where()
def test_func(_):
ctx.load_verify_locations(location)
with ThreadPool(processes=100) as pool:
for idx, item in enumerate(pool.imap_unordered(test_func, range(1000), chunksize=1)):
if idx == 100:
raise RuntimeError()
Traceback (most recent call last):
File "/Users/tomforbes/tmp/scanner/repo.py", line 16, in <module>
raise RuntimeError()
RuntimeError
fish: Job 1, 'python repo.py' terminated by signal SIGSEGV (Address boundary error)
MacOS crash reports:
five.txt
four.txt
one.txt
three.txt
two.txt
CPython versions tested on:
3.11
Operating systems tested on:
macOS
Output from running 'python -VV' on the command line:
Python 3.11.7 (v3.11.7:fa7a6f2303, Dec 4 2023, 15:22:56) [Clang 13.0.0 (clang-1300.0.29.30)]
Metadata
Metadata
Assignees
Labels
A hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump