xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Dagaen Golomb <dgolomb@seas.upenn.edu>
To: Meng Xu <xumengpanda@gmail.com>
Cc: Doug Goldstein <cardoe@cardoe.com>, xen-devel@lists.xen.org
Subject: Re: Problem Reading from XenStore in DomU
Date: Sun, 15 May 2016 23:30:13 -0400	[thread overview]
Message-ID: <CALcuvThiSjwARNQS=wb8Y3EvYbOVohC8yoi-CSXd8ZyDvpHAXw@mail.gmail.com> (raw)
In-Reply-To: <CALcuvTjfh4J8y0B_4GaajcgYQKvUJA3VFBrLFSq0HOVdWSyf0w@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2621 bytes --]

> >>>>> Hi All,
> >>>>>
> >>>>> I'm having an interesting issue. I am working on a project that
> >>>>> requires me to share memory between dom0 and domUs. I have this
> >>>>> successfully working using the grant table and the XenStore to
> >>>>> communicate grefs.
> >>>>>
> >>>>> My issue is this. I have one domU running Ubuntu 12.04 with a
default
> >>>>> 3.8.x kernel that has no issue reading or writing from the XenStore.
> >>>>> My work also requires some kernel modifications, and we have made
> >>>>> these changes in the 4.1.0 kernel. In particular, we've only added a
> >>>>> simple hypercall. This modified kernel is what dom0 is running, on
top
> >>>>> of Xen 4.7 rc1.
> >>>>
> >>>> Without reading the rest of the thread but seeing the kernel
versions.
> >>>> Can you check how you're communicating to xenstore? Is it via
> >>>> /dev/xen/xenbus or /proc/xen/xenbus? Anything after 3.14 will give
you
> >>>> deadlocks if you try to use /proc/xen/xenbus. Xen 4.6 and newer
should
> >>>> prefer /dev/xen/xenbus. Same thing can happen with privcmd but making
> >>>> that default didn't land until Xen 4.7. Since you're on the right
> >>>> versions I expect you're using /dev/xen/xenbus but you never know.
> >>>
> >>> How do I know which is being used? /dev/xen/xenbus is there and so is
> >>> process/xen/xenbus. Could this be a problem with header version
> >>> mismatches or something similar? I'm using the xen/xenstore.h header
> >>> file for all of my xenstore interactions. I'm running Xen 4.7 so it
> >>> should be in /dev/, and the old kernel is before 3.14 but the new one
> >>> is after, but I would presume the standard headers are updated to
> >>> account for this. Is there an easy way to check for this? Also, would
> >>> the same issue cause writes to fails? Because writes from the same
> >>> domain work fine, and appear to other domains using xenstore-ls.
> >>>
> >>> Regards,
> >>> Dagaen Golomb
> >>>
> >>
> >> Use strace on the process and see what gets opened.
> >
> > Ah, of course. It seems both the working and non-working domains are
> > using /proc/...
>
> Then according to Doug, "Anything after 3.14 will give you
> > deadlocks if you try to use /proc/xen/xenbus.". Maybe the non-working
domU uses kernel version after 3.14.

It does, being the custom kernel on version 4.1.0. But Dom0 uses this same
exact kernel and reads/writes just fine! The only solution if this is
indeed the problem appears to be changing the kernel source we build on or
some hacky method such as symlinking /proc/.. to /dev/.., there has to be
an elegant real solution to this...

Regards,
Dagaen Golomb

[-- Attachment #1.2: Type: text/html, Size: 3506 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

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

  parent reply	other threads:[~2016-05-16  3:30 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-15 16:40 Problem Reading from XenStore in DomU Dagaen Golomb
2016-05-15 17:04 ` Andrew Cooper
2016-05-15 19:54   ` Dagaen Golomb
2016-05-15 19:59     ` Dagaen Golomb
2016-05-15 20:35     ` Meng Xu
2016-05-15 21:11       ` Dagaen Golomb
2016-05-15 23:47         ` Dagaen Golomb
2016-05-16  1:21 ` Doug Goldstein
2016-05-16  1:28   ` Dagaen Golomb
2016-05-16  1:31     ` Doug Goldstein
2016-05-16  1:41       ` Dagaen Golomb
2016-05-16  3:15         ` Meng Xu
     [not found]           ` <CALcuvTjPpPQs5=i5uWvO2x_Krm-3j7u867yw4y1iWDNV7J83NA@mail.gmail.com>
     [not found]             ` <CALcuvTjfh4J8y0B_4GaajcgYQKvUJA3VFBrLFSq0HOVdWSyf0w@mail.gmail.com>
2016-05-16  3:30               ` Dagaen Golomb [this message]
2016-05-16  3:57                 ` Meng Xu
2016-05-16  9:52                   ` Andrew Cooper
2016-05-16 13:12                 ` Jonathan Creekmore
2016-05-16 13:16                   ` Dagaen Golomb
2016-05-16 15:55         ` Doug Goldstein
2016-05-16 16:03           ` Dagaen Golomb
2016-05-16 16:11             ` Dagaen Golomb
2016-05-16 16:20               ` Dagaen Golomb
2016-05-16 19:12                 ` Doug Goldstein
2016-05-16 19:52                   ` Dagaen Golomb
2016-05-16 19:56                     ` Dagaen Golomb
2016-05-16 20:18                       ` Dagaen Golomb
2016-05-16 22:25                         ` Doug Goldstein
2016-05-16 22:29                           ` Dagaen Golomb

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALcuvThiSjwARNQS=wb8Y3EvYbOVohC8yoi-CSXd8ZyDvpHAXw@mail.gmail.com' \
    --to=dgolomb@seas.upenn.edu \
    --cc=cardoe@cardoe.com \
    --cc=xen-devel@lists.xen.org \
    --cc=xumengpanda@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).