Subject: Re: fts_read: No such file or directory
To: None <current-users@netbsd.org>
From: Jukka Salmi <j+nbsd@2005.salmi.ch>
List: current-users
Date: 08/10/2005 15:54:40
Jeff --> current-users (2005-08-10 09:14:11 -0400):
> I notice this as well, only when fdesc is mounted.
> $ sudo mount -o union -t fdesc fdesc /dev
> 
> /tmp $ sudo du -s /
> du: fts_read: No such file or directory
[...]

I just sent a PR about this: misc/30962. Maybe you could add the
information about the crash you reported to it?


Cheers, Jukka

> / $ sudo du -s /
> 1546165 /
> 
> / $ sudo du -s /dev
> du: fts_read: No such file or directory
> 
> /dev $ sudo du -s /dev
> 59      /dev
> 
> /dev $ sudo du -s /dev/fd
> [...snip...]
> du: /dev/fd/3/tap2: No such file or directory
> du: /dev/fd/3/tap3: No such file or directory
> du: /dev/fd/3: No such file or directory
> 0       /dev/fd
> 
> /dev/fd $ sudo du -s /dev/fd [*]
> 
> uvm_fault(0xca3888c0, 0, 0, 1) -> 0xe
> kernel: page fault trap, code=0
> Stopped in pid 498.1 (sudo) at  netbsd:fdesc_readdir+0x63:      movl
> 0xc(%eax),%eax
> 
> Which is the following code:
> 
> sys/miscfs/fdesc/fdesc_vnops.c line 709:
> 
> int
> fdesc_readdir(v)
>         void *v;
> {
> [...]
> 
>         switch (VTOFDESC(ap->a_vp)->fd_type) {
>         case Fctty:
>                 return (0);
> 
>         case Fdesc:
>                 return (ENOTDIR);
> 
>         default:
>                 break;
>         }
> 
>         fdp = uio->uio_procp->p_fd;
> 	^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> as a test I enclosed fdp=... in
> 	if(uio->uio_procp)
> 		fdp = ...
> 	else 
> 		return (ENOTDIR)
> 
> and was able to avoid the crash, however i'm sure this is not the
> correct solution.
> 
> [*] Running commands such as 'mount -a' and 'umount /kern' from
>     /dev/fd also produces this crash.

-- 
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~