|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH] libxenstore: fix threading bug which cause xend star
I wrote:
> If a multithreaded caller creates a thread which calls xs_read_watch,
> before it has set any watches with xs_watch, the thread in
> xs_read_watch will enter read_message and sit reading the xenstored fd
> without the appropriate locks held. Other threads can then
> concurrently read the xenstored fd, which naturally does not work very
> well.
While I was investigating this, I noticed that xs_fileno, which is
used by numerous applications to be able to select() waiting for
xenstore watches, always returns -1 and has done so since
7268:2144de6eabcc "Make libxenstore thread-safe" in October 2008.
This is because nothing ever creates the pipe implied by watch_pipe.
xs_fileno should do so (and care should be taken that locking is
appropriate, which needs some thought).
I won't send a patch for this right away as I want to see whether my
deadlock bugfix works, first.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|