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

Daniel P. Berrange berrange at redhat.com
Mon Oct 1 08:24:26 UTC 2012


On Sat, Sep 29, 2012 at 01:31:07PM +0000, Benjamin Wang (gendwang) wrote:
> Hi,
>   I am running libvirt with ESXi driver in multithread scenario to access ESXi by https. Sometimes a core dump will be generated as following:
> #0  0x0000003f9b030265 in raise () from /lib64/libc.so.6
> #1  0x0000003f9b031d10 in abort () from /lib64/libc.so.6
> #2  0x0000003f9b06a84b in __libc_message () from /lib64/libc.so.6
> #3  0x0000003f9b072fae in _int_malloc () from /lib64/libc.so.6
> #4  0x0000003f9b074cde in malloc () from /lib64/libc.so.6
> #5  0x0000003f9b07963b in strerror () from /lib64/libc.so.6
> #6  0x0000003fa188032a in ERR_load_ERR_strings () from /lib64/libcrypto.so.6
> #7  0x0000003fa187fde9 in ERR_load_crypto_strings () from /lib64/libcrypto.so.6
> #8  0x0000003fa48309d9 in SSL_load_error_strings () from /lib64/libssl.so.6
> #9  0x00002aaaba8e612e in Curl_ossl_init () from /opt/CSCOppm-unit/hypervisor/libcurl/lib/libcurl.so.4
> #10 0x00002aaaba8ee6c1 in curl_global_init () from /opt/CSCOppm-unit/hypervisor/libcurl/lib/libcurl.so.4
> #11 0x00002aaaba8ee6f8 in curl_easy_init () from /opt/CSCOppm-unit/hypervisor/libcurl/lib/libcurl.so.4
> #12 0x00002aaaba0d932b in esxVI_SessionIsActive (ctx=0x2aaac093ca80, sessionID=0x2aaac06932a0 "`3i\300\252*", userName=0x2aaac0ae6e80 "root", output=0xffffffffffffffff) at esx/esx_vi_methods.generated.c:599
> #13 0x00002aaaba0c7a60 in esxStorageVolumeLookupByKey (conn=0x7412, key=0x76c1 <Address 0x76c1 out of bounds>) at esx/esx_storage_driver.c:825
> 
> I checked that currently ESXi driver didn't initialize openssl. Because libcurl will not handle openssl for multi-thread. According to openssl API, libvirt should

No code in libvirt should assume curl uses openssl - it may well have
been compiled with gnutls, or nss instead. The actual flaw here is
that libvirt does not invoke 'curl_global_init' from virInitialize.

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