qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: xen-devel@lists.xenproject.org, qemu-devel@nongnu.org
Subject: [Qemu-devel] memory leak in block/xen_disk in qemu-3.x
Date: Tue, 11 Dec 2018 16:30:47 +0100	[thread overview]
Message-ID: <20181211153047.GB18447@aepfle.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 720 bytes --]

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.

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

             reply	other threads:[~2018-12-11 15:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-11 15:30 Olaf Hering [this message]
2018-12-11 16:01 ` [Qemu-devel] [Xen-devel] memory leak in block/xen_disk in qemu-3.x Paul Durrant
2018-12-11 16:07   ` 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=20181211153047.GB18447@aepfle.de \
    --to=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).