qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paul Durrant <Paul.Durrant@citrix.com>
To: 'Olaf Hering' <olaf@aepfle.de>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [Xen-devel] memory leak in block/xen_disk in qemu-3.x
Date: Tue, 11 Dec 2018 16:01:51 +0000	[thread overview]
Message-ID: <74c1c30c147444cea915ee1befa56cf6@AMSPEX02CL03.citrite.net> (raw)
In-Reply-To: <20181211153047.GB18447@aepfle.de>

> -----Original Message-----
> From: Xen-devel [mailto:xen-devel-bounces@lists.xenproject.org] On Behalf
> Of Olaf Hering
> Sent: 11 December 2018 15:31
> To: xen-devel@lists.xenproject.org; qemu-devel@nongnu.org
> Subject: [Xen-devel] memory leak in block/xen_disk in qemu-3.x
> 
> What are the live time rules of ioreq->buf?
> 
> In my testing the memory usage of qemu is constantly growing from about
> 250MB to several GB after a few days.

Are you perhaps running into the problem addressed by this patch?

https://lists.gnu.org/archive/html/qemu-devel/2018-11/msg00244.html

  Paul

> 
> Some debugging shows that ioreq_runio_qemu_aio() overwrites ioreq->buf,
> which contributes to the leak. In addition, ioreq_reset() also just
> globbers iorew->buf. While this was observed with a backport of xen_disk
> changes to qemu-2.9, the code in xen_disk.c did not change in this
> regard. I changed the code to call qemu_vfree(ioreq->buf) in the few
> places that globber the pointer, that fixes the leak for me.
> 
> Right now neither qemu-3.0 nor 3.1 for me, so I can not test
> qemu.git#master if it eventually behaves different than
> qemu.git#stable-2.9+backport.
> 
> Olaf

  reply	other threads:[~2018-12-11 16:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-11 15:30 [Qemu-devel] memory leak in block/xen_disk in qemu-3.x Olaf Hering
2018-12-11 16:01 ` Paul Durrant [this message]
2018-12-11 16:07   ` [Qemu-devel] [Xen-devel] " Olaf Hering
2018-12-11 16:15     ` Paul Durrant

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=74c1c30c147444cea915ee1befa56cf6@AMSPEX02CL03.citrite.net \
    --to=paul.durrant@citrix.com \
    --cc=olaf@aepfle.de \
    --cc=qemu-devel@nongnu.org \
    --cc=xen-devel@lists.xenproject.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).