### Description
app_python3 loads libssl and also calls `pthread_setspecific()`. This makes it incompatible with tls_thread_mode refactoring.
Reported by user @igorolhovskiy on the mailing list:
https://lists.kamailio.org/mailman3/hyperkitty/list/sr-users@lists.kamailio....
### Troubleshooting
#### Reproduction
#### Debugging Data
#### Log Messages
#### SIP Traffic
### Possible Solutions
- make it compatible with `tls_threads_mode = 1`
### Additional Information
@igorolhovskiy - are you able to test this branch from master(5.9-dev): https://github.com/kamailio/kamailio/tree/fix-tls-python
It has a few commits to make `tls_threads_mode=1|2` compatible with `app_python3`.
@space88man I can confirm, that fix is working for 5.8 branch with commit [cafe437](https://github.com/kamailio/kamailio/commit/cafe437dcb637b0e571a2d2ffd04d911...)
No deadlock with tls_threads_mode=2 and also no fail under TLS load for both modes.
Many thanks!
(As I was testing soon after you backported commit to 5.8, I really scratched my head why I cannot replicate the issue)
Closed #3832 as completed.