Bug 136418 (IT_52172) - [RHEL3][PATCH]csh bug
Summary: [RHEL3][PATCH]csh bug
Keywords:
Status: CLOSED DUPLICATE of bug 122558
Alias: IT_52172
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: tcsh
Version: 3.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miloslav Trmač
QA Contact: Bill Huang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-10-19 21:11 UTC by Martin Hunt
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-02-21 19:06:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
fcntl patch for tcsh 6.12 (722 bytes, patch)
2004-10-19 21:16 UTC, Martin Hunt
no flags Details | Diff

Description Martin Hunt 2004-10-19 21:11:16 UTC
Customer runs script as below, which become error.
Although customer uses AMD64 Opteron, when I tested with my
machine(x86), there is no problem at all.

----------
Action by: stakagi
Issue Registered
----------
Action by: stakagi
(note: Script was saved as "test")

#!/bin/csh -f
echo "#!/bin/csh -f" > test__
echo  -n "\\" >> test__
echo "ls -l" >> test__
echo "" >> test__
chmod a+x test__
./test__

After the script was run, errors are showed as below:
# ./test
./test__: Text file busy.
# csh ./test
./test__: Text file busy.
# tcsh ./test
./test__: Text file busy.

There is no facility for testing AMD64 in Brisbane office so that this
case need to be escalated to L3/SEG group.
As I said, I couldn''t reproduce this issue with x86
RHEL3AS/kernel-2.4.21-20.EL/tcsh-6.12-4, which is same as customer's
environment.


Category set to: Applications::Functions
Status set to: Pending Escalation

----------
Action by: nhorman
I've recreated this.  It kinda looks to me like deny_write_access is
returning ETXTBSY when the shells call to execve is made, indicating
that i_writecount is greater than zero (implying a file writer still
has the file open).  This however would appear contradicted by the
strace of the shell script which seems to indicate that the opens and
closes of the file test__ are balanced.  Since we're dealing with a
shell however, theres lots of file descriptor duplication going on
(for output redirection) so perhaps there is a descrepancy in the
x86_64 kernel that doesn't correctly decrement the writer count if a
descriptor has been duped?  Escalating and investigating.


Issue escalated to Sustaining Engineering by: nhorman.
nhorman assigned to issue for Support Engineering Group.

Category set to: Applications

Comment 1 Martin Hunt 2004-10-19 21:15:24 UTC
Fixed in tcsh 6.13 in Fedora.

I reproduced this in 6.12 and tested the backported patch from the
Fedora 6.13 RPM.  

Attaching patch.

Comment 2 Martin Hunt 2004-10-19 21:16:36 UTC
Created attachment 105467 [details]
fcntl patch for tcsh 6.12

Comment 4 Miloslav Trmač 2004-10-19 21:29:12 UTC

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

Comment 6 Red Hat Bugzilla 2006-02-21 19:06:29 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.


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