From owner-freebsd-fs@FreeBSD.ORG Fri May 11 21:50:17 2012 Return-Path: Delivered-To: freebsd-fs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7FCB4106564A for ; Fri, 11 May 2012 21:50:17 +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 5F7E78FC1D for ; Fri, 11 May 2012 21:50:17 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q4BLoHbK097624 for ; Fri, 11 May 2012 21:50:17 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q4BLoHUD097623; Fri, 11 May 2012 21:50:17 GMT (envelope-from gnats) Date: Fri, 11 May 2012 21:50:17 GMT Message-Id: <201205112150.q4BLoHUD097623@freefall.freebsd.org> To: freebsd-fs@FreeBSD.org From: Jeff Kletsky Cc: Subject: Re: kern/167685: [zfs] ZFS on USB drive prevents shutdown / reboot X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Jeff Kletsky List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 21:50:17 -0000 The following reply was made to PR kern/167685; it has been noted by GNATS. From: Jeff Kletsky To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/167685: [zfs] ZFS on USB drive prevents shutdown / reboot Date: Fri, 11 May 2012 14:41:03 -0700 This is a multi-part message in MIME format. --------------020209050805030409070009 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Problem can be replicated by booting of a "memstick" (with a "spare" USB stick as /dev/da1) and then executing # dd if=/dev/zer of=/dev/da1 bs=64k # zpool create stick /dev/da1 # reboot Problem has been reliably reproduced on the Atom 330 previously mentioned, as well as on an AMD A8-3870 with A75 chipset. It also can be replicated using VirtualBox running under Ubuntu on the AMD A8-3870 system. It does not seem specific to one "flavor" of USB controller or driver. Using /usr/src/release/generate_release.sh and bisection, I have confirmed that * r227445 does not exhibit the behavior ("Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release cycle) * r229097 does not exhibit the behavior * r229281 -- FAIL by not rebooting under the conditions described above. Based on these results, I am suspicious of r229100 | hselasky | 2011-12-31 06:33:15 -0800 (Sat, 31 Dec 2011) | 6 lines MFC r228709, r228711 and r228723: - Add missing unlock of USB controller's lock, when doing shutdown, suspend and resume. - Add code to wait for USB shutdown to be executed at system shutdown. - Add sysctl which can be used to skip this waiting. as being what brought the issue to the forefront. I am presently building r229099 and r229100 to confirm this suspicion. A potential, though untested workaround would be # sysctl hw.usb.no_shutdown_wait=1 --------------020209050805030409070009 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Problem can be replicated by booting of a "memstick" (with a "spare" USB stick as /dev/da1) and then executing

# dd if=/dev/zer of=/dev/da1 bs=64k
# zpool create stick /dev/da1
# reboot

Problem has been reliably reproduced on the Atom 330 previously mentioned, as well as on an AMD A8-3870 with A75 chipset. It also can be replicated using VirtualBox running under Ubuntu on the AMD A8-3870 system. It does not seem specific to one "flavor" of USB controller or driver.

Using /usr/src/release/generate_release.sh and bisection, I have confirmed that

* r227445 does not exhibit the behavior ("Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release cycle)
* r229097 does not exhibit the behavior
* r229281 -- FAIL by not rebooting under the conditions described above.

Based on these results, I am suspicious of

r229100 | hselasky | 2011-12-31 06:33:15 -0800 (Sat, 31 Dec 2011) | 6 lines
 
 MFC r228709, r228711 and r228723:
 - Add missing unlock of USB controller's lock, when
 doing shutdown, suspend and resume.
 - Add code to wait for USB shutdown to be executed at system shutdown.
 - Add sysctl which can be used to skip this waiting.

as being what brought the issue to the forefront.

I am presently building r229099 and r229100 to confirm this suspicion.

A potential, though untested workaround would be
# sysctl hw.usb.no_shutdown_wait=1


--------------020209050805030409070009--