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

RE: [Xen-devel] domains not shutting down properly - theproblemisback again


  • To: "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "James Harper" <james.harper@xxxxxxxxxxxxxxxx>
  • Date: Fri, 2 Jan 2009 21:11:33 +1100
  • Cc:
  • Delivery-date: Fri, 02 Jan 2009 02:11:59 -0800
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AclsEUiDJwnrGfQLQ6G5Bsw4GM+wzgAAL2RgAAIdJkkAHEzXYAAA9a8QAAD1UUAACaHcAAABmirxAAAQbpA=
  • Thread-topic: [Xen-devel] domains not shutting down properly - theproblemisback again

> > Just to clarify, by 'everything works perfectly' I mean that a
domain
> > that doesn't have any vif or vbd interfaces (just a 'kernel=' line
for
> > testing), crashes and cleans up after itself, as opposed to crashing
and
> > hanging around. Restarting xenstored obviously breaks the connection
to
> > the Dom0 backend drivers.
> 
> Yeah, I was going to say... :-)
> 
> Anyway, your observations can be explained by the fact that the
restarted
> xenstored will not auto-connect to any domain. So since it holds no
> resources of the domU, it won't impede the domU's destruction.

Even a domain I create subsequent to restarting xenstored & xend? 'xm
console' doesn't work in that case so I'm guessing not.

> Xenstored is supposed to receive a VIRQ_DOM_EXC when a domain is
killed
> (see
> xen/common/domain.c:domain_kill(). This should trigger
> xenstored_domain.c:domain_cleanup() which queries every domain it
knows
> about and if it sees XEN_DOMINF_dying (which gets cooked in libxenctrl
> into
> boolean flag dominfo.dying) then it should talloc_free() the domain
state
> and hence release resources. These are the paths you need to log.
> 

I have previously logged xenstored_domain.c:domain_cleanup() - it never
gets called during the domain crashing or being shut down. I think the
action of creating another domain (or an explicit 'xm destroy') results
in domain_cleanup() getting called somewhere along the way, which mostly
cleans up the domain but obviously leaves a few pages and an event
channel lying around (as revealed by 'xm debug q' and 'lsevtchn').

I guess I'll start adding some logs to domain.c...

Thanks

James


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


 


Rackspace

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