[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] segv in osevent_release_nexus with libxl backend to libvirt



Ian Campbell writes ("Re: [Xen-devel] segv in osevent_release_nexus with libxl 
backend to libvirt"):
> I don't know if this helps but on the 3 occasions I've just looked at
> the ev passed to libxl__ev_fd_deregister contains an fd which
> corresponds to a still open handle on /dev/xen/evtchn.

I see what is going on, I think.  The rules in libxl_event.h about
when one can call libxl_event_register_callbacks are (a) impossibly
lax and (b) not implemented even as far as possible.  The crash is due
to the evtchn fd having been set up during libxl initialisation (while
hooks==0) and therefore not having a `nexus', but being deregistered
later.

AFAICT libvirt doesn't (I think) depend on anything which is
particularly difficult to implement.  It seems to call
libxl_event_register_callbacks in a relatively quiescent state.

I have prepared a set of patches which may help.  They are at
xenbits.xen.org:ext/xen.git#for-ijc.  They arrange that libxl's
innards only register interest when need it, and deregister again.
That way registering the hooks after initialisation actually works,
because when libxl_event_register_callbacks is called, nothing is
actually registered.

I haven't executed these patches _at all_.  (I'm at a conference and
that's not very convenient to do remotely with the connectivity I have
here.)  But they do compile.  If they don't work, or you don't feel
like testing them, let me know and I will debug them with xl before
asking you to try again.

Ian.

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.