From owner-freebsd-bugs@FreeBSD.ORG Wed Jun 16 11:40:02 2010 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09E061065677 for ; Wed, 16 Jun 2010 11:40:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id DAF568FC1E for ; Wed, 16 Jun 2010 11:40:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o5GBe1dH055488 for ; Wed, 16 Jun 2010 11:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o5GBe1Ab055487; Wed, 16 Jun 2010 11:40:01 GMT (envelope-from gnats) Resent-Date: Wed, 16 Jun 2010 11:40:01 GMT Resent-Message-Id: <201006161140.o5GBe1Ab055487@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Michiel Leenaars Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3EB53106566C for ; Wed, 16 Jun 2010 11:37:09 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 142448FC12 for ; Wed, 16 Jun 2010 11:37:09 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o5GBb8K1022233 for ; Wed, 16 Jun 2010 11:37:08 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id o5GBb8Oq022232; Wed, 16 Jun 2010 11:37:08 GMT (envelope-from nobody) Message-Id: <201006161137.o5GBb8Oq022232@www.freebsd.org> Date: Wed, 16 Jun 2010 11:37:08 GMT From: Michiel Leenaars To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/147903: Kernel panics on faulty zfs device X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jun 2010 11:40:02 -0000 >Number: 147903 >Category: misc >Synopsis: Kernel panics on faulty zfs device >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Jun 16 11:40:01 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Michiel Leenaars >Release: 8.0-RELEASE-p3 >Organization: - >Environment: FreeBSD hostname 8.0-RELEASE-p3 FreeBSD 8.0-RELEASE-p3 #0: Tue May 25 20:54:11 UTC 2010 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 >Description: Hi there, one of the four drives in my desktop machine attached to a zpool has apparently something corrupted. Whenever I boot with that (external) disk attached, my machine crashes with a panic and reboots. It took some time to find out that when I unplugged that particular drive, I am able to boot the system, the zpool is not online then. When I replug the (usb) drive back in, it keeps on connecting and disconnecting - repeating this message: umass0:0:0:-1: Attached to scbus0 ugen4.2: at usbus4 (disconnected) umass0: at uhub4, port 5, addr 2 (disconnected) ugen4.2: at usbus4 umass0: on usbus4 umass0: SCSI over Bulk-Only; quirks = 0x0000 When I run zpool status obviously it gives that it cannot open that disk: pool: tank state: UNAVAIL status: One or more devices could not be opened. There are insufficient replicas for the pool to continue functioning. action: Attach the missing device and online it using 'zpool online'. see: http://www.sun.com/msg/ZFS-8000-3C scrub: none requested config: NAME STATE READ WRITE CKSUM tank UNAVAIL 0 0 0 insufficient replicas ad6 ONLINE 0 0 0 ad10 ONLINE 0 0 0 ad12 ONLINE 0 0 0 da0 UNAVAIL 0 0 0 cannot open The first when I cleared the errors and had the disk plugged in $ zpool clear tank da0 zfs tried to get the device online and the system rebooted. Meanwhile, some more damage occurred, because somehow I don't have sufficient rights to clear the zpool errors - even though I am logged in as root. cannot clear errors for tank: permission denied So there seem to be two issues: first is an zfs error handling issue that somehow manages to crash the system. The second is the lock out for the superuser to reattach a device (hopefully for resilvering). >How-To-Repeat: Well, my system does it every time I reboot with this hard drive attached, but I'm not sure how other could reproduce it. >Fix: >Release-Note: >Audit-Trail: >Unformatted: