[virt-tools-list] [libvirt] Deadlock when using custom handlers

Guido Günther agx at sigxcpu.org
Tue Aug 16 12:24:53 UTC 2011


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.
Cheers
 -- Guido
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ff-callbacks-must-be-invoked-from-a-clean-stack.patch
Type: text/x-diff
Size: 2234 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20110816/62931f4e/attachment.bin>


More information about the virt-tools-list mailing list