getsentry / getsentry/sentry-python
Introduce fork-safety fix to `SessionFlusher` and `BackgroundWorker`
Open
Bug
Python
- Dominant language
- Python
- Stars
- 2.2k
- Forks
- 669
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 213
Description
Related:
* getsentry/sentry-python#6149
* getsentry/sentry-python#6148
There have been a couple of reported cases where a deadlock occurs when `os.fork` is used and the child process inherits an acquired lock that the parent process had set.
There are other sites that have a similar code pattern to the issues linked above within `SessionFlusher` and `BackgroundWorker` that will need to be updated to prevent this deadlock from happening.
Contributor guide
Assessment
This issue has not been assessed yet.