Bug 101070

Summary: bash shows old directory entries
Product: [Retired] Red Hat Linux Reporter: Olen <olen.e.boydstun>
Component: kernelAssignee: Arjan van de Ven <arjanv>
Status: CLOSED WONTFIX QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-09-30 15:41:22 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 Olen 2003-07-28 21:43:15 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461)

Description of problem:
When a firs bash is in a directory, say ~/bin of your files, it becomes 
confused, if in another (second) shell ~/bin is moved to ~/bin2, and a cp -r 
~/bin2 ~/bin is issued.

$ mv ~/bin ~/bin2
$ cp -r ~/bin2 ~/bin


ls -i in the first shell will show the old inode numbers, as a side note 
executing a program from bin will not see the new versions of the files either, 
it will run the old executables.

ls -i in the second shell will show the right inode numbers.

So it seems the first bash is using files that aren't even in the file system 
anymore.  This was done on an ext3 journaled file system, in case that is where 
the problem acutally is.



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


How reproducible:
Always

Steps to Reproduce:
1. cd ~/bin in one bash. Assume ~/bin has some files in it.
2. in another bash 
   a. mv ~/bin ~/bin2
   b. cp -r ~/bin2 ~/bin
   c. ls -i ~/bin
3.In original bash ls -i ~/bin
4. Note the different inode numbers.
    

Actual Results:  Old executables were being executed, after a cvs checkout, and 
recompile occured in another shell.  

Expected Results:  I think bash would access the files that are still in the 
filesystem.

Additional info:

Comment 1 Tim Waugh 2003-07-29 12:58:29 UTC
Bash doesn't cache this sort of stuff.

Comment 2 Bugzilla owner 2004-09-30 15:41:22 UTC
Thanks for the bug report. However, Red Hat no longer maintains this version of
the product. Please upgrade to the latest version and open a new bug if the problem
persists.

The Fedora Legacy project (http://fedoralegacy.org/) maintains some older releases, 
and if you believe this bug is interesting to them, please report the problem in
the bug tracker at: http://bugzilla.fedora.us/