From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zhigang Wang Subject: Re: [PATCH] Fix memory leak in xend Date: Fri, 29 Aug 2008 09:14:54 +0800 Message-ID: <48B74D8E.50206@oracle.com> References: <48768D22.6010005@novell.com> <48B71E19.7080800@xs4all.nl> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------080603010008080403050500" Return-path: In-Reply-To: <48B71E19.7080800@xs4all.nl> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Stefan de Konink , Jim Fehlig Cc: xen-devel List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------080603010008080403050500 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit I also encountered this many times. I come up with a patch. Jim, please review. thanks, zhigang Stefan de Konink wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > Jim Fehlig schreef: >> We observed OOM kills of xend after ~20 days in openSUSE build service >> workers. xend reached around 2.5 G virt, 1.5G res, and 1.8G shared >> memory usage. Attached patch provides a plug. > > Did you see problems after this patch? I have applied it on 3.2.1 which > borks about missing vm_metrics. > > > Stefan > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEAREKAAYFAki3HhkACgkQYH1+F2Rqwn049gCeIYOm5MSf/NQfgdb9TC009wjS > 9l8An0PeV5xp/jYamySsSACJO1OI2Jp7 > =bJwS > -----END PGP SIGNATURE----- > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel --------------080603010008080403050500 Content-Type: text/x-patch; name="block-vm-metrics-destroy-exception.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="block-vm-metrics-destroy-exception.patch" This patch prevent VM metrics destroy from raising exceptions. Everytime an error accured during VM start, VM metrics destroy will raise an exception and override the right exception which should be raised to the upper invocation. Signed-off-by: Zhigang Wang --- xen-unstable/tools/python/xen/xend/XendDomainInfo.py 2008-08-28 10:17:49.000000000 +0800 +++ xen-unstable.local/tools/python/xen/xend/XendDomainInfo.py 2008-08-29 09:04:11.000000000 +0800 @@ -2656,7 +2656,11 @@ class XendDomainInfo: from xen.xend import XendDomain if not XendDomain.instance().is_domain_managed(self): - self.metrics.destroy() + try: + self.metrics.destroy() + except: + log.exception("Destroy VM metrics failed.") + self._unwatchVm() try: --------------080603010008080403050500 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------080603010008080403050500--