From owner-freebsd-current@FreeBSD.ORG Mon Jun 9 07:34:13 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DA8BF37B405 for ; Mon, 9 Jun 2003 07:34:13 -0700 (PDT) Received: from mail-2.zoominternet.net (mail-2.zoominternet.net [63.67.120.22]) by mx1.FreeBSD.org (Postfix) with SMTP id 14BC843FBD for ; Mon, 9 Jun 2003 07:34:12 -0700 (PDT) (envelope-from dmmiller@cvzoom.net) Received: (qmail 29333 invoked from network); 9 Jun 2003 14:34:08 -0000 Received: from acs-24-239-219-252.zoominternet.net (HELO cvzoom.net) ([24.239.219.252]) (envelope-sender ) by mail-2.zoominternet.net (qmail-ldap-1.03) with SMTP for ; 9 Jun 2003 14:34:08 -0000 Message-ID: <3EE49AE2.6010701@cvzoom.net> Date: Mon, 09 Jun 2003 10:34:10 -0400 From: Donn Miller User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030607 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tim Robbins References: <3EE43394.6090802@cvzoom.net> <20030609203355.A51153@dilbert.robbins.dropbear.id.au> In-Reply-To: <20030609203355.A51153@dilbert.robbins.dropbear.id.au> X-Enigmail-Version: 0.74.3.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: current@freebsd.org Subject: Re: panic: mdconfig on an iso file mounted on smbfs X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2003 14:34:14 -0000 Tim Robbins wrote: > On Mon, Jun 09, 2003 at 03:13:24AM -0400, Donn Miller wrote: > > >>Please see the attached gdb file. I get this panic if I have a samba >>filesystem mounted via mount_smbfs, where an iso file resides. When I >>try to use mdconfig on the file, I get an immediate panic. The exact >>mdconfig command issued is: >> >>mount -a -t vnode -f /smbfs/sol-9-u3-x86-v1.iso -u 0 > > > Try this patch and let me know whether it works. It seems to fix the problem > for me, but it still panics if I try to reboot the machine without running > mdconfig -d first. > > --- sys/netsmb/smb_iod.c.orig Mon Jun 9 20:36:56 2003 > +++ sys/netsmb/smb_iod.c Mon Jun 9 20:36:27 2003 > @@ -400,7 +400,8 @@ > int error; > > SMBIODEBUG("\n"); > - if (rqp->sr_cred->scr_td->td_proc == iod->iod_p) { > + if (rqp->sr_cred->scr_td != NULL && > + rqp->sr_cred->scr_td->td_proc == iod->iod_p) { > rqp->sr_flags |= SMBR_INTERNAL; > SMB_IOD_RQLOCK(iod); > TAILQ_INSERT_HEAD(&iod->iod_rqlist, rqp, sr_link); > > Thanks, that worked. But I'm seeing the same thing as you. i.e., panic if I reboot without running mdconfig -d first. Here is the backtrace of the ensuing panic: http://users.zoominternet.net/~dmmiller/freebsd/panic-2 (kgdb) where #0 doadump () at ../../../kern/kern_shutdown.c:238 #1 0xc01ee2f7 in boot (howto=256) at ../../../kern/kern_shutdown.c:370 #2 0xc01ee68d in panic () at ../../../kern/kern_shutdown.c:543 #3 0xc034a652 in trap_fatal (frame=0xd1d2d764, eva=0) at ../../../i386/i386/trap.c:836 #4 0xc034a332 in trap_pfault (frame=0xd1d2d764, usermode=0, eva=4) at ../../../i386/i386/trap.c:750 #5 0xc0349eb2 in trap (frame= {tf_fs = -774766568, tf_es = 42926096, tf_ds = -774766576, tf_edi = 1, tf_esi = -1028524484, tf_ebp = -774711356, tf_isp = -774711408, tf_ebx = 0, tf_edx = 0, tf_ecx = 0, tf_eax = -1028923984, tf_trapno = 12, tf_err = 0, tf_eip = -1028688820, tf_cs = 8, tf_eflags = 66182, tf_esp = 200, tf_ss = 4}) at ../../../i386/i386/trap.c:435 #6 0xc033a158 in calltrap () at {standard input}:96 #7 0xc2af7503 in smbfs_fullpath (mbp=0x1, vcp=0xc2b1f63c, dnp=0x0, name=0x0, nmlen=0) at /usr/src/sys/fs/smbfs/smbfs_subr.c:300 #8 0xc2af9df9 in smbfs_smb_trans2find2 (ctx=0x0) at /usr/src/sys/fs/smbfs/smbfs_smb.c:1169 #9 0xc2afa1a2 in smbfs_findnextLM2 (ctx=0xc27f3000, limit=0) at /usr/src/sys/fs/smbfs/smbfs_smb.c:1294 #10 0xc2afa74f in smbfs_findnext (ctx=0xc27f3000, limit=1, scred=0x0) at /usr/src/sys/fs/smbfs/smbfs_smb.c:1442 #11 0xc2afa971 in smbfs_smb_lookup (dnp=0xc2837e80, name=0x0, nmlen=0, fap=0xd1d2d8f0, scred=0xd1d2d8e8) at /usr/src/sys/fs/smbfs/smbfs_smb.c:1498 #12 0xc2af537c in smbfs_getattr (ap=0x19550000) at /usr/src/sys/fs/smbfs/smbfs_vnops.c:329 #13 0xc2af51de in smbfs_closel (ap=0xd1d2da60) at vnode_if.h:315 #14 0xc2af52b8 in smbfs_close (ap=0xc2837e80) at /usr/src/sys/fs/smbfs/smbfs_vnops.c:296 #15 0xc0249029 in vclean (vp=0x19550000, flags=8, td=0xc2837e80) at vnode_if.h:247 #16 0xc024967a in vgonel (vp=0xc2abd920, td=0x0) at ../../../kern/vfs_subr.c:2758 #17 0xc0248b6b in vflush (mp=0xc2ba3800, rootrefs=1, flags=2) at ../../../kern/vfs_subr.c:2464 #18 0xc2af2d61 in smbfs_unmount (mp=0xc2ba3800, mntflags=524288, td=0xc2620be0) at /usr/src/sys/fs/smbfs/smbfs_vfsops.c:248 #19 0xc0243084 in dounmount (mp=0xc2ba3800, flags=524288, td=0xc2620be0) at ../../../kern/vfs_mount.c:1323 #20 0xc024a15e in vfs_unmountall () at ../../../kern/vfs_subr.c:3186 #21 0xc01ee1a7 in boot (howto=0) at ../../../kern/kern_shutdown.c:355 #22 0xc01eda13 in reboot (td=0x0, uap=0x0) at ../../../kern/kern_shutdown.c:176 #23 0xc034a97a in syscall (frame= {tf_fs = 47, tf_es = 47, tf_ds = 47, tf_edi = 0, tf_esi = 0, tf_ebp = -1077937228, tf_isp = -7---Type to continue, or q to quit--- 74709900, tf_ebx = 2, tf_edx = -1, tf_ecx = 3, tf_eax = 55, tf_trapno = 12, tf_err = 2, tf_eip = 134516031, tf_cs = 31, tf_eflags = 582, tf_esp = -1077937300, tf_ss = 47}) at ../../../i386/i386/trap.c:1023 #24 0xc033a1ad in Xint0x80_syscall () at {standard input}:138 ---Can't read userspace from dump, or kernel process---