All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Steven Haigh <netwiz@crc.id.au>, xen-devel@lists.xen.org
Subject: Re: Possible memory leak in qemu-dm (qemu-dm swapping 20GB+, adding 2gb+ per day)
Date: Tue, 25 Mar 2014 11:16:51 +0000	[thread overview]
Message-ID: <533165A3.20605@citrix.com> (raw)
In-Reply-To: <1395745431.6294.46.camel@kazak.uk.xensource.com>

On 25/03/14 11:03, Ian Campbell wrote:
> On Tue, 2014-03-25 at 21:48 +1100, Steven Haigh wrote:
>> On 25/03/14 21:28, Ian Campbell wrote:
>>> On Tue, 2014-03-25 at 09:09 +0200, Pasi Kärkkäinen wrote:
>>>> On Tue, Mar 25, 2014 at 01:08:00PM +1100, Steven Haigh wrote:
>>>>> Continuing from:
>>>>> http://lists.xenproject.org/archives/html/xen-devel/2013-11/msg03961.html
>>>>>
>>>>> Hi guys,
>>>>>
>>>>> Continuing on from this thread, has any progress been made on this?
>>>>>
>>>>> I have had a report from a user of my packages with the same problem:
>>>>> 	http://xen.crc.id.au/bugs/view.php?id=25
>>>>>
>>>>> He has been able to reproduce this in a reliable manner.
>>>>>
>>>> I thought the fix was committed to all the maintained qemu-traditional branches..
>>> I think so too.
>>>
>>> But if not then given a reliable repro I think the advice to try it
>>> under valgrind (which AIUI can now traces qemus thanks to Andrew Coopers
>>> work) still holds as a useful next step.
>> Is there any guide on how to do this to gather said info? Documentation?
>> Implementation? Interpretation?
> http://blog.xen.org/index.php/2013/01/18/using-valgrind-to-debug-xen-toolstacks/ has some info on running valgrind on the toolstack, I think this should extend to processes launched by the toolstack such as qemu, so it might be as easy as following that.
>
> Otherwise Andrew might have some more concrete advise but I think the
> approach I would take is to create a wrapper script which does
> "valgrind /path/to/qemu $@" and then use that via the
> device_model_override directive in the domain config.
>
> Ian.
>
>

I have never used valgrind in combination with xl and qemu before, but
the intercepting it in a Xapi environment is mostly similar.

Something like:

#!/bin/sh
valgrind --log-file="/path/to/logs/qemu-%p-valgrind.log" /path/to/qemu "$@"

should work fine.

You will need the latest valgrind, and the patchset of 7 from
1393858404-15220-1-git-send-email-andrew.cooper3@citrix.com as they are
still pending acceptance upstream.

At some point soon I will need to do some more patches for the new
SYSCTL and pending DOMCTL interface bumps new in unstable, but that wont
affect you if you are on a released version of Xen.

Finally, I have not yet tried qemu-upstream, so there might still be
some missing hypercalls, but qemu-traditional should work fine.

~Andrew

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

  reply	other threads:[~2014-03-25 11:16 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 [this message]
2014-03-26  5:23           ` Steven Haigh
2014-03-26  8:57             ` Ian Campbell
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=533165A3.20605@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=Ian.Campbell@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 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.