Fixing file descriptor leaks
Author(s)
Dumitran, Octavian-Daniel
DownloadFull printable version (3.441Mb)
Alternative title
Fixing FD leaks
Other Contributors
Massachusetts Institute of Technology. Dept. of Electrical Engineering and Computer Science.
Advisor
Dorothy Curtis.
Terms of use
Metadata
Show full item recordAbstract
We design, implement and test a tool for eliminating file descriptor (FD) leaks in programs at run-time. Our tool monitors FD allocation and use. When the allocation of a new FD would fail because a process's entire pool of FDs is already in use, our tool "recycles" (forcibly closes) an FD. The FD to be recycled is chosen according to three simple rules: 1) do not recycle FDs used within the last second, 2) do not recycle "persistent" FDs (FDs allocated at sites that allocate few FDs) and 3) recycle the FD that was least recently used. We tested our tool with nine applications (HTTP/FTP servers, proxies and clients) that make extensive use of FDs. We first simulated massive leaks by disabling all calls to close. Without recycling (and in the presence of leaks), all applications malfunctioned. With FD recycling, applications continued to execute normally despite massive FD leakage. Throughout our tests, our tool has never attempted to close an FD that was still in use.
Description
Thesis (M. Eng.)--Massachusetts Institute of Technology, Dept. of Electrical Engineering and Computer Science, 2007. Includes bibliographical references (p. 89).
Date issued
2007Department
Massachusetts Institute of Technology. Department of Electrical Engineering and Computer SciencePublisher
Massachusetts Institute of Technology
Keywords
Electrical Engineering and Computer Science.