From owner-freebsd-hackers Sun Sep 2 14: 0:18 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from ntlg.sibnet.ru (dns.sibnet.ru [217.70.96.34]) by hub.freebsd.org (Postfix) with ESMTP id DBE8F37B401 for ; Sun, 2 Sep 2001 14:00:13 -0700 (PDT) Received: from tlg5-ppp5.sibnet.ru (tlg5-ppp5.sibnet.ru [217.70.97.6]) by ntlg.sibnet.ru (8.9.3+Sun/8.9.3) with ESMTP id AAA13180 for ; Mon, 3 Sep 2001 00:59:50 +0400 (MSD) Date: Mon, 3 Sep 2001 03:59:47 +0600 (GMT+6) From: "Semen A. Ustimenko" X-Sender: semenu@default To: freebsd-hackers@FreeBSD.org Subject: page fault unmounting FFS from NFS-located special Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi! Here is sequence leading to page fault: 1. Make special file on NFS 2. Mount FFS from this file 3. Read or write special file (for attributes to change) 4. Unmount this special 5. Enjoy ``Fatal trap 12: ...'' Like this: su-2.04# mount 192.168.5.1:/home/diskless_root on / (nfs, noatime) mfs:10 on /var (mfs, asynchronous, local) 192.168.5.1:/home on /home (nfs) su-2.04# mount /dev/ad0s2a /mnt su-2.04# dd if=/dev/ad0s2a of=/dev/null bs=1k count=1 1+0 records in 1+0 records out 1024 bytes transferred in 0.003526 secs (290416 bytes/sec) su-2.04# umount /mnt ... (gdb) where #0 0xc01ae3a8 in nfs_request (vp=0xcec34a00, mrest=0xc07a8900, procnum=2, procp=0xcec39560, cred=0x0, mrp=0xcf654da8, mdp=0xcf654dac, dposp=0xcf654db0) at ../../nfs/nfs_socket.c:1006 #1 0xc01ba167 in nfs_setattrrpc (vp=0xcec34a00, vap=0xcf654e1c, cred=0x0, procp=0xcec39560) at ../../nfs/nfs_vnops.c:792 #2 0xc01b8b50 in nfs_setattr (ap=0xcf654e08) at ../../nfs/nfs_vnops.c:740 #3 0xc01c9441 in nfsspec_close (ap=0xcf654e94) at vnode_if.h:305 #4 0xc01da96a in ffs_unmount (mp=0xc21d4600, mntflags=0, p=0xcec39560) at vnode_if.h:218 #5 0xc0161ace in dounmount (mp=0xc21d4600, flags=0, p=0xcec39560) at ../../kern/vfs_syscalls.c:483 #6 0xc0161a11 in unmount (p=0xcec39560, uap=0xcf654f80) at ../../kern/vfs_syscalls.c:451 #7 0xc021f73e in syscall2 (frame={tf_fs = 47, tf_es = 47, tf_ds = 47, tf_edi = 134661253, tf_esi = 134738749, tf_ebp = -1077937436, tf_isp = -815444012, tf_ebx = 0, tf_edx = 0, tf_ecx = 3, tf_eax = 22, tf_trapno = 12, tf_err = 2, tf_eip = 134522456, tf_cs = 31, tf_eflags = 663, tf_esp = -1077938584, tf_ss = 47}) at ../../i386/i386/trap.c:1126 #8 0xc02120d5 in Xint0x80_syscall () #9 0x8048442 in ?? () #10 0x8048139 in ?? () (gdb) f 0 #0 0xc01ae3a8 in nfs_request (vp=0xcec34a00, mrest=0xc07a8900, procnum=2, procp=0xcec39560, cred=0x0, mrp=0xcf654da8, mdp=0xcf654dac, dposp=0xcf654db0) at ../../nfs/nfs_socket.c:1006 1006 if (cred->cr_ngroups < 1) (gdb) print cred $1 = (struct ucred *) 0x0 the cause is code in ffs_vfsops.c:ffs_unmount() ... error = VOP_CLOSE(ump->um_devvp, fs->fs_ronly ? FREAD : FREAD|FWRITE, NOCRED, p); ^^^^^^ == NULL ... I have no good ideas how to fix this and if it is worth to be fixed... (This all was tested on 4.1 system, but it seems nothing changed since those times) Bye! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message