Bug 617844 - grabber.py leaks file objects in function _do_grab()
grabber.py leaks file objects in function _do_grab()
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: python-urlgrabber (Show other bugs)
13
All Linux
low Severity medium
: ---
: ---
Assigned To: James Antill
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 509427
  Show dependency treegraph
 
Reported: 2010-07-24 06:43 EDT by Jasper O'neal Hartline
Modified: 2014-01-21 18:16 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-07-26 13:57:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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 06:47 EDT, Jasper O'neal Hartline
no flags Details | Diff

  None (edit)
Description Jasper O'neal Hartline 2010-07-24 06:43:47 EDT
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 06:47:14 EDT
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 13:57:19 EDT
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.