* Xenbus watch firing over and over
@ 2007-01-03 18:16 Jacob Gorm Hansen
2007-01-03 18:25 ` Ewan Mellor
2007-01-05 11:21 ` Grzegorz Milos
0 siblings, 2 replies; 5+ messages in thread
From: Jacob Gorm Hansen @ 2007-01-03 18:16 UTC (permalink / raw)
To: xen-devel
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?
This is with Xen 3.0.3.
Regards,
Jacob
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Xenbus watch firing over and over
2007-01-03 18:16 Xenbus watch firing over and over Jacob Gorm Hansen
@ 2007-01-03 18:25 ` Ewan Mellor
2007-01-04 12:18 ` Jacob Gorm Hansen
2007-01-05 11:21 ` Grzegorz Milos
1 sibling, 1 reply; 5+ messages in thread
From: Ewan Mellor @ 2007-01-03 18:25 UTC (permalink / raw)
To: Jacob Gorm Hansen; +Cc: xen-devel
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Xenbus watch firing over and over
2007-01-03 18:25 ` Ewan Mellor
@ 2007-01-04 12:18 ` Jacob Gorm Hansen
2007-01-04 12:28 ` Ewan Mellor
0 siblings, 1 reply; 5+ messages in thread
From: Jacob Gorm Hansen @ 2007-01-04 12:18 UTC (permalink / raw)
To: Ewan Mellor; +Cc: xen-devel
On Wed, 2007-01-03 at 18:25 +0000, Ewan Mellor wrote:
> 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.
That explains it, I was trying a simple single-threaded setup where the
watch is unregistered once it has fired. What is the rationale for
triggering the watch on registration?
Jacob
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Xenbus watch firing over and over
2007-01-04 12:18 ` Jacob Gorm Hansen
@ 2007-01-04 12:28 ` Ewan Mellor
0 siblings, 0 replies; 5+ messages in thread
From: Ewan Mellor @ 2007-01-04 12:28 UTC (permalink / raw)
To: Jacob Gorm Hansen; +Cc: xen-devel
On Thu, Jan 04, 2007 at 01:18:32PM +0100, Jacob Gorm Hansen wrote:
> On Wed, 2007-01-03 at 18:25 +0000, Ewan Mellor wrote:
>
> > 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.
>
> That explains it, I was trying a simple single-threaded setup where the
> watch is unregistered once it has fired. What is the rationale for
> triggering the watch on registration?
It was believed (not by me) that it made it easier to write client code,
because your initial reads from the store would be triggered off the first
watch, and so you didn't need initialisation code separate from your
state-change-handling code. We're stuck with it now.
Ewan.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Xenbus watch firing over and over
2007-01-03 18:16 Xenbus watch firing over and over Jacob Gorm Hansen
2007-01-03 18:25 ` Ewan Mellor
@ 2007-01-05 11:21 ` Grzegorz Milos
1 sibling, 0 replies; 5+ messages in thread
From: Grzegorz Milos @ 2007-01-05 11:21 UTC (permalink / raw)
To: Jacob Gorm Hansen; +Cc: xen-devel
Could you send mini-os diff?
Cheers
Gregor
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?
>
> This is with Xen 3.0.3.
>
> Regards,
> Jacob
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-01-05 11:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-03 18:16 Xenbus watch firing over and over Jacob Gorm Hansen
2007-01-03 18:25 ` Ewan Mellor
2007-01-04 12:18 ` Jacob Gorm Hansen
2007-01-04 12:28 ` Ewan Mellor
2007-01-05 11:21 ` Grzegorz Milos
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.