From: Dan Magenheimer Subject: RE: Bug in tmem: refcount leak leaves zombie saved domains Date: Thu, 10 Jun 2010 06:08:00 -0700 (PDT) Message-ID: <95ac1e91-a30f-4930-aae8-20dd294b72ce@default> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org OK, will take a look. IIRC, Jan's work to fix the domain reference stuff just before 4.0 shipped was a heavy hammer but since it seemed to work, I didn't want to mess with it so close to release... really there's only a need to take a reference once on first use and release it at shutdown, rather than take/release frequently. IIRC, I had used a macro that took references when they weren't really needed and Jan placed the matching macros that did the release. Dan > -----Original Message----- > From: Keir Fraser [mailto:keir.fraser@eu.citrix.com] > Sent: Thursday, June 10, 2010 3:47 AM > To: xen-devel@lists.xensource.com > Cc: Dan Magenheimer > Subject: Bug in tmem: refcount leak leaves zombie saved domains >=20 > Dan, >=20 > Just doing some save/restore testing on xen-unstable tip, I noticed > that: > # xm create ./pv_config > # xm save PV1 >=20 > Would leave the saved guest as a zombie in the DOMDYING_dead state with > no > pages, yet with refcnt=3D1. This happens absolutely consistently. Just as > consistently, it does not happen when I boot Xen with no-tmem. My > conclusion > is that tmem is leaking a domain reference count during domain save. > This > doesn't happen if I merely "xm create ...; xm destroy ...". >=20 > My pv_config file contains nothing exciting: > kernel =3D "/nfs/keir/xen/xen64.hg/dist/install/boot/vmlinuz-2.6.18.8- > xenU" > memory =3D 750 > name =3D "PV1" > vcpus =3D 2 > vif =3D [ 'mac=3D00:1a:00:00:01:01' ] > disk =3D [ 'phy:/dev/VG/Suse10.1_64_1,sda1,w' ] > root =3D "/dev/sda1 ro xencons=3Dtty" > extra =3D "" > tsc_native =3D 1 > on_poweroff =3D 'destroy' > on_reboot =3D 'restart' > on_crash =3D 'preserve' >=20 > The dom{0,U} kernels are tip of linux-2.6.18-xen, default -xen{0,U} > configs. >=20 > -- Keir >=20 >=20