[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] qemu-system-i386: memory leak?



On 26/12/12 11:46, Maik Wessler wrote:
> Hi all,
> 
> I am using xen-4.2-testing.hg on debian 6.0.6 (x86_64) with Kernel
> 3.4.15 (tmem enabled). Problem is that the /usr/lib/xen/bin/qemu-system-i386
> use more and more memory. After one week uptime (depends on memory) the
> machine starts to swap...
> 
> Details:
> 
> root@dmw01:~# cat /etc/grub.d/09_linux_xen |grep mem
> multiboot${rel_xen_dirname}/${xen_basename} placeholder ${xen_args}
> dom0_mem=1592M,max:1592M
> 
> 
> root@dmw01:~# free
>              total       used       free     shared    buffers     cached
> Mem:       1523280    1408896     114384          0       9824      17496
> -/+ buffers/cache:    1381576     141704
> Swap:       505916     134592     371324
> 
> 
> ps -e -orss=,args= | sort -b -k1,1n
> 
> Start:
> 28872 /usr/lib/xen/bin/qemu-system-i386 -xen-domid 12 -chardev
> socket,id=libxl-cmd,path=/var/run/xen/qmp-libxl-12,server,nowait -mon
> chardev=libxl-cmd,mode=control -xen-attach -name mgtmw01 -nographic -M
> xenpv -m 385
> 
> End:
> 243472 /usr/lib/xen/bin/qemu-system-i386 -xen-domid 12 -chardev
> socket,id=libxl-cmd,path=/var/run/xen/qmp-libxl-12,server,nowait -mon
> chardev=libxl-cmd,mode=control -xen-attach -name mgtmw01 -nographic -M
> xenpv -m 385
> 
> 
> 
> root@dmw01:~# ps aux|grep qemu|grep mgtmw01
> root      3903  0.0 15.9 423876 243464 ?       Ssl  Dec18   9:39
> /usr/lib/xen/bin/qemu-system-i386 -xen-domid 12 -chardev
> socket,id=libxl-cmd,path=/var/run/xen/qmp-libxl-12,server,nowait -mon
> chardev=libxl-cmd,mode=control -xen-attach -name mgtmw01 -nographic -M
> xenpv -m 385
> 
> root@dmw01:~# pmap 3903
> 3903:   /usr/lib/xen/bin/qemu-system-i386 -xen-domid 12 -chardev
> socket,id=libxl-cmd,path=/var/run/xen/qmp-libxl-12,server,nowait -mon
> chardev=libxl-cmd,mode=control -xen-attach -name mgtmw01 -nographic -M
> xenpv -m 385
> 00007fe942b7e000   4112K rw---    [ anon ]
> 00007fe942f83000   1028K rw---    [ anon ]
> 00007fe943085000   1028K rw---    [ anon ]
> 00007fe943187000   1028K rw---    [ anon ]
> 00007fe943289000   2056K rw---    [ anon ]
> 00007fe943495000   1028K rw---    [ anon ]
> 00007fe9435a1000   1028K rw---    [ anon ]
> 00007fe9436ad000   1028K rw---    [ anon ]
> 00007fe9437b8000   5140K rw---    [ anon ]
> 00007fe943cbd000      4K -----    [ anon ]
> 00007fe943cbe000   8192K rw---    [ anon ]
> 00007fe9444be000     20K r-x--  /usr/lib/libXdmcp.so.6.0.0
> 00007fe9444c3000   2044K -----  /usr/lib/libXdmcp.so.6.0.0
> 00007fe9446c2000      4K rw---  /usr/lib/libXdmcp.so.6.0.0
> 00007fe9446c3000      8K r-x--  /usr/lib/libXau.so.6.0.0
> 00007fe9446c5000   2048K -----  /usr/lib/libXau.so.6.0.0
> 00007fe9448c5000      4K rw---  /usr/lib/libXau.so.6.0.0
> 00007fe9448c6000    124K r-x--  /lib/libx86.so.1
> 00007fe9448e5000   2048K -----  /lib/libx86.so.1
> 00007fe944ae5000      8K rw---  /lib/libx86.so.1
> 00007fe944ae7000      4K rw---    [ anon ]
> 00007fe944ae8000    128K r-x--  /usr/lib/liblzo2.so.2.0.0
> 00007fe944b08000   2044K -----  /usr/lib/liblzo2.so.2.0.0
> 00007fe944d07000      4K rw---  /usr/lib/liblzo2.so.2.0.0
> 00007fe944d08000    132K r-x--  /usr/lib/liblzma.so.2.0.0
> 00007fe944d29000   2048K -----  /usr/lib/liblzma.so.2.0.0
> 00007fe944f29000      4K rw---  /usr/lib/liblzma.so.2.0.0
> 00007fe944f2a000     60K r-x--  /lib/libbz2.so.1.0.4
> 00007fe944f39000   2044K -----  /lib/libbz2.so.1.0.4
> 00007fe945138000      8K rw---  /lib/libbz2.so.1.0.4
> 00007fe94513a000    112K r-x--  /usr/lib/libxcb.so.1.1.0
> 00007fe945156000   2044K -----  /usr/lib/libxcb.so.1.1.0
> 00007fe945355000      4K rw---  /usr/lib/libxcb.so.1.1.0
> 00007fe945356000    308K r-x--  /usr/lib/libvga.so.1.4.3
> 00007fe9453a3000   2044K -----  /usr/lib/libvga.so.1.4.3
> 00007fe9455a2000     36K rw---  /usr/lib/libvga.so.1.4.3
> 00007fe9455ab000     36K rw---    [ anon ]
> 00007fe9455b4000     88K r-x--  /usr/lib/libdirect-1.2.so.9.0.1
> 00007fe9455ca000   2044K -----  /usr/lib/libdirect-1.2.so.9.0.1
> 00007fe9457c9000      8K rw---  /usr/lib/libdirect-1.2.so.9.0.1
> 00007fe9457cb000     36K r-x--  /usr/lib/libfusion-1.2.so.9.0.1
> 00007fe9457d4000   2048K -----  /usr/lib/libfusion-1.2.so.9.0.1
> 00007fe9459d4000      4K rw---  /usr/lib/libfusion-1.2.so.9.0.1
> 00007fe9459d5000    508K r-x--  /usr/lib/libdirectfb-1.2.so.9.0.1
> 00007fe945a54000   2044K -----  /usr/lib/libdirectfb-1.2.so.9.0.1
> 00007fe945c53000     16K rw---  /usr/lib/libdirectfb-1.2.so.9.0.1
> 00007fe945c57000    888K r-x--  /usr/lib/libasound.so.2.0.0
> 00007fe945d35000   2044K -----  /usr/lib/libasound.so.2.0.0
> 00007fe945f34000     32K rw---  /usr/lib/libasound.so.2.0.0
> 00007fe945f3c000      8K r-x--  /lib/libdl-2.11.3.so
> 00007fe945f3e000   2048K -----  /lib/libdl-2.11.3.so
> 00007fe94613e000      4K r----  /lib/libdl-2.11.3.so
> 00007fe94613f000      4K rw---  /lib/libdl-2.11.3.so
> 00007fe946140000    192K r-x--  /lib/libpcre.so.3.12.1
> 00007fe946170000   2044K -----  /lib/libpcre.so.3.12.1
> 00007fe94636f000      4K rw---  /lib/libpcre.so.3.12.1
> 00007fe946370000   1380K r-x--  /lib/libc-2.11.3.so
> 00007fe9464c9000   2044K -----  /lib/libc-2.11.3.so
> 00007fe9466c8000     16K r----  /lib/libc-2.11.3.so
> 00007fe9466cc000      4K rw---  /lib/libc-2.11.3.so
> 00007fe9466cd000     20K rw---    [ anon ]
> 00007fe9466d2000     92K r-x--  /lib/libpthread-2.11.3.so
> 00007fe9466e9000   2044K -----  /lib/libpthread-2.11.3.so
> 00007fe9468e8000      4K r----  /lib/libpthread-2.11.3.so
> 00007fe9468e9000      4K rw---  /lib/libpthread-2.11.3.so
> 00007fe9468ea000     16K rw---    [ anon ]
> 00007fe9468ee000     92K r-x--  /usr/lib/libz.so.1.2.3.4
> 00007fe946905000   2044K -----  /usr/lib/libz.so.1.2.3.4
> 00007fe946b04000      4K rw---  /usr/lib/libz.so.1.2.3.4
> 00007fe946b05000    512K r-x--  /lib/libm-2.11.3.so
> 00007fe946b85000   2048K -----  /lib/libm-2.11.3.so
> 00007fe946d85000      4K r----  /lib/libm-2.11.3.so
> 00007fe946d86000      4K rw---  /lib/libm-2.11.3.so
> 00007fe946d87000      4K r-x--  /lib/libaio.so.1.0.1
> 00007fe946d88000   2044K -----  /lib/libaio.so.1.0.1
> 00007fe946f87000      4K rw---  /lib/libaio.so.1.0.1
> 00007fe946f88000    160K r-x--  /usr/lib/libxenguest.so.4.2.0
> 00007fe946fb0000   2048K -----  /usr/lib/libxenguest.so.4.2.0
> 00007fe9471b0000      8K rw---  /usr/lib/libxenguest.so.4.2.0
> 00007fe9471b2000    136K r-x--  /usr/lib/libxenctrl.so.4.2.0
> 00007fe9471d4000   2048K -----  /usr/lib/libxenctrl.so.4.2.0
> 00007fe9473d4000      4K rw---  /usr/lib/libxenctrl.so.4.2.0
> 00007fe9473d5000     24K r-x--  /usr/lib/libxenstore.so.3.0.2
> 00007fe9473db000   2044K -----  /usr/lib/libxenstore.so.3.0.2
> 00007fe9475da000      4K rw---  /usr/lib/libxenstore.so.3.0.2
> 00007fe9475db000     12K rw---    [ anon ]
> 00007fe9475de000   1236K r-x--  /usr/lib/libX11.so.6.3.0
> 00007fe947713000   2048K -----  /usr/lib/libX11.so.6.3.0
> 00007fe947913000     24K rw---  /usr/lib/libX11.so.6.3.0
> 00007fe947919000    432K r-x--  /usr/lib/libSDL-1.2.so.0.11.3
> 00007fe947985000   2048K -----  /usr/lib/libSDL-1.2.so.0.11.3
> 00007fe947b85000      8K rw---  /usr/lib/libSDL-1.2.so.0.11.3
> 00007fe947b87000    304K rw---    [ anon ]
> 00007fe947bd3000    140K r-x--  /usr/lib/libjpeg.so.62.0.0
> 00007fe947bf6000   2044K -----  /usr/lib/libjpeg.so.62.0.0
> 00007fe947df5000      4K rw---  /usr/lib/libjpeg.so.62.0.0
> 00007fe947df6000    148K r-x--  /lib/libpng12.so.0.44.0
> 00007fe947e1b000   2048K -----  /lib/libpng12.so.0.44.0
> 00007fe94801b000      4K rw---  /lib/libpng12.so.0.44.0
> 00007fe94801c000     16K r-x--  /lib/libuuid.so.1.3.0
> 00007fe948020000   2044K -----  /lib/libuuid.so.1.3.0
> 00007fe94821f000      4K rw---  /lib/libuuid.so.1.3.0
> 00007fe948220000    264K r-x--  /lib/libncurses.so.5.7
> 00007fe948262000   2044K -----  /lib/libncurses.so.5.7
> 00007fe948461000     20K rw---  /lib/libncurses.so.5.7
> 00007fe948466000      8K r-x--  /lib/libutil-2.11.3.so
> 00007fe948468000   2044K -----  /lib/libutil-2.11.3.so
> 00007fe948667000      4K r----  /lib/libutil-2.11.3.so
> 00007fe948668000      4K rw---  /lib/libutil-2.11.3.so
> 00007fe948669000    876K r-x--  /lib/libglib-2.0.so.0.2400.2
> 00007fe948744000   2044K -----  /lib/libglib-2.0.so.0.2400.2
> 00007fe948943000      8K rw---  /lib/libglib-2.0.so.0.2400.2
> 00007fe948945000      4K rw---    [ anon ]
> 00007fe948946000     16K r-x--  /usr/lib/libgthread-2.0.so.0.2400.2
> 00007fe94894a000   2044K -----  /usr/lib/libgthread-2.0.so.0.2400.2
> 00007fe948b49000      4K rw---  /usr/lib/libgthread-2.0.so.0.2400.2
> 00007fe948b4a000     28K r-x--  /lib/librt-2.11.3.so
> 00007fe948b51000   2044K -----  /lib/librt-2.11.3.so
> 00007fe948d50000      4K r----  /lib/librt-2.11.3.so
> 00007fe948d51000      4K rw---  /lib/librt-2.11.3.so
> 00007fe948d52000    120K r-x--  /lib/ld-2.11.3.so
> 00007fe948de5000   1536K rw---    [ anon ]
> 00007fe948f65000      4K rw-s-  /dev/xen/gntdev
> 00007fe948f66000      4K rw-s-  /dev/xen/gntdev
> 00007fe948f67000      8K rw---    [ anon ]
> 00007fe948f69000      4K -----    [ anon ]
> 00007fe948f6a000     20K rw---    [ anon ]
> 00007fe948f6f000      4K r----  /lib/ld-2.11.3.so
> 00007fe948f70000      4K rw---  /lib/ld-2.11.3.so
> 00007fe948f71000      4K rw---    [ anon ]
> 00007fe948f72000   3020K r-x--  /usr/lib/xen/bin/qemu-system-i386
> 00007fe949464000    816K r----  /usr/lib/xen/bin/qemu-system-i386
> 00007fe949530000    176K rw---  /usr/lib/xen/bin/qemu-system-i386
> 00007fe94955c000   8228K rw---    [ anon ]
> 00007fe94a5a7000 309936K rw---    [ anon ]
> 00007fff43e80000    132K rw---    [ stack ]
> 00007fff43fff000      4K r-x--    [ anon ]
> ffffffffff600000      4K r-x--    [ anon ]
>  total           424016K
> 
> 
> Can anyone help? 

I've just posted a bug fix for a memory leak in Qemu Xen PV disk
backend, you can take a look at the patch at:
http://lists.nongnu.org/archive/html/qemu-devel/2012-12/msg03677.html.

There's also a memory leak in the linux gntdev device which is used by
Qemu, you should also take a look at the following linux kernel patch
http://git.kernel.org/?p=linux/kernel/git/konrad/xen.git;a=commit;h=a67baeb77375199bbd842fa308cb565164dd1f19.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.