[virt-tools-list] [libvirt] Deadlock when using custom handlers
Daniel P. Berrange
berrange at redhat.com
Tue Aug 16 15:37:36 UTC 2011
On Tue, Aug 16, 2011 at 02:24:53PM +0200, Guido Günther wrote:
> Hi Daniel,
> On Sat, Aug 13, 2011 at 08:57:45PM -0700, Daniel P. Berrange wrote:
> > On Fri, Aug 12, 2011 at 11:54:28PM +0200, Guido Günther wrote:
> [..snip..]
> > In the default libvirt event loop, the 'ff' callback is always invoked
> > from a "clean" stack in the event loop, so you never have this problem
> > with re-entrancy.
> >
> > > Working around this by removing the locks from
> > > virNetSocketRemoveIOCallback leads to another deadlock:
> >
> > Yeah this is not a viable approach.
> Sure. This was only to see what else fails.
>
> > >
> > > I didn't see a simple way to fix this but would welcome any suggestions.
> >
> > IMHO we just have to document that event loop implementations
> > should make sure that the 'ff' callbacks are always invoked
> > from a clean stack. In the case of virt-viewer, this means
> > changing it to register a g_idle callback function to invoke
> > the 'ff' callback.
>
> Patch for virt-viewer attached. I'll come up with a doc patch for
> libvirt once I have a bit more time.
Thanks, I have applied this patch.
Regards,
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 virt-tools-list
mailing list