qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [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

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).