On 16/08/15 09:59, Ian Campbell wrote:
> On Thu, 2015-08-13 at 16:44 -0500, Jonathan Creekmore wrote:
>> With the addition of FMODE_ATOMIC_POS in the Linux 3.14 kernel,
>> concurrent blocking file accesses to a single open file descriptor can
>> cause a deadlock trying to grab the file position lock. If a watch has
>> been set up, causing a read_thread to blocking read on the file
>> descriptor, then future writes that would cause the background read to
>> complete will block waiting on the file position lock before they can
>> execute.

I think you should make libxenstore open /dev/xen/xenbus instead.  Since
this is a character device it should work correctly.

It may be necessary to try /dev/xen/xenbus first and fallback to
/proc/xen/xenbus.

> This sounds like you are describing a kernel bug. Shouldn't this be
> fixed in the kernel?

/proc/xen/xenbus should never have existed (it's a character device
masquerading as a regular file), but I guess we're stuck with it now.

The correct kernel fix is to make /proc/xen/xenbus a character device
identical to /dev/xen/xenbus or a symlink to /dev/xen/xenbus.

David

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to