From owner-freebsd-stable@FreeBSD.ORG Mon Oct 17 02:14:50 2005 Return-Path: X-Original-To: stable@freebsd.org Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2143616A41F for ; Mon, 17 Oct 2005 02:14:50 +0000 (GMT) (envelope-from cykyc@yahoo.com) Received: from web50310.mail.yahoo.com (web50310.mail.yahoo.com [206.190.38.243]) by mx1.FreeBSD.org (Postfix) with SMTP id B1D7143D48 for ; Mon, 17 Oct 2005 02:14:49 +0000 (GMT) (envelope-from cykyc@yahoo.com) Received: (qmail 59558 invoked by uid 60001); 17 Oct 2005 02:14:49 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=tAe/2RDgT6alymwh9kI2E6vAnncJNGgWptcJxcBaEZKaDgvFeOJdPS7PSw+FzOrqnDLsS0Gkv/Xucyk+GZWBoUPZ5wGxmFb0Bk+aP6wTyiGYePqtl8y09UtWhtlznu8j1oFIjCjz+aFPwcPPr6hMAk14EJSYcAoV3FXOO8Hy1gM= ; Message-ID: <20051017021449.59556.qmail@web50310.mail.yahoo.com> Received: from [209.98.54.121] by web50310.mail.yahoo.com via HTTP; Sun, 16 Oct 2005 19:14:48 PDT Date: Sun, 16 Oct 2005 19:14:48 -0700 (PDT) From: Jon Passki To: stable@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: Subject: Voodoo with md(4) panics system reliably X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: cykyc@yahoo.com List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2005 02:14:50 -0000 Hello, I'm attempting to simulate unionfs on RELENG_5_4 by remounting multiple times one vnode-backed md disk and then union mounting others on top. Here are my steps below w/ a quick backtrace. I have the core saved and can look into it farther if need be. Ideas outside of ``don't do that''? Jon touch /root/foo mdconfig -a -t vnode -s 32m -f /root/foo newfs /dev/md0 mount /dev/md0 /tmp/md0 touch /tmp/md0/test1 umount /tmp/md0 mdconfig -d -u md0 # Strangeness coming mdconfig -a -t vnode -f /root/foo -o readonly -u md0 mdconfig -a -t vnode -f /root/foo -o readonly -u md1 mdconfig -a -t vnode -f /root/foo -o readonly -u md2 mount -o ro /dev/md0 /tmp/md0 mount -o ro /dev/md1 /tmp/md1 mount -o ro /dev/md1 /tmp/md2 # Multiple mounts touch bar{0,1,2} mdconfig -a -t vnode -s 32m -f /root/bar0 -u md4 mdconfig -a -t vnode -s 32m -f /root/bar1 -u md5 mdconfig -a -t vnode -s 32m -f /root/bar2 -u md6 newfs /dev/md4 newfs /dev/md5 newfs /dev/md6 mount -o union /dev/md4 /tmp/md0 mount -o union /dev/md5 /tmp/md1 mount -o union /dev/md6 /tmp/md2 mount [snip] /dev/md0 on /tmp/md0 (ufs, local, read-only) /dev/md1 on /tmp/md1 (ufs, local, read-only) /dev/md2 on /tmp/md2 (ufs, local, read-only) /dev/md4 on /tmp/md0 (ufs, local, union) /dev/md5 on /tmp/md1 (ufs, local, union) /dev/md6 on /tmp/md2 (ufs, local, union) mdconfig -l md6 md5 md4 md2 md1 md0 ls -li /tmp/md0 total 2 3 drwxrwxr-x 2 root operator 512 Oct 16 20:30 .snap 4 -rw-r--r-- 1 root wheel 0 Oct 16 20:21 test1 touch /tmp/md0/test2 ls -li /tmp/md0 total 2 3 drwxrwxr-x 2 root operator 512 Oct 16 20:30 .snap 4 -rw-r--r-- 1 root wheel 0 Oct 16 20:21 test1 4 -rw-r--r-- 1 root wheel 0 Oct 16 20:31 test2 touch /tmp/md0/test3 ls -li /tmp/md0 total 2 3 drwxrwxr-x 2 root operator 512 Oct 16 20:30 .snap 4 -rw-r--r-- 1 root wheel 0 Oct 16 20:21 test1 4 -rw-r--r-- 1 root wheel 0 Oct 16 20:31 test2 5 -rw-r--r-- 1 root wheel 0 Oct 16 20:32 test3 (kgdb) bt #0 doadump () at pcpu.h:159 #1 0xc054d2e2 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:410 #2 0xc054d578 in panic (fmt=0xc0735a98 "ffs_sync: rofs mod") at /usr/src/sys/kern/kern_shutdown.c:566 #3 0xc068a5fc in ffs_sync (mp=0xc2304000, waitfor=3, cred=0xc21dbd80, td=0xc22efd80) at /usr/src/sys/ufs/ffs/ffs_vfsops.c:1123 #4 0xc05a23b6 in sync_fsync (ap=0xe49f2ce4) at /usr/src/sys/kern/vfs_subr.c:3475 #5 0xc059f1cd in sched_sync () at vnode_if.h:627 #6 0xc0538e88 in fork_exit (callout=0xc059ee0c , arg=0x0, frame=0xe49f2d48) at /usr/src/sys/kern/kern_fork.c:791 #7 0xc06d43bc in fork_trampoline () at /usr/src/sys/i386/i386/exception.s:209 (kgdb) f 3 #3 0xc068a5fc in ffs_sync (mp=0xc2304000, waitfor=3, cred=0xc21dbd80, td=0xc22efd80) at /usr/src/sys/ufs/ffs/ffs_vfsops.c:1123 1123 lockreq = LK_EXCLUSIVE | LK_NOWAIT; (kgdb) inf f Stack level 3, frame at 0xe49f2c94: eip = 0xc068a5fc in ffs_sync (/usr/src/sys/ufs/ffs/ffs_vfsops.c:1123); saved eip 0xc05a23b6 called by frame at 0xe49f2cc4, caller of frame at 0xe49f2c3c source language c. Arglist at 0xe49f2c38, args: mp=0xc2304000, waitfor=3, cred=0xc21dbd80, td=0xc22efd80 Locals at 0xe49f2c38, Previous frame's sp is 0xe49f2c94 Saved registers: ebx at 0xe49f2c80, ebp at 0xe49f2c8c, esi at 0xe49f2c84, edi at 0xe49f2c88, eip at 0xe49f2c90 (kgdb) l 1118 } 1119 /* 1120 * Write back each (modified) inode. 1121 */ 1122 wait = 0; 1123 lockreq = LK_EXCLUSIVE | LK_NOWAIT; 1124 if (waitfor == MNT_WAIT) { 1125 wait = 1; 1126 lockreq = LK_EXCLUSIVE; 1127 } __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com