Bug 345181

Summary: More than 2 digit Filedescriptors can not be closed
Product: Red Hat Enterprise Linux 5 Reporter: Roland Friedwagner <roland.friedwagner>
Component: bashAssignee: Tomas Janousek <tjanouse>
Status: CLOSED DUPLICATE QA Contact: Chris Ward <cward>
Severity: high Docs Contact:
Priority: low    
Version: 5.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-10-29 16:35:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
bash script testing for the 2digit FD bug none

Description Roland Friedwagner 2007-10-22 13:29:55 UTC
Description of problem:

Filedescriptors with more than 2 digits can not be closed.

Version-Release number of selected component (if applicable):

GNU bash, version 3.1.17(1)-release (i686-redhat-linux-gnu)

How reproducible:

[root@xxx tmp]# exec 11>foobar
[root@xxx tmp]# lsof -p $$ -a -d 11
COMMAND  PID USER   FD   TYPE DEVICE SIZE   NODE NAME
bash    3493 root   11w   REG  253,1    0 573448 /tmp/foobar
[root@xxx tmp]# exec 11>&-
# => FD 11 should be closed now !
[root@xxx tmp]# lsof -p $$ -a -d 11
COMMAND  PID USER   FD   TYPE DEVICE SIZE   NODE NAME
bash    3493 root   11w   REG  253,1    0 573448 /tmp/foobar

Works fine with RHEL4 and RHEL3(not shown):

[root@rhel4 tmp]# bash --version
GNU bash, version 3.00.15(1)-release (i386-redhat-linux-gnu)
Copyright (C) 2004 Free Software Foundation, Inc.
[root@rhel4 tmp]# exec 11>foobar
[root@rhel4 tmp]# lsof -p $$ -a -d 11
COMMAND  PID USER   FD   TYPE DEVICE SIZE    NODE NAME
bash    3929 root   11w   REG  253,1    0 1196040 /tmp/foobar
[root@rhel4 tmp]# exec 11>&-
[root@rhel4 tmp]# lsof -p $$ -a -d 11
[root@rhel4 tmp]#


Additional info:

 - I've attached an script testing for the bug (bash2digitfdbug.sh).
 - Bug does not show up on Ubuntu 7.04 provided bash:
   GNU bash, version 3.2.13(1)-release (i486-pc-linux-gnu)

Kind Regards, Roland

Comment 1 Roland Friedwagner 2007-10-22 13:29:55 UTC
Created attachment 234061 [details]
bash script testing for the 2digit FD bug

Comment 2 Roland Friedwagner 2007-10-22 13:45:00 UTC
Bug only shows up wenn working as root user :-O

Comment 3 Roland Friedwagner 2007-10-22 14:27:06 UTC
(In reply to comment #2)
> Bug only shows up wenn working as root user :-O
Bug is independent of user id!
(But my test script not;-)

Comment 5 RHEL Program Management 2007-10-23 14:54:50 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 6 Tomas Janousek 2007-10-29 16:35:43 UTC

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