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
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.
Created attachment 105467 [details] fcntl patch for tcsh 6.12
*** This bug has been marked as a duplicate of 122558 ***
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.