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.
As promised here's the patch for libvirt. O.k. to apply?
Cheers,
-- Guido