This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-devel] [PATCH] libxenlight: fix multiple xenstore watches probl

On Thu, 3 Dec 2009, Stefano Stabellini wrote:
> On Thu, 3 Dec 2009, Vincent Hanquez wrote:
> > On Thu, Dec 03, 2009 at 03:39:57PM +0000, Stefano Stabellini wrote:
> > > You are right about that, but Andres found the bug and fixed it with his
> > > "clone context to avoid GC corruption" patch.
> > 
> > that's not about whether or not it can works. I think it's just confusing to
> > clone and share a context in a mono thread where the only thing you want 
> > out of
> > it, is a xenstore handle. You can simply clone a new xs handle, and worst 
> > case
> > scenario, you can extends the xl context to store 2 xs connections.
> > 
> > In the end, the approch is overkill, and complex solution often lead to
> > unforseen bug (at this was the case here)
> > 
> All right then, I am OK with not cloning the whole context but just the
> xenstore connection, however it would also be nice to be able to wrap
> the connection opening in a nice function like Andres did with the
> context.
> What about the following as a fix to the cloning context problem, and as
> an alternative to Andres' 0/7 patch:

Actually I have just realized that this code is racy and a really bad
idea (think is someone else is trying to access ctx->xsh at the same time).

At this point unless you have a better suggestion I stand behind Andres'
0/7 patch.

Xen-devel mailing list