Bug 55552

Summary: cannot rename directories over NFS (file busy)
Product: [Retired] Red Hat Linux Reporter: Need Real Name <vkire>
Component: tcltkAssignee: Jens Petersen <petersen>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 7.1   
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: 2004-02-26 08:11:58 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:

Description Need Real Name 2001-11-01 21:15:59 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.77C-SGI [en] (X11; U; IRIX64 6.5 IP30)

Description of problem:
While I was building an alternate version of tcl/tk on my Red Hat 7.1
system, I noticed that some of the regression tests were failing.
I believe all of them were failing because of the same reason, which
is, they couldn't rename a directory over NFS. Here is a snippet
of code directly from one of the tests that demontrates the problem:

    catch {file delete -force -- tfa tfad}
    file mkdir tfa tfad/tfa
    file rename -force tfa tfad
    set result [expr ![file isdir tfa]]
    file delete -force tfad
    set result

I ran this even with the tcl/tk installed by default with Red Hat 7.1,
and I saw the same exact problem.

To summarize, go into a directory that's NFS mounted and run the
above script and you will see the following errors:

error renaming "tfa" to "tfad/tfa": file busy
    while executing
"file rename -force tfa tfad"
    (file "testtcl.tcl" line 3)

Note that this does not happen under Red Hat 6.2. tcl executes
the above script fine there. Also, the same version of tcl runs
fine under IRIX in a similar scenario.

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


How reproducible:
Always

Steps to Reproduce:
To summarize, go into a directory that's NFS mounted and run the
above script and you will see the following errors:

error renaming "tfa" to "tfad/tfa": file busy
    while executing
"file rename -force tfa tfad"
    (file "testtcl.tcl" line 3)



Actual Results:  error renaming "tfa" to "tfad/tfa": file busy
    while executing
"file rename -force tfa tfad"
    (file "testtcl.tcl" line 3)



Expected Results:  It should've renamed the directory with no error
messages.

Additional info:

Note that this does not happen under Red Hat 6.2. tcl executes
the above script fine there. Also, the same version of tcl runs
fine under IRIX in a similar scenario.

Comment 1 Jens Petersen 2002-08-14 10:24:57 UTC
Reproduced with the current tclsh in rawhide.

Comment 2 Jens Petersen 2004-02-26 08:11:58 UTC
This fixed in expect-5.38.0 and later at least afaict.