You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by Mario Emmenlauer <ma...@emmenlauer.de> on 2018/06/07 09:05:40 UTC

can not initializeOpenSSL() after cleanupOpenSSL() anymore

Hi,

I am quite plagued by an issue with openSSL mutexes. A corresponding
issue report is here: https://issues.apache.org/jira/browse/THRIFT-4411

However there is something fundamental I don't understand: after my app
cleans up openSSL for the first time, it seems I can no longer successfully
use openSSL, even when using initializeOpenSSL() again. Is that to be
expected? After cleanupOpenSSL(), when I initializeOpenSSL() again and
use it, I will eventually get a mutex error 'Assertion `px != 0' failed.'
as described in THRIFT-4411.

From the code in TSSLSocket.cpp, I understood that it should be supported
to repeatedly initialize and cleanup openSSL, because there is a matching
tracker variable 'openSSLInitialized'.

All the best,

    Mario Emmenlauer


--
BioDataAnalysis GmbH, Mario Emmenlauer      Tel. Buero: +49-89-74677203
Balanstr. 43                   mailto: memmenlauer * biodataanalysis.de
D-81669 München                          http://www.biodataanalysis.de/

Re: can not initializeOpenSSL() after cleanupOpenSSL() anymore

Posted by Mario Emmenlauer <ma...@emmenlauer.de>.
Dear Jim,

thanks for the help! I will try OpenSSL 1.1 and see if that works better.
For other people that run into the same issue, I've made good progress
by manually initializing OpenSSL and not calling cleanupOpenSSL() until
the very end of my application. It may leak a bit of resources but the
crashes have since disappeared.

All the best,

   Mario


On 13.06.2018 12:27, James E. King, III wrote:
> Starting with OpenSSL 1.1 these init and cleanup methods are no-ops.  Can
> you update?  I have never tried to call init after calling cleanup but 1.1
> has some major changes in this area and all of those calls are deprecated
> and no-op'd.
> 
> - Jim
> 
> On Wed, Jun 13, 2018, 5:34 AM Mario Emmenlauer <ma...@emmenlauer.de> wrote:
> 
>>
>> Dear All,
>>
>> do you think this may be a bug? Should I report it in the issue tracker?
>> Or is it to be expected that cleanupOpenSSL() can not be recovered from?
>>
>>
>> On 07.06.2018 11:05, Mario Emmenlauer wrote:
>>>
>>> Hi,
>>>
>>> I am quite plagued by an issue with openSSL mutexes. A corresponding
>>> issue report is here: https://issues.apache.org/jira/browse/THRIFT-4411
>>>
>>> However there is something fundamental I don't understand: after my app
>>> cleans up openSSL for the first time, it seems I can no longer
>> successfully
>>> use openSSL, even when using initializeOpenSSL() again. Is that to be
>>> expected? After cleanupOpenSSL(), when I initializeOpenSSL() again and
>>> use it, I will eventually get a mutex error 'Assertion `px != 0' failed.'
>>> as described in THRIFT-4411.
>>>
>>> From the code in TSSLSocket.cpp, I understood that it should be supported
>>> to repeatedly initialize and cleanup openSSL, because there is a matching
>>> tracker variable 'openSSLInitialized'.


--
BioDataAnalysis GmbH, Mario Emmenlauer      Tel. Buero: +49-89-74677203
Balanstr. 43                   mailto: memmenlauer * biodataanalysis.de
D-81669 München                          http://www.biodataanalysis.de/

Re: can not initializeOpenSSL() after cleanupOpenSSL() anymore

Posted by "James E. King, III" <jk...@apache.org>.
Starting with OpenSSL 1.1 these init and cleanup methods are no-ops.  Can
you update?  I have never tried to call init after calling cleanup but 1.1
has some major changes in this area and all of those calls are deprecated
and no-op'd.

- Jim

On Wed, Jun 13, 2018, 5:34 AM Mario Emmenlauer <ma...@emmenlauer.de> wrote:

>
> Dear All,
>
> do you think this may be a bug? Should I report it in the issue tracker?
> Or is it to be expected that cleanupOpenSSL() can not be recovered from?
>
>
> On 07.06.2018 11:05, Mario Emmenlauer wrote:
> >
> > Hi,
> >
> > I am quite plagued by an issue with openSSL mutexes. A corresponding
> > issue report is here: https://issues.apache.org/jira/browse/THRIFT-4411
> >
> > However there is something fundamental I don't understand: after my app
> > cleans up openSSL for the first time, it seems I can no longer
> successfully
> > use openSSL, even when using initializeOpenSSL() again. Is that to be
> > expected? After cleanupOpenSSL(), when I initializeOpenSSL() again and
> > use it, I will eventually get a mutex error 'Assertion `px != 0' failed.'
> > as described in THRIFT-4411.
> >
> > From the code in TSSLSocket.cpp, I understood that it should be supported
> > to repeatedly initialize and cleanup openSSL, because there is a matching
> > tracker variable 'openSSLInitialized'.
>
>
>
> All the best and thanks,
>
>     Mario Emmenlauer
>
>
> --
> BioDataAnalysis GmbH, Mario Emmenlauer      Tel. Buero: +49-89-74677203
> Balanstr. 43                   mailto: memmenlauer * biodataanalysis.de
> D-81669 München                          http://www.biodataanalysis.de/
>

Re: can not initializeOpenSSL() after cleanupOpenSSL() anymore

Posted by Mario Emmenlauer <ma...@emmenlauer.de>.
Dear All,

do you think this may be a bug? Should I report it in the issue tracker?
Or is it to be expected that cleanupOpenSSL() can not be recovered from?


On 07.06.2018 11:05, Mario Emmenlauer wrote:
> 
> Hi,
> 
> I am quite plagued by an issue with openSSL mutexes. A corresponding
> issue report is here: https://issues.apache.org/jira/browse/THRIFT-4411
> 
> However there is something fundamental I don't understand: after my app
> cleans up openSSL for the first time, it seems I can no longer successfully
> use openSSL, even when using initializeOpenSSL() again. Is that to be
> expected? After cleanupOpenSSL(), when I initializeOpenSSL() again and
> use it, I will eventually get a mutex error 'Assertion `px != 0' failed.'
> as described in THRIFT-4411.
> 
> From the code in TSSLSocket.cpp, I understood that it should be supported
> to repeatedly initialize and cleanup openSSL, because there is a matching
> tracker variable 'openSSLInitialized'.



All the best and thanks,

    Mario Emmenlauer


--
BioDataAnalysis GmbH, Mario Emmenlauer      Tel. Buero: +49-89-74677203
Balanstr. 43                   mailto: memmenlauer * biodataanalysis.de
D-81669 München                          http://www.biodataanalysis.de/