From: Ewan Mellor Subject: Re: Xenbus watch firing over and over Date: Wed, 3 Jan 2007 18:25:39 +0000 Message-ID: <20070103182539.GA26642@leeni.uk.xensource.com> References: <1167848163.2591.5.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1167848163.2591.5.camel@localhost.localdomain> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jacob Gorm Hansen Cc: xen-devel List-Id: xen-devel@lists.xenproject.org On Wed, Jan 03, 2007 at 07:16:03PM +0100, Jacob Gorm Hansen wrote: > hi, > I am trying to add xenbus watch support to mini-os, but am getting into > a endless loop of watches firing over and over. Below is an excerpt from > the xenstore tracefile: > > IN 0x805acc8 20070103 19:32:18 WATCH > (/local/domain/0/backend/vif/26/0/state 00043818 ) > CREATE watch 0x805a8b8 > OUT 0x805acc8 20070103 19:32:18 WATCH (OK ) > OUT 0x805acc8 20070103 19:32:18 WATCH_EVENT > (/local/domain/0/backend/vif/26/0/state 00043818 ) > IN 0x805acc8 20070103 19:32:18 UNWATCH > (/local/domain/0/backend/vif/26/0/state 00043818 ) > DESTROY watch 0x805a8b8 > OUT 0x805acc8 20070103 19:32:18 UNWATCH (OK ) > IN 0x805acc8 20070103 19:32:18 READ > (/local/domain/0/backend/vif/26/0/state ) > OUT 0x805acc8 20070103 19:32:18 READ (5) > IN 0x805acc8 20070103 19:32:18 WATCH > (/local/domain/0/backend/vif/26/0/state 00043818 ) > CREATE watch 0x806af60 > OUT 0x805acc8 20070103 19:32:18 WATCH (OK ) > OUT 0x805acc8 20070103 19:32:18 WATCH_EVENT > (/local/domain/0/backend/vif/26/0/state 00043818 ) > IN 0x805acc8 20070103 19:32:18 UNWATCH > (/local/domain/0/backend/vif/26/0/state 00043818 ) > DESTROY watch 0x806af60 > OUT 0x805acc8 20070103 19:32:18 UNWATCH (OK ) > IN 0x805acc8 20070103 19:32:18 READ > (/local/domain/0/backend/vif/26/0/state ) > OUT 0x805acc8 20070103 19:32:18 READ (5) > IN 0x805acc8 20070103 19:32:18 WATCH > (/local/domain/0/backend/vif/26/0/state 00043818 ) > > ... > > The same watch seems to be firing again and again, even though noone > appears to be writing it. Should I some ack the watch, or is this a bug > in xenstored? As far as xenstored is concerned, someone is explicitly deleting and reregistering that watch -- I don't think this is a bug in xenstored. You should expect to receive a watch event as soon as a watch is registered -- it looks to me like someone is receiving that event, then unwatching the node, reading its value, and reregistering the watch. Ewan.