From nobody@FreeBSD.org  Sun Sep 12 13:08:07 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 76F9A1065783
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 12 Sep 2010 13:08:07 +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 4CB9C8FC13
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 12 Sep 2010 13:08:07 +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 o8CD86dw006167
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 12 Sep 2010 13:08:06 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o8CD86Yg006166;
	Sun, 12 Sep 2010 13:08:06 GMT
	(envelope-from nobody)
Message-Id: <201009121308.o8CD86Yg006166@www.freebsd.org>
Date: Sun, 12 Sep 2010 13:08:06 GMT
From: William FRANCK <william.franck@oceasys.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: ZFS vdev failure vdev.bad_label on amd64
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         150501
>Category:       kern
>Synopsis:       [zfs] ZFS vdev failure vdev.bad_label on amd64
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-fs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Sep 12 13:10:02 UTC 2010
>Closed-Date:    
>Last-Modified:  Mon Jul 18 12:00:30 UTC 2011
>Originator:     William FRANCK
>Release:        CURRENT 9.0 cvs 2010-09-12
>Organization:
>Environment:
FreeBSD serveur 9.0-CURRENT FreeBSD 9.0-CURRENT #0: Sun Sep 12 11:34:34 CEST 2010     root@serveur:/usr/obj/usr/src/sys/K9NSLI-AMD64  amd64

>Description:
ZFS unusable just after a zpool scrub command.

Symptoms :
zpool scrub command hangs.

no way to halt the system, still a PID running
no way to kill -9 zpool

Environment : AMD64 MSI K6N SLI motherboard.
 
# atacontrol list
==========
ATA channel 0:
    Master:  ad0 <ST340016A/3.10> ATA/ATAPI revision 5
    Slave:   ad1 <ST3120022A/3.06> ATA/ATAPI revision 6
ATA channel 2:
    Master:  ad4 <ST3750330AS/SD1A> SATA revision 1.x
ATA channel 4:
    Master:  ad8 <ST3750330AS/SD1A> SATA revision 1.x

# cat /boot/loader.conf
===========
zfs_load="YES"   		# ZFS
zpool_cache_type="/boot/zfs/zpool.cache"
vfs.zfs.zil_disable="1"  # !! avoid conflict between  ZFS and NFS risk of data consistency ??
vfs.zfs.prefetch_disable="1"  #Prefetch is disabled by default if less than 4GB of RAM is present;
### specific amd64 with 2MB of RAM ###
vm.kmem_size="1024M"
vm.kmem_size_max="1024M"
vfs.zfs.arc_max="100M"


After creating the ZFS Pool :
# zpool status
pool: tank
 state: ONLINE
 scrub: none requested
config:
	NAME           STATE     READ WRITE CKSUM
	tank           ONLINE       0     0     0
	  label/sata4  ONLINE       0     0     0
	  label/sata8  ONLINE       0     0     0
errors: No known data errors

>How-To-Repeat:
with 2 same SATA disks : ad4 , ad8
with or without geom labeling,
with or without AHCI enabled (bios setting)
do the following : 

# dd if=/dev/zero of=/dev/ad4 bs=1m count=1
# dd if=/dev/zero of=/dev/ad8 bs=1m count=1
optional : 
# glabel label sata4 /dev/ad4
# glabel label sata8 /dev/ad8

# zpool create tank [mirror | raidz]? [ label/sata4 | ad4]  [ label/sata8 | ad8]  
# zpool status
result is correct.

# zpool scrub tank
No  output.
# zpool scrub tank
... hangs ...
Output on console : 
ZFS: vdev failure, zpool=tank type=vdev.bad_label

>Fix:


>Release-Note:
>Audit-Trail:

From: William FRANCK <wfr@oceasys.net>
To: bug-followup@FreeBSD.org,
 william.franck@oceasys.net
Cc:  
Subject: Re: kern/150501: ZFS vdev failure vdev.bad_label on amd64
Date: Sun, 12 Sep 2010 19:09:07 +0200

 ZFS v4
 ZPool v15
 Motherboard MSI K9N-SLI with SATA 3Gb through nVIDIA=AE nForce 570 SLI  =
 chipset
 CPU Athlon 6000+ (2 CPU)=

From: William FRANCK <william.franck@me.com>
To: bug-followup@FreeBSD.org, william.franck@oceasys.net
Cc:  
Subject: Re: kern/150501: ZFS vdev failure vdev.bad_label on amd64
Date: Mon, 13 Sep 2010 09:38:32 +0200

 Guess has to do with the nVidia 570 SLI chipset SATA300 and/or MCP55
 
 
 All of us with nVidia 570 SLI have the SATA not foolish !
 	http://forums.freebsd.org/showthread.php?t=4574
 	http://forums.freebsd.org/showthread.php?t=5286   (mcp55 ; nVidia 8200)
 	http://forums.freebsd.org/showthread.php?t=2915  (mcp55 ; nVidia nForce4 )
 	(... and others ...)
 
 
 see : 
 	http://www.freebsd.org/cgi/query-pr.cgi?pr=120296
 	http://www.freebsd.org/cgi/query-pr.cgi?pr=121396
 	http://www.freebsd.org/cgi/query-pr.cgi?pr=150501
 	http://www.freebsd.org/cgi/query-pr.cgi?pr=150503
 
 
 Could you please forward to the right person ?
 Thanks a lot,
 
 William
Responsible-Changed-From-To: freebsd-bugs->freebsd-fs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Fri Sep 17 08:11:22 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=150501 

From: Martin Matuska <mm@FreeBSD.org>
To: bug-followup@FreeBSD.org, william.franck@oceasys.net
Cc:  
Subject: Re: kern/150501: [zfs] ZFS vdev failure vdev.bad_label on amd64
Date: Mon, 18 Jul 2011 13:54:41 +0200

 Any news on this issue? Does is still happen with v28 and latest
 8-STABLE or 9-CURRENT?
 
 -- 
 Martin Matuska
 FreeBSD committer
 http://blog.vx.sk
 
>Unformatted:
