|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: xen-netback hotplug-status regression bug
On 13/04/2021 11:48, Michael Brown wrote: On 13/04/2021 08:12, Paul Durrant wrote:If the frontend subsequently disconnects and reconnects (e.g. transitions through Closed->Initialising->Connected) then:- Nothing recreates "hotplug-status"- When the frontend re-enters Connected state, connect() sets up a watch on "hotplug-status" again- The callback hotplug_status_changed() is never triggered, and so the backend device never transitions to Connected state.That's not how I read it. Given that "hotplug-status" is removed by the call to hotplug_status_changed() then the next call to connect() should fail to register the watch and 'have_hotplug_status_watch' should be 0. Thus backend_switch_state() should not defer the transition to XenbusStateConnected in any subsequent interaction with the frontend.Thank you for the reply. I've tested and confirmed my initial hypothesis: the call to xenbus_watch_pathfmt() succeeds even if the node does not exist.I confirmed this with ftrace using: cd /sys/kernel/debug/tracing echo function_graph > current_tracer echo set_backend_state > set_ftrace_filter echo xenbus_watch_pathfmt >> set_ftrace_filter echo register_xenbus_watch >> set_ftrace_filter echo xenbus_dev_fatal >> set_ftrace_filterOn the second time that the frontend transitions to Connected, this produced the trace: Ok, so it sound like this was probably my misunderstanding of xenstore semantics in the first place (although I'm sure I remember watch registration failing for non-existent nodes at some point in the past... that may have been with a non-upstream version of oxenstored though). Anyway... a reasonable fix would therefore be to read the node first and only register the watch if it does exist. Paul Thanks, Michael
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |