[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] Core dump caused by misusing openssl in multithread scenario!



2012/10/2 Daniel P. Berrange <berrange redhat com>:
> On Tue, Oct 02, 2012 at 02:57:46AM +0000, Benjamin Wang (gendwang) wrote:
>> Hi Daniel,
>>    My comments are as following:
>> 1. Currently curl_easy_init method is called from esxVI_CURL_Connect method in esx_vi.c. And curl_global_init method is called by curl_easy_init. If we move
>> Curl_global_init to virInitialize, shall we still need to call curl_easy_init from esxVI_CURL_Connect? Did the latest version fix this problem?
>
> That is actually the problem. The CURL docs explicitly tell you
> that it is *not* safe to rely on curl_easy_init in a multithreaded
> program. You must call curl_global_init explicitly.

And here's is a patch that does this.

https://www.redhat.com/archives/libvir-list/2012-October/msg00199.html

-- 
Matthias Bolte
http://photron.blogspot.com


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]