Current-Users archive

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

Re: rump_sys_rename & tmpfs ... memory leak ?



On Tue, Apr 28, 2009 at 05:03:52PM +0300, Antti Kantee wrote:
> On Tue Apr 28 2009 at 13:56:03 +0200, Nicolas Joly wrote:
> > 
> > While learning how to use rump, i encountered a possible memory leak
> > with rump_sys_rename(), when run on a tmpfs mount.
> > 
> > The attached sample, seems to leaks some memory (about 4MB/sec on my
> > amd64) ... And the problem goes away if i remove/comment the
> > rump_sys_rename() call. I tried some other fs, but failed to reproduce
> > the problem.
> 
> Right, I ran into this while debugging the tmpfs rename race you reported,
> but was busy back then and managed to forget all about it later.
> Thanks for reminding me.  I fixed it in rev 1.55 of rumpkern/vm.c.

Problem gone. Thanks for your prompt reply and fix.

> ==22185== 880 bytes in 220 blocks are definitely lost in loss record 5 of 7
> ==22185==    at 0x61285EA: calloc (vg_replace_malloc.c:279)
> ==22185==    by 0x66FEF55: rumpuser_mutex_init (in /usr/lib/librumpuser.so.0)
> ==22185==    by 0x6454040: rumpns_mutex_init (locks.c:90)
> ==22185==    by 0x645346E: rumpns_uao_create (vm.c:231)
> ==22185==    by 0x6167C5E: rumpns_tmpfs_alloc_node (tmpfs_subr.c:173)
> ==22185==    by 0x61685FE: rumpns_tmpfs_alloc_file (tmpfs_subr.c:475)
> ==22185==    by 0x616473C: rumpns_tmpfs_create (tmpfs_vnops.c:266)
> ==22185==    by 0x642E4DB: rumpns_VOP_CREATE (vnode_if.c:178)
> ==22185==    by 0x6205C6E: rumpns_vn_open (vfs_vnops.c:178)
> ==22185==    by 0x62098C5: rumpns_sys_open (vfs_syscalls.c:1327)
> 
> mmm, valgrind

On NetBSD ?

-- 
Nicolas Joly

Biological Software and Databanks.
Institut Pasteur, Paris.


Home | Main Index | Thread Index | Old Index