Bug 617844 - grabber.py leaks file objects in function _do_grab()
Summary: grabber.py leaks file objects in function _do_grab()
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: python-urlgrabber
Version: 13
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: James Antill
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 509427
TreeView+ depends on / blocked
 
Reported: 2010-07-24 10:43 UTC by Jasper O'neal Hartline
Modified: 2014-01-21 23:16 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-07-26 17:57:19 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Cleans up leaked fds in grabber.py when some bad thing happens and exceptions aren't dealt with in all cases, stale fds are left (461 bytes, patch)
2010-07-24 10:47 UTC, Jasper O'neal Hartline
no flags Details | Diff

Description Jasper O'neal Hartline 2010-07-24 10:43:47 UTC
Description of problem:
grabber.py leaks file objects in function _do_grab()


Version-Release number of selected component (if applicable):
python-urlgrabber-3.9.1-7.fc13.noarch

How reproducible:
Easily reproducible with livecd-creator from livecd-tools as a mechanism to produce the behavior. 100% reproducible.


Steps to Reproduce:
0. make repo in livecd.ks unreachable or invalid
1. livecd-creator -c livecd.ks
2. Fails with unable to find repository but also faceplants when unmounting
3.
  
Actual results:
livecd-creator faceplants when trying to cleanup()
in which time it should unmount some filesystems which are bind mounted and
cannot since the process still holds file descriptors open to files which once existed in the directories.

Expected results:
Should unmount cleanly. 
Will attach a patch which cleans up this leaked fd.

Additional info:

Comment 1 Jasper O'neal Hartline 2010-07-24 10:47:14 UTC
Created attachment 434129 [details]
Cleans up leaked fds in grabber.py when some bad thing happens and exceptions aren't dealt with in all cases, stale fds are left

Comments above.

Comment 2 seth vidal 2010-07-26 17:57:19 UTC
patch added and credited - thanks for the fix- it'll go out in the next release


Note You need to log in before you can comment on or make changes to this bug.