FreeBSD2.2.x nfs or kernel bug?

FreeBSD2.2.x nfs or kernel bug?

Post by gar.. » Mon, 16 Jun 1997 04:00:00



  Is there anyone has ideas about this problem? I wrote a simple
  program to recursive traverse a NFS mounted directory and delete
  files on FreeBSD 2.2.x (2.2R 2.2.1R), and gets kernel panic then
  reboot after removing some files. If the traverse does not remove
  files, the program runs well. I tested with the following cases

  NFS server          NFS client
  2.1.x               2.1.x            OK
  2.2.x               2.1.x            OK
  2.1.x               2.2.x            panic/reboot
  2.2.x               2.2.x            panic/reboot

  Is there anyone has the same problem? To reproduce this problem,
  the simplest way is to export a file system from local machine
  and mount it with NFS mount.

  The source code of this program is attached here. The directory
  it traverses should be large enough to get the kernel panic. For
  example. over 500 files.

  #gcc -o myrm myrm.c      
  #myrm <test_dir>

------------------->> myrm.c cut here<<---------------------------------------
#include <sys/stat.h>
#include <dirent.h>

int RemoveDir(char *dir)
{
   DIR *dirp;
   struct dirent *dp;
   struct stat stbuf;

   chdir(dir);
   if ( (dirp = opendir(".")) == NULL ){
      perror("opendir()");
      exit(-1);
   }

   while ( (dp = readdir(dirp)) != NULL ) {

      if ( !strcmp(dp->d_name, ".") || !strcmp(dp->d_name, "..") )
         continue;

      if ( stat(dp->d_name, &stbuf) == -1 ) {
         perror("state():");
         continue;
      }

      if ( S_ISDIR(stbuf.st_mode) ){
         RemoveDir(dp->d_name);
         continue;
      }
      printf("unlink %s\n", dp->d_name);
      unlink(dp->d_name);
   }
   closedir(dirp);
   chdir("..");
   rmdir(dir);
   return 1;

Quote:}

int main(int argc, char *argv[])
{

   if ( argc < 2 ) exit(-1);
   RemoveDir(argv[1]);
   return 1;

Quote:}

------------------------->end here<-------------------------------------  
 
 
 

FreeBSD2.2.x nfs or kernel bug?

Post by J Wuns » Tue, 17 Jun 1997 04:00:00



>   NFS server          NFS client
>   2.1.x               2.1.x            OK
>   2.2.x               2.1.x            OK
>   2.1.x               2.2.x            panic/reboot
>   2.2.x               2.2.x            panic/reboot

>   Is there anyone has the same problem? To reproduce this problem,
>   the simplest way is to export a file system from local machine
>   and mount it with NFS mount.

FreeBSD switched to NFSv3 as the default with 2.2.2.  Loopback mounts
to the local machine are known to be broken in NFSv3.  (You don't need
to send a PR for this, the maintainer of our NFS, Doug Rabson, is well
aware of the problem, but also says that it is too complex to be fixed
anytime soon.)

--
cheers, J"org


Never trust an operating system you don't have sources for. ;-)

 
 
 

FreeBSD2.2.x nfs or kernel bug?

Post by gar.. » Thu, 19 Jun 1997 04:00:00


: FreeBSD switched to NFSv3 as the default with 2.2.2.  Loopback mounts
: to the local machine are known to be broken in NFSv3.  (You don't need
: to send a PR for this, the maintainer of our NFS, Doug Rabson, is well
: aware of the problem, but also says that it is too complex to be fixed

  But this does not only occure in the loopback mount, it also gets into
  kernel panic when mount a NFS directory exporting by the remote NFS server.
  I tried to mount the NFS filesystem that 2.1.x and 2.2.x as the NFS
  server, and also gets kernel panic.:(

--Gareth

 
 
 

1. NFS bug in the new kernels (was Re: NFS with Redhat 6 server and clients)

I finally figured out the reason of my NFS error messages.
My home directory is in the server machine.  I log on to a client
machine accessing my home directory in the server machine.
Then, I issue "su" on the client machine to do "xhost +".
At this point, the root of the client machine has no permission
to stay on the home directory.

With 2.0.35 with nfs, some warning message appeared on screen of the
client machine.  Now with /usr/src/linux-2.2.?/fs/nfsd/*.c with knfs,
the error message appears on the *server* machine.  Of course, the
desktop user of the server machine has no idea of why he is getting the
"fh_verify permission error" as well as other nasty-looking nfs errors.

I think this is certainly a bug in the 2.2.?-2.3.3 kernels.

Can someone report this to the the appropriate mailing list?
I don't know how.

Regards,

--
G. Hugh Song

Assoc. Professor
Office: +82-62-970-2210
Departmental fax: -2204
PC           fax: -2246

Department of Information and Communications
Kwangju Institute of Science and Technology
1 Oryong-dong, Buk-gu
Kwangju, 500-712 South KOREA

2. Linux as a "dial-up" inet-provider...

3. 0.99pl8 kernel bug -fix (= no kernel bug)

4. bridge+firewall

5. Kernel NFS: equivalent to userland nfsd -r in kernel NFS

6. Sending user-defined messages with gdk

7. FreeBSD2.1.0-RELEASE: Fatal trap 12: page fault while in kernel mode

8. CD Changer programming

9. BUG REPORT: kernel nfs between 2.4.19-pre2 (server) and 2.2.21-pre3 (client)

10. proposal: feed smaller mailing lists into linux-kernel, add linux-kernel-core and linux-kernel-bugs

11. htree+NFS (NFS client bug?)

12. Bug in kernel logging; wide-spread device driver bug

13. bug in 2.4.18 (xfs tree), kernel BUG at page_alloc.c:82!