From nobody@FreeBSD.org  Mon Dec 13 17:11:02 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 6F8B61065670
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 13 Dec 2010 17:11:02 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (unknown [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 5ED648FC1A
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 13 Dec 2010 17:11:02 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id oBDHB217011152
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 13 Dec 2010 17:11:02 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id oBDHB2de011151;
	Mon, 13 Dec 2010 17:11:02 GMT
	(envelope-from nobody)
Message-Id: <201012131711.oBDHB2de011151@red.freebsd.org>
Date: Mon, 13 Dec 2010 17:11:02 GMT
From: Andrei Kolu <antik@bsd.ee>
To: freebsd-gnats-submit@FreeBSD.org
Subject: ZFS: vdev failure, zpool=peegel type=vdev.too_small
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         153126
>Category:       kern
>Synopsis:       [zfs] vdev failure, zpool=peegel type=vdev.too_small
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-fs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 13 17:20:06 UTC 2010
>Closed-Date:    
>Last-Modified:  Mon Dec 20 08:45:12 UTC 2010
>Originator:     Andrei Kolu
>Release:        FreeBSD 8.1-RELEASE-p2
>Organization:
Raidon Raalid O
>Environment:
FreeBSD 8.1-RELEASE-p2 #3: Thu Dec  2 01:50:54 EET 2010 amd64

>Description:
Kernel crash when some error occures in ZFS pool with virtual drives (file based disks). "zpool status" does not show error in existing pool with broken drive. Same bug appears in FreeBSD 8.1-STABLE and 9-CURRENT.
>How-To-Repeat:
Stresstesting ZFS:

# cd /home/antik/

Create files:
# mkfile 128m disk1
# mkfile 128m disk2

Create mirror from virtual devices:
# zpool create peegel mirror /home/antik/disk1 /home/antik/disk2

# zpool list
NAME     SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
peegel   123M  73.5K   123M     0%  ONLINE  -

# zpool status peegel
 pool: peegel
state: ONLINE
scrub: none requested
config:

       NAME                           STATE         READ WRITE CKSUM
       peegel                         ONLINE       0     0     0
         mirror                       ONLINE       0     0     0
           /home/antik/disk1      ONLINE       0     0     0
           /home/antik/disk2      ONLINE       0     0     0

errors: No known data errors

Break one virtual disk:
# dd if=/dev/random of=/home/antik/disk1 bs=512 count=1

# zpool scrub peegel

Last thing I saw on screen was this:

ZFS: vdev failure, zpool=peegel type=vdev.too_small <<this message
does not appear in logs

Dec 11 17:29:09 freenas kernel: Fatal trap 12: page fault while in kernel mode
Dec 11 17:29:09 freenas kernel: cpuid = 0; apic id = 00
Dec 11 17:29:09 freenas kernel: fault virtual address   = 0x0
Dec 11 17:29:09 freenas kernel: fault code              = supervisor
read data, page not present
Dec 11 17:29:09 freenas kernel: instruction pointer     =
0x20:0xffffffff81073b4d
Dec 11 17:29:09 freenas kernel: stack pointer           =
0x28:0xffffff801766c800
Dec 11 17:29:09 freenas kernel: frame pointer           =
0x28:0xffffff801766c8c0
Dec 11 17:29:09 freenas kernel: code segment            = base 0x0,
limit 0xfffff, type 0x1b
Dec 11 17:29:09 freenas kernel: = DPL 0, pres 1, long 1, def32 0, gran 1
Dec 11 17:29:09 freenas kernel: processor eflags        = interrupt
enabled, resume, IOPL = 0
Dec 11 17:29:09 freenas kernel: current process         = 1171
(txg_thread_enter)
Dec 11 17:29:09 freenas kernel: trap number             = 12
Dec 11 17:29:09 freenas kernel: panic: page fault
Dec 11 17:29:09 freenas kernel: cpuid = 0
Dec 11 17:29:09 freenas kernel: Uptime: 55s
Dec 11 17:29:09 freenas kernel: Cannot dump. Device not defined or unavailable.
Dec 11 17:29:09 freenas kernel: Automatic reboot in 15 seconds - press
a key on the console to abort
Dec 11 17:29:09 freenas kernel: --> Press a key on the console to reboot,
Dec 11 17:29:09 freenas kernel: --> or switch off the system now.
Dec 11 17:29:09 freenas kernel: Rebooting...
Dec 11 17:29:09 freenas kernel: cpu_reset: Stopping other CPUs
Dec 11 17:29:09 freenas kernel: Copyright (c) 1992-2010 The FreeBSD Project.
Dec 11 17:29:09 freenas kernel: Copyright (c) 1979, 1980, 1983, 1986,
1988, 1989, 1991, 1992, 1993, 1994
Dec 11 17:29:09 freenas kernel: The Regents of the University of
California. All rights reserved.
Dec 11 17:29:09 freenas kernel: FreeBSD is a registered trademark of
The FreeBSD Foundation.
Dec 11 17:29:09 freenas kernel: FreeBSD 8.1-RELEASE-p2 #3: Thu Dec  2
01:50:54 EET 2010


Not a sign about ZFS volumes on my system

# mount
/dev/da0s1a on / (ufs, local)
devfs on /dev (devfs, local, multilabel)
/dev/da0s1e on /tmp (ufs, local, soft-updates)
/dev/da0s1f on /usr (ufs, local, soft-updates)
/dev/da0s1d on /var (ufs, local, soft-updates)

Any attempt to scrub pool fails with kernel panic.

>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-amd64->freebsd-fs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Dec 20 08:44:53 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=153126 
>Unformatted:
