[ python-Bugs-1344508 ] UNIX mmap leaks file descriptors
SourceForge.net
noreply at sourceforge.net
Tue Nov 1 04:46:21 CET 2005
Bugs item #1344508, was opened at 2005-11-01 03:46
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1344508&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Erwin S. Andreasen (drylock)
Assigned to: Nobody/Anonymous (nobody)
Summary: UNIX mmap leaks file descriptors
Initial Comment:
The commit from 2.49 to 2.50 in Modules/mmapmodule.c
has made mmap under UNIX leak a file descriptor:
- m_obj->fd = fd;
+ m_obj->fd = dup(fd);
The FD given is dup'ed in order to allow ftruncation
later, but no close of it is done in dealloc/close.
A test case attached, using lsof after some
mmaps/unmaps to show leak.
Version:
Python 2.4.2 (#2, Sep 29 2005, 00:23:59)
[GCC 4.0.2 (Debian 4.0.1-9)] on linux2
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1344508&group_id=5470
More information about the Python-bugs-list
mailing list