Bug 24424

Summary: linux-programms under BSD cannot display all files in the directory
Product: Base System Reporter: malte.sackmann <malte.sackmann>
Component: miscAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description malte.sackmann 2001-01-18 10:00:01 UTC
Its not possible to lookup all files in an directory if using
a linux binary under xwindows.

How-To-Repeat: Install a linux binary and open for example "/etc/*". 
You will not see all existent files in that directory.
You will see always the same randomly chosen 8 files.
Try it with acroread or scilab.
Comment 1 dwmalone 2001-01-18 11:15:59 UTC
On Thu, Jan 18, 2001 at 01:51:01AM -0800, malte.sackmann@physik.uni-bremen.de wrote:
> Install a linux binary and open for example "/etc/*". 
> You will not see all existent files in that directory.
> You will see always the same randomly chosen 8 files.

You are probably seeing the contents of /compat/linux/etc because
programs run under Linux compatability look for a version of the
file/directory under /compat/linux before they look starting at /.

	David.
Comment 2 maltes 2001-01-18 12:32:58 UTC
On Thu, 18 Jan 2001, David Malone wrote:

> On Thu, Jan 18, 2001 at 01:51:01AM -0800, malte.sackmann@physik.uni-bremen.de wrote:
> > Install a linux binary and open for example "/etc/*". 
> > You will not see all existent files in that directory.
> > You will see always the same randomly chosen 8 files.
> 
> You are probably seeing the contents of /compat/linux/etc because
> programs run under Linux compatability look for a version of the
> file/directory under /compat/linux before they look starting at /.
> 
> 	David.
> 


We have shortly  discovered that the content from the /etc diretory
comes of course from /compat/linux/etc. No question.
But the problem with other directory contents is still the same!!!!

For example a mounted cdrom /cdrom with strongly missing directories
(some appeared, most disappeared) and files or various user/system
directories. Tested for example with linux netscape (from FreeBSD-4.1.1
packages), acrobat4 . All programs show the same files/dirs or not.
We have done some debugging in the kernel source code (mainly
sys/i386/linux/linux_file.c) and have seen, that indeed the
getdents function only returns some of the entries of the specific
directory. But, from this already shrinked converted dir list (with
missing entries), additionaly some files/dirs lost "on the way" to the
user program and were never shown by the user program. 
Very strange and serious problem.

Bye,

Malte & Stefan
Comment 3 krentel 2001-01-18 18:14:01 UTC
> For example a mounted cdrom /cdrom with strongly missing directories
> (some appeared, most disappeared) and files or various user/system
> directories.

I'm pretty sure this is the same problem reported in PR kern/19407.
There was a bug in the Linuxulator that caused the linux readdir(3)
to prematurely return NULL on non-UFS partitions.  Your Linux
programs can correctly read Freebsd partitions, right?

Marcel Moolenaar fixed the problem shortly before 4.2-Release.
So, upgrade to 4.2 or later and see if that fixes the problem.

--Mark
Comment 4 Kris Kennaway freebsd_committer freebsd_triage 2001-01-18 21:17:28 UTC
On Thu, Jan 18, 2001 at 01:51:01AM -0800, malte.sackmann@physik.uni-bremen.de wrote:

> 4.1.1-RELEASE FreeBSD 4.1.1-RELEASE #0: 


ISTR this problem being fixed recently in -stable - can you confirm?

Kris

--
NOTE: To fetch an updated copy of my GPG key which has not expired,
finger kris@FreeBSD.org
Comment 5 dd freebsd_committer freebsd_triage 2001-06-01 02:41:34 UTC
State Changed
From-To: open->closed

Problem appears to be fixed.