All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Haigh <netwiz@crc.id.au>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>, xen-devel@lists.xen.org
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	[thread overview]
Message-ID: <5332994A.5080203@crc.id.au> (raw)
In-Reply-To: <1395824223.29683.20.camel@dagon.hellion.org.uk>


[-- Attachment #1.1: Type: text/plain, Size: 3579 bytes --]

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=25
> 
> Thanks.
> 
> Before we go any further, can you confirm that you have this commit in
> your qemu-xen-traditional tree:
>         commit 96b58a44756a8821c108358439b0f2c06e531159
>         Author: Matthew Daley <mattd@bugfuzz.com>
>         Date:   Wed Dec 4 15:16:18 2013 +1300
>         
>             xen_disk: fix memory leak
>             
>             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 ioreq.
>             
>             Reported-by: Maik Wessler <maik.wessler@yahoo.com>
>             Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
>             Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
>             
>             Backport to qemu-xen-traditional.
>             
>             Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
>             Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
>         
>> Do you have any further suggestions / ideas based on this?
> 
> 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 <olaf@aepfle.de>
>         Date:   Tue Oct 15 11:42:26 2013 +0200
>         
>             qemu-traditional: do not strip binaries during make install
>             
>             It is wrong to strip code during make install, unless explicit
>             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.
>             
>             Signed-off-by: Olaf Hering <olaf@aepfle.de>
>         

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 +0100
+++ 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) += qemu-xen-traditional-dir
-SUBDIRS-$(CONFIG_IOEMU) += qemu-xen-dir
+#SUBDIRS-$(CONFIG_IOEMU) += qemu-xen-dir
 endif

 SUBDIRS-y += 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 magic
> with the unstripped binary.
> 
> Adding --leak-check=full and/or --track-origins=yes to the valgrind
> options might also be helpful.
> 
> 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


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2014-03-26  9:09 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-25  2:08 Possible memory leak in qemu-dm (qemu-dm swapping 20GB+, adding 2gb+ per day) Steven Haigh
2014-03-25  7:09 ` Pasi Kärkkäinen
2014-03-25 10:28   ` Ian Campbell
2014-03-25 10:48     ` Steven Haigh
2014-03-25 11:03       ` Ian Campbell
2014-03-25 11:16         ` Andrew Cooper
2014-03-26  5:23           ` Steven Haigh
2014-03-26  8:57             ` Ian Campbell
2014-03-26  9:09               ` Steven Haigh [this message]
2014-03-26  9:41                 ` Ian Campbell
2014-03-26 15:01                   ` Pasi Kärkkäinen
2014-03-26 23:49                     ` Steven Haigh
  -- strict thread matches above, loose matches on Subject: below --
2013-11-20 14:57 Niklas Bivald
2013-11-22  1:49 ` Matthew Daley
2013-11-25  9:48   ` Niklas Bivald
2013-11-25 11:58     ` Ian Jackson
2013-11-25 12:32       ` Niklas Bivald
2013-11-25 12:40         ` Ian Jackson
2013-11-25 12:59           ` Niklas Bivald
2013-11-27  9:49             ` Niklas Bivald
2013-11-27 10:32               ` Fabio Fantoni
2013-11-27 11:06             ` Ian Campbell
2013-12-02 20:49               ` Niklas Bivald
2013-12-02 22:24                 ` Matthew Daley
2013-12-03  8:27                   ` Niklas Bivald
2013-12-03 11:10                   ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5332994A.5080203@crc.id.au \
    --to=netwiz@crc.id.au \
    --cc=Ian.Campbell@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.