Do not share ssl-context between threads
- Dominant language
- Python
- Stars
- 161
- Forks
- 140
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 138
Description
This code is sharing one ssl-context object among 5 threads:
https://github.com/equinor/ert/blob/72b2ec02cd9509a3b34fd233f7e9e590b59c053c/tests/everest/test_everest_client.py#L212-L219
That might be why https://github.com/equinor/komodo-releases/actions/runs/23438918722/job/68187259282 is segfaulting
The SSL context should be thread-safe for concurrent read-only according to its documentation, but maybe we are not really using it read-only.
https://docs.python.org/3/library/ssl.html#ssl.SSLContext
Contributor guide
Research direction
Read tests/everest/test_everest_client.py around lines 212-219 and inspect how the SSL context is passed to the five threads. Compare that usage with the Python SSLContext thread-safety documentation, then verify the test no longer shares one context between threads and that the referenced CI failure is addressed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100