[SR-Users] Info: initialization of libssl 1.1.+ with PTHREAD_PROCESS_SHARED attribute for pthread mutex and rwlock

Julien Klingenmeyer julien.klingenmeyer at corp.ovh.com
Fri Sep 13 17:31:40 CEST 2019


Hi Daniel,

Glad to hear you integrated this workaround into the master branch!
We compiled it for testing and for now it seems to be OK. We do not notice any issue regarding it.
We will let you know if so.

Thanks,
Julien

De : sr-users <sr-users-bounces at lists.kamailio.org> au nom de Daniel-Constantin Mierla <miconda at gmail.com>
Répondre à : "Kamailio (SER) - Users Mailing List" <sr-users at lists.kamailio.org>
Date : vendredi 13 septembre 2019 à 13:34
À : "Kamailio (SER) - Users Mailing List" <sr-users at lists.kamailio.org>, sr-dev <sr-dev at lists.kamailio.org>
Objet : [SR-Users] Info: initialization of libssl 1.1.+ with PTHREAD_PROCESS_SHARED attribute for pthread mutex and rwlock

Hello,
after couple of months waiting for feedback about the workaround with the preloaded shared library to set the PTHREAD_PROCESS_SHARED attribute for pthread mutex/rwlock in order to avoid deadlocks and as it seems to be the solution, I just pushed a few commits to move that code in the core of kamailio.

It this way the initialization with the PTHREAD_PROCESS_SHARED attribute is done by default when libssl v1.1 is detected at compile time, without the need of using the approach with a preloaded library.

The shared library is still kept in the tls module:
  * https://github.com/kamailio/kamailio/tree/master/src/modules/tls/utils/openssl_mutex_shared

Probably is going to be removed in the near future.

I am asking the community members that use Kamailio on systems with libssl v1.1+ to test the master branch and give feedback. The master branch is anyhow in testing phase for preparing the next major release v5.3.0, so it will help for that as well.

If no issue is going to be reported soon, the commits will be backported to stable branches, to re-enable smooth use of Kamailio with libssl v1.1+.

When libssl v1.1+ is detected, the core links with pthread, but that was already present in the Makefiles.defs for different compile options. The pthread more or less a default library on linuxes/unixes, so this should not introduce any major dependency to the Kamailio core.

Cheers,
Daniel

--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20190913/d6ea0d52/attachment.html>


More information about the sr-users mailing list