Bug 903833

Summary: File descriptor leak when trying to source a dir
Product: [Fedora] Fedora Reporter: Ville Skyttä <ville.skytta>
Component: bashAssignee: Roman Rakus <rrakus>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: admiller, ooprala, rrakus, scampa.giovanni, tsmetana
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-17 00:56:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ville Skyttä 2013-01-24 22:02:15 UTC
$ ls /proc/$$/fd | wc -l
4

$ . /
bash: .: /: is a directory
$ ls /proc/$$/fd | wc -l
5

$ . /
bash: .: /: is a directory
$ ls /proc/$$/fd | wc -l
6

While trying to source a dir doesn't make much sense, I think bash shouldn't leak a fd on each try.

Comment 1 Roman Rakus 2013-01-24 22:25:07 UTC
Thanks for the report

Comment 2 Roman Rakus 2013-01-24 22:41:36 UTC
There are several missing fclose() calls in _evalfile() in evalfile.c

Comment 3 Fedora Update System 2013-01-31 14:53:15 UTC
bash-4.2.39-3.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/bash-4.2.39-3.fc17

Comment 4 Fedora Update System 2013-01-31 15:22:06 UTC
bash-4.2.42-2.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/bash-4.2.42-2.fc18

Comment 5 Fedora Update System 2013-02-01 17:07:03 UTC
Package bash-4.2.42-2.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing bash-4.2.42-2.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-1773/bash-4.2.42-2.fc18
then log in and leave karma (feedback).

Comment 6 Ville Skyttä 2013-02-01 17:48:13 UTC
*** Bug 903540 has been marked as a duplicate of this bug. ***

Comment 7 Fedora Update System 2013-03-11 20:23:41 UTC
bash-4.2.45-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/bash-4.2.45-1.fc18

Comment 8 Fedora Update System 2013-03-16 01:44:57 UTC
bash-4.2.45-1.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2013-03-17 00:56:26 UTC
bash-4.2.39-3.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.