From owner-freebsd-current@FreeBSD.ORG Mon Jul 12 15:08:33 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E4141065678; Mon, 12 Jul 2010 15:08:33 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 2F6B28FC12; Mon, 12 Jul 2010 15:08:33 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id CF7AD46B7E; Mon, 12 Jul 2010 11:08:32 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 55CFB8A04E; Mon, 12 Jul 2010 11:08:28 -0400 (EDT) From: John Baldwin To: freebsd-current@freebsd.org Date: Mon, 12 Jul 2010 10:08:33 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100217; KDE/4.4.5; amd64; ; ) References: <1278695579.2436.27.camel@localhost.localdomain> <201007100016.29946.hselasky@c2i.net> <4C37DAA2.6080102@acm.poly.edu> In-Reply-To: <4C37DAA2.6080102@acm.poly.edu> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201007121008.33603.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 12 Jul 2010 11:08:28 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: sbruno@freebsd.org, Boris Kochergin , Hans Petter Selasky Subject: Re: QEMU/KVM Panic on USB Mount X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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, 12 Jul 2010 15:08:33 -0000 On Friday, July 09, 2010 10:27:46 pm Boris Kochergin wrote: > Hans Petter Selasky wrote: > > On Friday 09 July 2010 19:12:59 Sean Bruno wrote: > > > >> In order to come up with the most convoluted problem possible, I present > >> to you screen shots of a panic from a FreeBSD VM running in QEMU > >> emulation under RedHat's KVM infrastructure. > >> > >> I presented a perfectly functional USB partition from my host machine to > >> the VM. Then I attempted to mount the partition from FreeBSD and it > >> generated the panics located here: > >> > >> http://people.freebsd.org/~sbruno/usb_panic1.png > >> http://people.freebsd.org/~sbruno/usb_panic2.png > >> > >> This is 100% reproducible. But not an emergency or anything. > >> > > > > It might be that there is a conflict that both the VM and the OS is accessing > > / loading drivers on the same USB device. The panic seems not directly related > > to USB. > > > > --HPS > > > > > I followed the code for a while and the cause of the panic appears to be > that ffs_vgetf() in /usr/src/sys/ufs/ffs/ffs_vfsops.c fails in one of > the several ways possible, causing in VFS_ROOT() in > /usr/src/sys/kern/vfs_mount.c to return a non-zero value and resulting > in the panic. I think the problem calls for someone with serious VFS chops. > > The I/O errors from the USB device are suspicious (in that they may > cause the mount code to misbehave if they occur during its course). Much of the filesystem code doesn't really handle I/O errors very gracefully. I do think trasz@ did some work a year or so ago to improve this somewhat. -- John Baldwin