From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Haigh Subject: Re: Possible memory leak in qemu-dm (qemu-dm swapping 20GB+, adding 2gb+ per day) Date: Wed, 26 Mar 2014 20:09:30 +1100 Message-ID: <5332994A.5080203@crc.id.au> References: <5330E500.6020906@crc.id.au> <20140325070913.GC3200@reaktio.net> <1395743334.6294.37.camel@kazak.uk.xensource.com> <53315EE5.7050803@crc.id.au> <1395745431.6294.46.camel@kazak.uk.xensource.com> <533165A3.20605@citrix.com> <5332646C.4040905@crc.id.au> <1395824223.29683.20.camel@dagon.hellion.org.uk> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0521385097504654929==" Return-path: In-Reply-To: <1395824223.29683.20.camel@dagon.hellion.org.uk> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Andrew Cooper , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --===============0521385097504654929== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="b7hQ5xs4LEve0KUi90FK7JMrWE3X7TdQS" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --b7hQ5xs4LEve0KUi90FK7JMrWE3X7TdQS Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 26/03/14 19:57, Ian Campbell wrote: > On Wed, 2014-03-26 at 16:23 +1100, Steven Haigh wrote: >> Valgrind log available here: >> http://xen.crc.id.au/bugs/view.php?id=3D25 >=20 > Thanks. >=20 > Before we go any further, can you confirm that you have this commit in > your qemu-xen-traditional tree: > commit 96b58a44756a8821c108358439b0f2c06e531159 > Author: Matthew Daley > Date: Wed Dec 4 15:16:18 2013 +1300 > =20 > xen_disk: fix memory leak > =20 > On ioreq_release the full ioreq was memset to 0, losing all= the data > and memory allocations inside the QEMUIOVector, which leads= to a > memory leak. Create a new function to specifically reset io= req. > =20 > Reported-by: Maik Wessler > Signed-off-by: Roger Pau Monn=E9 > Signed-off-by: Stefano Stabellini > =20 > Backport to qemu-xen-traditional. > =20 > Signed-off-by: Matthew Daley > Acked-by: Ian Jackson > =20 >> Do you have any further suggestions / ideas based on this? >=20 > Unfortunately the qemu-dm binary seems to have been stripped, which > removes much of the useful info from the traces. Please can you make > sure you have the following commit to the qemu-xen-traditional tree: > commit 18a08a23da88863435d56a0b14ff72013ef3b003 > Author: Olaf Hering > Date: Tue Oct 15 11:42:26 2013 +0200 > =20 > qemu-traditional: do not strip binaries during make install= > =20 > It is wrong to strip code during make install, unless expli= cit > requested. Introduce a new variable INSTALL_PROG and use it= along with > an optional STRIP_OPT where currently install -s -m 755 is = used. > This is what upstream qemu offers in version 1.6. > =20 > Signed-off-by: Olaf Hering > =20 I am using the qemu-xen-traditional that comes with xen-4.2.3.tar.gz There are no patches on top of this apart from: $ cat qemu-xen.tradonly.patch --- xen-4.2.0/tools/Makefile.orig 2012-05-27 20:29:17.372660785 +01= 00 +++ xen-4.2.0/tools/Makefile 2012-05-27 20:38:24.066826167 +0100 @@ -35,7 +35,7 @@ # do not recurse in to a dir we are about to delete ifneq "$(MAKECMDGOALS)" "distclean" SUBDIRS-$(CONFIG_IOEMU) +=3D qemu-xen-traditional-dir -SUBDIRS-$(CONFIG_IOEMU) +=3D qemu-xen-dir +#SUBDIRS-$(CONFIG_IOEMU) +=3D qemu-xen-dir endif SUBDIRS-y +=3D xenpmd > If you are packaging this as RPM I guess you will also want the > accompanying debuginfo RPM installed too, since RPM will have done magi= c > with the unstripped binary. >=20 > Adding --leak-check=3Dfull and/or --track-origins=3Dyes to the valgrind= > options might also be helpful. >=20 > The most plausible candidate for a leak would seem to be "Syscall param= > munmap(length) contains uninitialised byte(s)", but that might just be > down to "Warning: noted but unhandled ioctl 0x84501 with no > size/direction hints" on the corresponding mmap call. Hopefully with > debugging symbols things will become clearer. Will see what I can get the reporter to discover with this... -- Steven Haigh Email: netwiz@crc.id.au Web: https://www.crc.id.au Phone: (03) 9001 6090 - 0412 935 897 Fax: (03) 8338 0299 --b7hQ5xs4LEve0KUi90FK7JMrWE3X7TdQS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJTMplOAAoJEEGvNdV6fTHcZqEQAKC+Aefe5Di3/zQIUn6q6GqQ FVC1hkKqBuqKEFOf0qhmDybVgTYs3VtfjTGcTxl6n9OL6mbcZdlSQpxklt5Gvwbn ap5oFzBEHIl6Rnyf7e9j1D7F9YWyYzOemcxOTJOu8TxQQQ4S60T4CJBb18v9lq8N pF/iQjwud7Z9B1heBY9Mq8MK/beHumG9rgAQ8lP4ZcNVPSX7xduTydaTnO0e2Clh KEfRIXyXzY1TI8KGzrr5AIcO6vsu4vhzpv1mOiVD2uB5YkKcK/1aQ3CaN/E9Hyl7 xyMywJeXZqZthY4fFWndjyrabHNDtOtIpHih2+sNDFgw3lAKyEq9//1XpWkNy7nk i3u2E2QM19XE264wCfN5k1UStIp0iBSPmZVzYqEoI2swb/eqEmqTdhbLPlwGQ3Pb wiRPEfRAbwDwfqR08rKKr6iOcp+93HUpSnE7ZmoOgIpcHV/9XchMjsn/1v5Yd6ys e/aJxiDQY/U0/xi0Yy4m2cQjDCcK6L8LQLjgoHZ4KECM0xYGDkZ3O8/2ZCkhu49Y sc4yFrAlWScGOLPlLG37c7AjOPv8PtqctQRc4wwNhKX2K05f6mNh2WVjn5fijNmI u7zelul43fH3tjgSMdtBac5qCsuLXPVL1pdGQp4DsvSvx7n8MuJtOdVtfpKHNVvp sZEF9kQKkQSy0hyAuuqK =/Dg3 -----END PGP SIGNATURE----- --b7hQ5xs4LEve0KUi90FK7JMrWE3X7TdQS-- --===============0521385097504654929== 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.xen.org http://lists.xen.org/xen-devel --===============0521385097504654929==--