Menu

#2 debExtractArchive leaks file handles.

open
nobody
None
5
2007-07-30
2007-07-30
Anonymous
No

With python-2.5.1 running on an ubuntu feisty box:
root@mirror:/tmp/apt# python
Python 2.5.1 (r251:54863, May 2 2007, 16:27:44)
[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import apt_inst
>>> apt_inst.debExtractArchive(open("/tmp/apt/uqm_0.5.0-2ubuntu1_amd64.deb"),"/tmp/cdr")
1

So far so good, but if I look at the processes filehandles:
root@mirror:~# ls -al /proc/19026/fd
total 4
dr-x------ 2 root root 0 2007-07-30 15:05 .
dr-xr-xr-x 5 root root 0 2007-07-30 15:05 ..
lrwx------ 1 root root 64 2007-07-30 15:06 0 -> /dev/pts/5
lrwx------ 1 root root 64 2007-07-30 15:06 1 -> /dev/pts/5
lrwx------ 1 root root 64 2007-07-30 15:05 2 -> /dev/pts/5
l-wx------ 1 root root 64 2007-07-30 15:06 5 -> /tmp/cdr/usr/share/games/uqm/content/CVS/Entries.Static

So if I process a ton of .deb's using python-apt I leak file descriptors until the process dies. The strange part is that it's only some packages leak a file handles.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.