From: Olaf Hering <olaf@aepfle.de>
To: xen-devel@lists.xenproject.org, qemu-devel@nongnu.org
Subject: 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.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 #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 157 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
WARNING: multiple messages have this Message-ID (diff)
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 --]
next reply other threads:[~2018-12-11 15:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-11 15:30 Olaf Hering [this message]
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
2018-12-11 16:01 ` [Qemu-devel] [Xen-devel] " Paul Durrant
2018-12-11 16:07 ` Olaf Hering
2018-12-11 16:07 ` [Qemu-devel] [Xen-devel] " Olaf Hering
2018-12-11 16:15 ` Paul Durrant
2018-12-11 16:15 ` [Qemu-devel] [Xen-devel] " 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 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.