From owner-freebsd-stable Tue May 20 16:24:31 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id QAA04321 for stable-outgoing; Tue, 20 May 1997 16:24:31 -0700 (PDT) Received: from rr.zippo.com (rr.pathlink.com [204.30.237.2]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id QAA04315 for ; Tue, 20 May 1997 16:24:24 -0700 (PDT) Received: from dvl-1.pathlink.com (dvl-1.pathlink.com [204.30.237.241]) by rr.zippo.com (8.8.5/8.8.5) with SMTP id QAA18710; Tue, 20 May 1997 16:25:50 -0700 (PDT) Message-Id: <3.0.1.32.19970520162403.007167ec@dopey.pathlink.com> X-Sender: kachun@dopey.pathlink.com X-Mailer: Windows Eudora Pro Version 3.0.1 (32) Date: Tue, 20 May 1997 16:24:03 +0000 To: dfr@nlsystems.com (Doug Rabson) From: Kachun Lee Subject: Re: can anyone confirm my NFS/VM problem? Cc: freebsd-stable@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-stable@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > Well I think I have a fix. It was bloody painful too. There were some > extremely ugly problems associated with NFS' use of b_validoff and > b_validend. I attempted to fix them but it still feels pretty fragile > although it does pass Ghristoph's test case. I am wondering if you would look into another problem related to NFS/MMAP. Accessing a mmap NFS file when the file is deleted from the server will result with following error: May 20 16:02:02 lacy /kernel: vnode_pager_getpages: I/O read error May 20 16:02:02 lacy /kernel: vm_fault: pager input (probably hardware) error, P ID 522 failure I applied the above patch to the lastest 22-releng and it did not fix this problem. I wrote a simple C program to duplicate the problem. It will open and mmap a file, read it, then wait for a key and read it again. So the file can be deleted between keys. BTW, I normally need to wait for 5+ minutes after the file is deleted before I can see the error message. Best regards PS: The NFSV3 diroff memory leak is resolved... thanks again. -------------------------------------------- #include #include #include #include #include #include #include #include main(int ac, char **av) { int c; while(ac-- > 1) { ++av; int fdin = open(*av, O_RDONLY); if(fdin < 0) { fprintf(stderr,"Cannot open %s\n", *av); continue; } struct stat sb; if(fstat(fdin, &sb) < 0) { fprintf(stderr,"Cannot stat %s\n", *av); close(fdin); continue; } char * pmap = mmap(0, sb.st_size, PROT_READ, MAP_SHARED, fdin, 0); if(((int)pmap) < 0) { perror("Cannot map file"); close(fdin); continue; } for(c=0;c>=0;) { write(1, pmap, sb.st_size); while((c=getchar()) >= 0) if(c == '\n') break; extern int errno; if(fstat(fdin, &sb) < 0) fprintf(stderr, "fstat error: %s\n", strerror(errno)); } close(fdin); munmap(pmap, sb.st_size); } }