<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="FR" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Hi Daniel,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Glad to hear you integrated this workaround into the master branch!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">We compiled it for testing and for now it seems to be OK. We do not notice any issue regarding it.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">We will let you know if so.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Julien<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:12.0pt;color:black">De :
</span></b><span lang="EN-US" style="font-size:12.0pt;color:black">sr-users <sr-users-bounces@lists.kamailio.org> au nom de Daniel-Constantin Mierla <miconda@gmail.com><br>
<b>Répondre à : </b>"Kamailio (SER) - Users Mailing List" <sr-users@lists.kamailio.org><br>
<b>Date : </b>vendredi 13 septembre 2019 à 13:34<br>
<b>À : </b>"Kamailio (SER) - Users Mailing List" <sr-users@lists.kamailio.org>, sr-dev <sr-dev@lists.kamailio.org><br>
<b>Objet : </b>[SR-Users] Info: initialization of libssl 1.1.+ with PTHREAD_PROCESS_SHARED attribute for pthread mutex and rwlock<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal">Hello,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">The shared library is still kept in the tls module:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">  * <a href="https://github.com/kamailio/kamailio/tree/master/src/modules/tls/utils/openssl_mutex_shared">
https://github.com/kamailio/kamailio/tree/master/src/modules/tls/utils/openssl_mutex_shared</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Probably is going to be removed in the near future.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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+.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Cheers,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Daniel<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><br>
-- <o:p></o:p></p>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal">Daniel-Constantin Mierla - <a href="http://www.asipto.com" target="_blank">
http://www.asipto.com</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> -
<a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>