On Thu, Dec 17, 2009 at 09:27:27AM +0000, Daniel P. Berrange wrote:
On Thu, Dec 17, 2009 at 10:24:15AM +0100, Daniel Veillard wrote:
> On Wed, Dec 16, 2009 at 06:46:52PM +0000, Daniel P. Berrange wrote:
> > GNUTLS uses gcrypt for its crypto functions. gcrypt requires
> > that the app/library initializes threading before using it.
> > We don't want to force apps using libvirt to know about
> > gcrypt, so we make virInitialize init threading on their
> > behalf. This location also ensures libvirtd has initialized
> > it correctly. This initialization is required even if libvirt
> > itself were only using one thread, since another non-libvirt
> > library (eg GTK-VNC) could also be using gcrypt from another
> > thread
[...]
> Ah, subtle, I wonder how you realized that though :-)
If you don't have any thread callbacks set, libgcrypt has some assert()
code which attempts to detect if you use it from multiple threads. It is
inherantly racey, but their assert code will abort() your app a reasonable
amount of the time. We started seeing aborts of virt-manager in F12 since
it more heavily uses multiple threads, particularly because GTK-VNC also
uses thread and lots of libvirt & GTK-VNC stuff happends in separate
threads.
ah, okay !
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit
http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine
http://rpmfind.net/
http://veillard.com/ | virtualization library
http://libvirt.org/