Igor Serebryany
2011-Jul-26 06:25 UTC
[libvirt-users] python-libvirt for 0.9.3 leaking file descriptors
i've reported this issue before, so i guess this is a regression. looks like the python bindings for 0.9.3 are leaking file descriptors: root at cloud1:~# python Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48) [GCC 4.4.5] on linux2 Type "help", "copyright", "credits" or "license" for more information.>>> import libvirt >>> libvirt.getVersion()9003>>> def openclose():... c = libvirt.open('qemu:///system') ... c.close() ...>>> import os >>> os.system('lsof -p %d | wc -l' % os.getpid())37>>> openclose() >>> os.system('lsof -p %d | wc -l' % os.getpid())40>>> openclose() >>> os.system('lsof -p %d | wc -l' % os.getpid())43 every time I open and close a connection to libvirt, i loose 3 file descriptors. these are a socket and two fifo pipes. i'm using the -3 build on debian sid. can someone test this on a fedora machine? curious if this is something inside libvirt or a problem with the build... thanks, --igor -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20110726/f3f5b45e/attachment.sig>
Osier Yang
2011-Jul-26 09:55 UTC
[libvirt-users] python-libvirt for 0.9.3 leaking file descriptors
? 2011?07?26? 14:25, Igor Serebryany ??:> i've reported this issue before, so i guess this is a regression. looks > like the python bindings for 0.9.3 are leaking file descriptors: > > root at cloud1:~# python > Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48) > [GCC 4.4.5] on linux2 > Type "help", "copyright", "credits" or "license" for more information. >>>> import libvirt >>>> libvirt.getVersion() > 9003 >>>> def openclose(): > ... c = libvirt.open('qemu:///system') > ... c.close() > ... >>>> import os >>>> os.system('lsof -p %d | wc -l' % os.getpid()) > 37 >>>> openclose() >>>> os.system('lsof -p %d | wc -l' % os.getpid()) > 40 >>>> openclose() >>>> os.system('lsof -p %d | wc -l' % os.getpid()) > 43 > > every time I open and close a connection to libvirt, i loose 3 file > descriptors. these are a socket and two fifo pipes. i'm using the -3 > build on debian sid. > > can someone test this on a fedora machine? curious if this is something > inside libvirt or a problem with the build... > > thanks, > --igorHello Igor, I don't see this problem on my FC15, I'm using the git HEAD. Osier> > > _______________________________________________ > libvirt-users mailing list > libvirt-users at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-users-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20110726/a99e4e08/attachment.htm>
Matthias Bolte
2011-Jul-26 16:29 UTC
[libvirt-users] python-libvirt for 0.9.3 leaking file descriptors
2011/7/26 Igor Serebryany <igor47 at moomers.org>:> i've reported this issue before, so i guess this is a regression. looks > like the python bindings for 0.9.3 are leaking file descriptors: > > root at cloud1:~# python > Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48) > [GCC 4.4.5] on linux2 > Type "help", "copyright", "credits" or "license" for more information. >>>> import libvirt >>>> libvirt.getVersion() > 9003 >>>> def openclose(): > ... ? ? c = libvirt.open('qemu:///system') > ... ? ? c.close() > ... >>>> import os >>>> os.system('lsof -p %d | wc -l' % os.getpid()) > 37 >>>> openclose() >>>> os.system('lsof -p %d | wc -l' % os.getpid()) > 40 >>>> openclose() >>>> os.system('lsof -p %d | wc -l' % os.getpid()) > 43 > > every time I open and close a connection to libvirt, i loose 3 file > descriptors. these are a socket and two fifo pipes. i'm using the -3 > build on debian sid. > > can someone test this on a fedora machine? curious if this is something > inside libvirt or a problem with the build...I can reproduce this with libvirt 0.9.3, but not with current git. Therefore, this problem seems to be fixed in git. I've you want to backport the fix to libvirt 0.9.3 you should be able to find it using git bisect. That one of the FDs is a socket suggests that this is related to the remote driver. -- Matthias Bolte http://photron.blogspot.com