From nobody@FreeBSD.org  Thu Jun  3 18:07:10 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 853B01065670
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  3 Jun 2010 18:07:10 +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 73AD78FC0C
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  3 Jun 2010 18:07:10 +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 o53I79xG046215
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 3 Jun 2010 18:07:09 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o53I79pX046213;
	Thu, 3 Jun 2010 18:07:09 GMT
	(envelope-from nobody)
Message-Id: <201006031807.o53I79pX046213@www.freebsd.org>
Date: Thu, 3 Jun 2010 18:07:09 GMT
From: Mykah <mburkhardt@exavault.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: /etc/rc.d/zfs stop not called on reboot & modules cause system hang 
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         147444
>Category:       conf
>Synopsis:       [rc.d] [patch] /etc/rc.d/zfs stop not called on reboot & modules cause system hang
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-rc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 03 18:10:01 UTC 2010
>Closed-Date:    
>Last-Modified:  Fri Jun 04 01:12:08 UTC 2010
>Originator:     Mykah
>Release:        7.3-RELEASE amd64
>Organization:
ExaVault / DO IT LLC
>Environment:
FreeBSD gluon-int.exavault.com 7.3-RELEASE FreeBSD 7.3-RELEASE #0: Sun Mar 21 05:25:24 UTC 2010 root@driscoll.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
Hardware:
CPU: Quad-Core Xeon L3426
MEM: 16G
CONTROLLER: 3ware 9750-8i (all disks as single-disk units exported
individually, except for the OS which is a HW Raid1 = /dev/da0)

ZFS: 10 x 2TB raidz2 currently running defaults. (2TB Hitachi SATA)

ZFS is configured to start @ boot via 'zfs_enable="YES"' in the /etc/rc.conf.

Creation Commands:
# zpool create storage01 raidz2 da1 da2 da3 da4 da5 da6 da7 da8 da9 da10 
# zpool add storage01 spare da11 da12 
# zfs create storage01/tachyon 
# zfs create storage01/iron 
# zfs create storage01/boson 
# zfs create storage01/hydro
>How-To-Repeat:
Create a pool and then attempt to:
# reboot
or
# shutdown -r now

Result:
Waiting (max 60 seconds) for system process `vnlru' to stop...done.
Waiting (max 60 seconds) for system process `bufdaemon' to stop...done.
Waiting (max 60 seconds) for system process `syncer' to stop...done.
Syncing disks, vnodes remaining... (etc, etc).. done
All buffers synced.
zfs_umount:1005[0] Force unmount is experimental - report any problems.
zfs_umount:1005[0] Force unmount is experimental - report any problems.
zfs_umount:1005[0] Force unmount is experimental - report any problems.
zfs_umount:1005[0] Force unmount is experimental - report any problems.
zfs_umount:1005[0] Force unmount is experimental - report any problems.
Uptime: <TIME>
--- HANGS ----
>Fix:
Note: You can get a clean 'shutdown -r now' after these edits. Unfortunately,
'reboot' still does not function and hangs the system. I believe 'reboot'
does not trigger rc.shutdown and hence does not fire off the 'rcorder -k
shutdown /etc/rc.d/*' that a 'shutdown' would.

Edit /etc/rc.d/zfs as follows:

ADD below '#REQUIRE: mountcritlocal':
# KEYWORD shutdown

ADD @ bottom of zfs_stop_main() subroutine/function:
kldunload zfs.ko  opensolaris.ko
sleep 5
kldunload zfs.ko opensolaris.ko
sleep 5

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-rc 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Fri Jun 4 01:11:01 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer(s). 

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