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

Daniel P. Berrange berrange at redhat.com
Tue Oct 2 08:02:04 UTC 2012


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 :|




More information about the libvir-list mailing list