Bug 903540

Summary: File descriptor leak when using bash-completion
Product: [Fedora] Fedora Reporter: Giovanni Campagna <scampa.giovanni>
Component: bash-completionAssignee: Ville Skyttä <ville.skytta>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: admiller, ooprala, rrakus, sheltren, ville.skytta
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-02-01 17:48:13 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 Giovanni Campagna 2013-01-24 09:24:58 UTC
Description of problem:
Bash consistently leaks 2 file descriptors opened to /usr/share/bash-completion/completions when applying command completions.
The problem arises also when the directory is completely empty, so it's not related to scripts installed there.

Version-Release number of selected component (if applicable):
bash-4.2.42-1.fc18.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Press tab twice at the prompt. No command is needed.
2. Watch ls -l /proc/$$/fd become longer
3. Wait for Too many open files error

Expected results:
No additional file descriptors are kept open after completing the command.

Comment 1 Roman Rakus 2013-01-24 19:51:55 UTC
So it belongs to bash-completion package.

Comment 2 Ville Skyttä 2013-01-24 22:09:31 UTC
That seems to come from us trying to source the /usr/share/bash-completion/completions dir itself in some scenarios, and bash leaking a fd on each such try.

See bug 903833 for the bash one, candidate workaround applied in bash-completion upstream:

http://anonscm.debian.org/gitweb/?p=bash-completion/bash-completion.git;a=commitdiff;h=fea1c17

Comment 4 Ville Skyttä 2013-02-01 17:48:13 UTC
Bug 903833 fixes the root cause so there's no need to wait for the bash-completion workaround.

*** This bug has been marked as a duplicate of bug 903833 ***