[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!



Hi Daniel,
   Is this problem fixed in the latest version? What about the question 2 which related to openssl callbacks in multi-thread?

B.R.
Benjamin Wang

-----Original Message-----
From: Daniel P. Berrange [mailto:berrange redhat com] 
Sent: 2012年10月2日 16:02
To: Benjamin Wang (gendwang)
Cc: libvir-list redhat com; Yang Zhou (yangzho)
Subject: Re: [libvirt] Core dump caused by misusing openssl in multithread scenario!

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.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


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