* [Qemu-devel] memory leak in block/xen_disk in qemu-3.x
@ 2018-12-11 15:30 Olaf Hering
2018-12-11 16:01 ` [Qemu-devel] [Xen-devel] " Paul Durrant
0 siblings, 1 reply; 4+ messages in thread
From: Olaf Hering @ 2018-12-11 15:30 UTC (permalink / raw)
To: xen-devel, qemu-devel
[-- 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 --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [Xen-devel] memory leak in block/xen_disk in qemu-3.x
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:07 ` Olaf Hering
0 siblings, 1 reply; 4+ messages in thread
From: Paul Durrant @ 2018-12-11 16:01 UTC (permalink / raw)
To: 'Olaf Hering', xen-devel@lists.xenproject.org,
qemu-devel@nongnu.org
> -----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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [Xen-devel] memory leak in block/xen_disk in qemu-3.x
2018-12-11 16:01 ` [Qemu-devel] [Xen-devel] " Paul Durrant
@ 2018-12-11 16:07 ` Olaf Hering
2018-12-11 16:15 ` Paul Durrant
0 siblings, 1 reply; 4+ messages in thread
From: Olaf Hering @ 2018-12-11 16:07 UTC (permalink / raw)
To: Paul Durrant; +Cc: xen-devel@lists.xenproject.org, qemu-devel@nongnu.org
[-- Attachment #1: Type: text/plain, Size: 785 bytes --]
On Tue, Dec 11, Paul Durrant wrote:
> > -----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
This looks like a fix, rather than an improvement.
More than a month passed already, why is it not yet in qemu.git#master?
Olaf
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [Xen-devel] memory leak in block/xen_disk in qemu-3.x
2018-12-11 16:07 ` Olaf Hering
@ 2018-12-11 16:15 ` Paul Durrant
0 siblings, 0 replies; 4+ messages in thread
From: Paul Durrant @ 2018-12-11 16:15 UTC (permalink / raw)
To: 'Olaf Hering'
Cc: xen-devel@lists.xenproject.org, qemu-devel@nongnu.org
> -----Original Message-----
> From: Olaf Hering [mailto:olaf@aepfle.de]
> Sent: 11 December 2018 16:08
> To: Paul Durrant <Paul.Durrant@citrix.com>
> Cc: xen-devel@lists.xenproject.org; qemu-devel@nongnu.org
> Subject: Re: [Xen-devel] memory leak in block/xen_disk in qemu-3.x
>
> On Tue, Dec 11, Paul Durrant wrote:
>
> > > -----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
>
> This looks like a fix, rather than an improvement.
> More than a month passed already, why is it not yet in qemu.git#master?
>
It was nacked on the basis that xen_disk is legacy. I have re-based it on my series re-working xen_disk and, as soon as that is all acked, I will post the re-based patch.
Paul
> Olaf
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-12-11 16:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-11 15:30 [Qemu-devel] memory leak in block/xen_disk in qemu-3.x Olaf Hering
2018-12-11 16:01 ` [Qemu-devel] [Xen-devel] " Paul Durrant
2018-12-11 16:07 ` Olaf Hering
2018-12-11 16:15 ` Paul Durrant
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).