Bug 903833 - File descriptor leak when trying to source a dir
Summary: File descriptor leak when trying to source a dir
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: bash
Version: 17
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Roman Rakus
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 903540 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-24 22:02 UTC by Ville Skyttä
Modified: 2014-01-13 00:14 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-03-17 00:56:24 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


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