xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@citrix.com>
To: Steven Haigh <netwiz@crc.id.au>
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 08:57:03 +0000	[thread overview]
Message-ID: <1395824223.29683.20.camel@dagon.hellion.org.uk> (raw)
In-Reply-To: <5332646C.4040905@crc.id.au>

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

Thanks,

Ian.

  reply	other threads:[~2014-03-26  8:57 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 [this message]
2014-03-26  9:09               ` Steven Haigh
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=1395824223.29683.20.camel@dagon.hellion.org.uk \
    --to=ian.campbell@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=netwiz@crc.id.au \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).