[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [Bug 1288620] Re: memory leak with default NIC model
From: |
Stefan Weil |
Subject: |
[Qemu-devel] [Bug 1288620] Re: memory leak with default NIC model |
Date: |
Thu, 06 Mar 2014 16:06:00 -0000 |
Please try to reproduce this with a debug built (configure --enable-
debug) from latest QEMU. If it shows the same memory leak, you can try
to find the cause of this leak with valgrind:
valgrind --leak-check=full qemu-system-x86_64 -drive
file=windows_base_HDD.img,index=0,media=disk -enable-kvm -m 512M -vga
std -net nic,vlan=0 -net user,vlan=0 2>&1 | tee valgrind.log
As soon as you terminate the running qemu process, valgrind will write a
protocol of all allocated memory. Leaks can usually be found quite easily in
this protocol: after a long run, the leak will dominate any other memory
allocation. If your executable still contains the full debug information, you
will also see the exact line of source code which allocates repeatedly memory.
Please note that valgrind slows down your process by a factor of 10 to 20, so
it takes some time to run Windows.
If valgrind does not work (which sometimes happens), you can attach a
debugger (gdb) to the running qemu process and try to detect the buggy
memory allocation by setting breakpoints on the memory allocator
functions (malloc or g_malloc, g_malloc0, g_new, g_new0).
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1288620
Title:
memory leak with default NIC model
Status in QEMU:
New
Bug description:
I have a Windows 7 SP1 Professional 64-bit installation on a QCOW2
image with compat=1.1, which I launch via
qemu-system-x86_64 -drive file=windows_base_HDD.img,index=0,media=disk
-enable-kvm -m 512M -vga std -net nic,vlan=0 -net user,vlan=0
As soon as I start using the network in any application — for example,
visiting www.google.com in Internet Explorer — QEMU starts gobbling
memory until the (host) kernel kills it because of an OOM condition.
If I run the QEMU with the same options, but with model=e1000 option
set for the NIC (i.e. -net -nic,vlan=0,model=e1000), I can use the
network from the guest OS without any noticeable effect on QEMU's
memory consumption.
I do not have this problem when running QEMU with the exact same options (as
above, without model=e1000) but with a Debian wheezy installation (on a QCOW
image of the same format). My host system in Ubuntu 13.10 x86_64, kernel image
3.11.0-17-generic, but with the QEMU packages from trusty (the codename for the
next release):
Output of `dpkg -l \*qemu\* | grep '^ii'`:
ii ipxe-qemu 1.0.0+git-20130710.936134e-0ubuntu1
all Virtual package to support use of kvm-ipxe with qemu
ii qemu-keymaps 1.7.0+dfsg-3ubuntu2
all QEMU keyboard maps
ii qemu-system-common 1.7.0+dfsg-3ubuntu2
amd64 QEMU full system emulation binaries (common files)
ii qemu-system-x86 1.7.0+dfsg-3ubuntu2
amd64 QEMU full system emulation binaries (x86)
ii qemu-utils 1.7.0+dfsg-3ubuntu2
amd64 QEMU utilities
(If necessary, I can try to reproduce this with QEMU built from the
upstream source or the latest source from version control.)
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1288620/+subscriptions
- [Qemu-devel] [PATCH v5 00/37] AArch64 system emulation, Peter Maydell, 2014/03/28
- [Qemu-devel] [PATCH v5 22/37] hw/arm/virt: Add support for Cortex-A57, Peter Maydell, 2014/03/28
- [Qemu-devel] [PATCH v5 34/37] target-arm: Implement CBAR for Cortex-A57, Peter Maydell, 2014/03/28
- [Qemu-devel] [PATCH v5 16/37] target-arm: Implement SP_EL0, SP_EL1, Peter Maydell, 2014/03/28
- [Qemu-devel] [PATCH v5 10/37] target-arm: Add v8 mmu translation support, Peter Maydell, 2014/03/28
- [Qemu-devel] [PATCH v5 32/37] target-arm: Implement RVBAR register, Peter Maydell, 2014/03/28
- [Qemu-devel] [PATCH v5 25/37] target-arm: Implement AArch64 view of ACTLR, Peter Maydell, 2014/03/28
- [Qemu-devel] [PATCH v5 24/37] target-arm: Implement AArch64 view of CONTEXTIDR, Peter Maydell, 2014/03/28
- [Qemu-devel] [PATCH v5 01/37] target-arm: Split out private-to-target functions into internals.h, Peter Maydell, 2014/03/28
- [Qemu-devel] [PATCH v5 15/37] target-arm: Add AArch64 ELR_EL1 register., Peter Maydell, 2014/03/28
- [Qemu-devel] [PATCH v5 35/37] target-arm: Make Cortex-A15 CBAR read-only, Peter Maydell, 2014/03/28