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

[Xen-devel] Domain relinquish resources racing with p2m access


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx, tim@xxxxxxx, keir@xxxxxxx
  • From: "Andres Lagar-Cavilla" <andres@xxxxxxxxxxxxxxxx>
  • Date: Wed, 1 Feb 2012 12:49:24 -0800
  • Delivery-date: Wed, 01 Feb 2012 20:50:01 +0000
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=lagarcavilla.org; h=message-id :date:subject:from:to:reply-to:mime-version:content-type: content-transfer-encoding; q=dns; s=lagarcavilla.org; b=DsdXP1F7 qO2YJXSW7aTHEnHviARhwJnVmcv7LA+HiR5bkTrIDH6SLyoENaN+Dsn72DRpKLOv zzqMewKcojEvAFjIIh0FIIrelaKjQYsM2zhWjU9124cErGFvu7m+qtqpsoxNgZU5 JpSn7yY4u2zMiFa12EjDIimwgCyYsEXGpDc=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

So we've run into this interesting (race?) condition while doing
stress-testing. We pummel the domain with paging, sharing and mmap
operations from dom0, and concurrently we launch a domain destruction.
Often we get in the logs something along these lines

(XEN) mm.c:958:d0 Error getting mfn 859b1a (pfn ffffffffffffffff) from L1
entry 8000000859b1a625 for l1e_owner=0, pg_owner=1

We're using the synchronized p2m patches just posted, so my analysis is as
follows:

- the domain destroy domctl kicks in. It calls relinquish resources. This
disowns and puts most domain pages, resulting in invalid (0xff...ff) m2p
entries

- In parallel, a do_mmu_update is making progress, it has no issues
performing a p2m lookup because the p2m has not been torn down yet; we
haven't gotten to the RCU callback. Eventually, the mapping fails in
page_get_owner in get_pafe_from_l1e.

The map is failed, as expected, but what makes me uneasy is the fact that
there is a still active p2m lurking around, with seemingly valid
translations to valid mfn's, while all the domain pages are gone.

Is this a race condition? Can this lead to trouble?

Thanks!
Andres


_______________________________________________
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®.