WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: Some problem with xenstore

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Re: Some problem with xenstore
From: Daniel Castro <evil.dani@xxxxxxxxx>
Date: Tue, 2 Aug 2011 21:32:42 +0900
Delivery-date: Tue, 02 Aug 2011 05:33:41 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=tANAKhoWBaSx+/QSfY0EIR93pTKARG23N+xX9lD+TCw=; b=cqev34DE5nToZO3hEk/pdpMnxrEQktyK3Wx85FKVDasR0rY48yGTqIdftnlDo71g1I obgYF7EWmL2Tb+vYoEM2KFl+UhHSFM0Wl1/qAuhEjFyIq3le0iIcib4agz3YPPfEi6Yd Jwk5iOoWQzYXnX78lmPyAaosL9Gcv8BJX+j1g=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <CAP2B85-6SOgeaHeBWdm_oG4BU+EQ2d6RfDLSX3pL47Sxx2VuNg@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <CAP2B85-6SOgeaHeBWdm_oG4BU+EQ2d6RfDLSX3pL47Sxx2VuNg@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Mon, Aug 1, 2011 at 9:42 PM, Daniel Castro <evil.dani@xxxxxxxxx> wrote:
> Hello All,
>
> I am having some trouble with xenstore, so any ideas to solve this
> "small" problem will be greatly appreciated.
>
> Right now the rings for xenbus connections is created but whenever I
> send anything to xenstore (XS_READ, XS_WRITE, XS_GET_PERMS or
> XS_DIRECTORY) the response is 22 if I do a XS_DEBUG I get a 13. On the
> xenstore trace log I get for example:
> IN 0x1f53050 20110801 21:15:25 GET_PERMS (/local/domain/0)
> OUT 0x1f53050 20110801 21:15:25 ERROR (EINVAL )
> IN 0x1f53050 20110801 21:15:25 DEBUG (/local/domain/0)
> OUT 0x1f53050 20110801 21:15:25 ERROR (EACCES )
> The address for the rings is correct and the response code corresponds
> to the error number.
>
> The connection works the same way as in hvmloader xenbus.c
>
> The relevant code is like this:
> char *test = "/local/domain/0";   //path to query
> char * replay_data = malloc_high(1024); //buffer for response
> memset(replay_data,0,1024);
> replay_data[1023] = '\0'; //sanity check
> int replay_len = 0; //no response yet
> ret = xenbus_send(XS_DIRECTORY,strlen(test),test,&replay_len,&replay_data);
>
> After the xenbus_send the replay_data buffer is empty.
>
> Any ideas?
>

Since nobody had any ideas I went by myself and modified the code of
xenstored_core and xenstored_domain in order to get to the bottom of
this.

I am adding lines like:
trace("error on method XX in file YY where return should be THIS: %d, error);
To the methods I am calling so far with this results:

IN 0x13c5590 20110802 21:19:39 READ (/local/domain/1/device/pci/0/state )
Got message READ len 35 from 0x13c5590
Writing msg READ (1) out to 0x13c5590 domid 16843009
OUT 0x13c5590 20110802 21:19:39 READ (1)
IN 0x13b51f0 20110802 21:19:40 GET_PERMS (/local/domain/0)
Got message GET_PERMS len 15 from 0x13b51f0
debug: get_node in core; error name or is not valid node_name: (null)
Error node does not exist
Writing msg ERROR (EINVAL) out to 0x13b51f0 domid 16843009
OUT 0x13b51f0 20110802 21:19:40 ERROR (EINVAL )
IN 0x13b51f0 20110802 21:19:40 DEBUG (/local/domain/0)
Got message DEBUG len 15 from 0x13b51f0

Two things catch my attention:
* The domid  for the operation in xenstore is incorrect. Maybe I need
to do something about that. Since this code is being run when
hvmloader is deploying the BIOS on main memory maybe I have to do
something to introduce the domain to xenstore?
* The node string for GET_PERMS is getting to be null, so either it
does not exist or is being lost in the process. Again I am trying to
get /local/domain/0 according to xenstore-ls it does exist.


In order to make this work I have to add to the init script of
xenstored the --verbose option, and the following in
/etc/defaults/xencommons:
XENCONSOLED_TRACE=all
XENSTORED_TRACE=yes
XENBACKENDD_DEBUG=yes


I will keep digging on the matter.

Daniel

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>