This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 136418 - (IT_52172) [RHEL3][PATCH]csh bug
[RHEL3][PATCH]csh bug
Status: CLOSED DUPLICATE of bug 122558
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: tcsh (Show other bugs)
3.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Miloslav Trmač
Bill Huang
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-10-19 17:11 EDT by Martin Hunt
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-21 14:06:29 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


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

  None (edit)
Description Martin Hunt 2004-10-19 17:11:16 EDT
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 17:15:24 EDT
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 17:16:36 EDT
Created attachment 105467 [details]
fcntl patch for tcsh 6.12
Comment 4 Miloslav Trmač 2004-10-19 17:29:12 EDT

*** This bug has been marked as a duplicate of 122558 ***
Comment 6 Red Hat Bugzilla 2006-02-21 14:06:29 EST
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.