From owner-freebsd-current@FreeBSD.ORG Sun Nov 16 05:44:20 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 66571EF; Sun, 16 Nov 2014 05:44:20 +0000 (UTC) Received: from mail-wi0-x229.google.com (mail-wi0-x229.google.com [IPv6:2a00:1450:400c:c05::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E83D4B51; Sun, 16 Nov 2014 05:44:19 +0000 (UTC) Received: by mail-wi0-f169.google.com with SMTP id n3so2699812wiv.2 for ; Sat, 15 Nov 2014 21:44:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=OtwtPP4tQpFxBPBmHb8VN9zz8hYggqpus3GW8cqswnc=; b=DZYsQPAXSiIiwr3oSGOuJZ2199bOWc/nodGYEYVFL5vWPgnE1BfjFKj9xhWXa686AB WQDqQCoXUlTGJGT8+AXMLgsLA6us/BVc3wD0OrSzYJ2ccoCErU5HDcBHutR9OnfJR7eh A1GJ4D6efVyX+BcTKtBv9DNUZqcczfejsCQ0K2pEdz9QwKOWfuMKxFkoUrcC2NlAGRSv /TS8vfCtyh9PXS4NLOBDt8wJ6xc2jUfwXD5/h1Zlz/2tFiYYa1L0DF2+OPNO8+159IH0 VNeK1cCuvaxGFw4QlJOrt6tMK3+Li93MCj/VimBfpFmDngw/SyaNGlqnbeGI/V7TkvNv bF2g== MIME-Version: 1.0 X-Received: by 10.180.87.33 with SMTP id u1mr21066902wiz.20.1416116658151; Sat, 15 Nov 2014 21:44:18 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.106.136 with HTTP; Sat, 15 Nov 2014 21:44:18 -0800 (PST) In-Reply-To: <20141116054141.GA33186@troutmask.apl.washington.edu> References: <20141112224212.GA14013@troutmask.apl.washington.edu> <20141113172533.GA18690@troutmask.apl.washington.edu> <20141113180332.GA18990@troutmask.apl.washington.edu> <20141113181515.GA19117@troutmask.apl.washington.edu> <546515BF.6030508@selasky.org> <20141113212206.GA20802@troutmask.apl.washington.edu> <20141116054141.GA33186@troutmask.apl.washington.edu> Date: Sat, 15 Nov 2014 21:44:18 -0800 X-Google-Sender-Auth: I8lLyq0RzT11tlvJ0c7XSvPQeA8 Message-ID: Subject: Re: USB locks up system -- WAS Re: shutdown or acpi problem From: Adrian Chadd To: Steve Kargl , Mark Murray , =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= Content-Type: text/plain; charset=UTF-8 Cc: Hans Petter Selasky , freebsd-current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2014 05:44:20 -0000 On 15 November 2014 21:41, Steve Kargl wrote: > On Thu, Nov 13, 2014 at 01:22:06PM -0800, Steve Kargl wrote: >> On Thu, Nov 13, 2014 at 09:34:07PM +0100, Hans Petter Selasky wrote: >> > On 11/13/14 19:15, Steve Kargl wrote: >> > > On Thu, Nov 13, 2014 at 10:03:32AM -0800, Steve Kargl wrote: >> > >> On Thu, Nov 13, 2014 at 09:25:33AM -0800, Steve Kargl wrote: >> > >>> On Wed, Nov 12, 2014 at 02:42:13PM -0800, Steve Kargl wrote: >> > >>>> I have a kernel/world from r274273 sources, which is exhibiting a new >> > >>>> issue on my old laptop. Neither 'shutdown -p now' nor 'shutdown -r now' >> > >>>> work. I get to the end of shutdown and see for example >> > >>>> >> > >>>> All buffers synced >> > >>>> Uptime: 4h23m15s >> > >>>> >> > >>>> and then the laptop just sits there. It does not power off with >> > >>>> the -p option nor does it reboot with the -r. Has anyone else >> > >>>> seen this behavior? >> > >>>> >> > >>> >> > >>> The problem appears to be related to a recent change in the >> > >>> USB stack. If I have the following drive plugged into a >> > >>> usb port, the above behavior is observed on shutdown. >> > >>> >> > > >> > > Adding >> > > >> > > hw.usb.no_shutdown_wait: 1 >> > > >> > > to /boot/loader.conf appears to work around the 'shutdown -p now' >> > > and 'shutdown -r now' issue. Unfortunately, the bricking of the >> > > laptop is not affected by this sysctl. Once a device is plugged >> > > into a usb, it must remain plugged in. >> > > >> > >> > Hi, >> > >> > Is using this sysctl/tunable a suitable solution for you? >> > >> >> The sysctl is a suitable solution for the shutdown issues. >> It is not suitable solution for the general use of using >> a memory stick to for example quickly transfer files. Once >> the memory stick is plugged into the usb port, it must >> remain there unless one wants to reboot the system. >> >> I rebuilt the kernel with USB_DEBUG and CAMDEBUG enabled. >> I need to wade through a rather large /var/log/messages >> to see if anything appears unusual. >> > > Well, this has been a waste of a day. The problem is caused > by r273872. This is the recent random device patch. I have no > idea why removing a usb device would cause the system to lock > up other than random is probably trying to harvest some entropy. + des / markm That's a good catch! It's not a waste of a day. Thankyou for digging into it and finding out what introduced the failure. Hopefully between Hans, des and markm a solution can be found. -adrian