From owner-freebsd-current@FreeBSD.ORG Mon Nov 17 01:45:58 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7346A84C; Mon, 17 Nov 2014 01:45:58 +0000 (UTC) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "troutmask.apl.washington.edu", Issuer "troutmask.apl.washington.edu" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B4B9855; Mon, 17 Nov 2014 01:45:58 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.9/8.14.9) with ESMTP id sAH1jvwK038210 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 16 Nov 2014 17:45:57 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.9/8.14.9/Submit) id sAH1jusS038209; Sun, 16 Nov 2014 17:45:56 -0800 (PST) (envelope-from sgk) Date: Sun, 16 Nov 2014 17:45:56 -0800 From: Steve Kargl To: Hans Petter Selasky Subject: Re: USB locks up system -- WAS Re: shutdown or acpi problem Message-ID: <20141117014556.GA38184@troutmask.apl.washington.edu> References: <1416162070.4781.186.camel@revolution.hippie.lan> <1416162718.4781.192.camel@revolution.hippie.lan> <4F3B4E02-0ADD-46EB-BB90-BF360E810585@FreeBSD.org> <20141116185141.GB36021@troutmask.apl.washington.edu> <4443FEFB-17F1-4516-959F-4C70AB2A4382@FreeBSD.org> <20141116190344.GC36021@troutmask.apl.washington.edu> <5468F814.6010702@selasky.org> <20141116192959.GB36339@troutmask.apl.washington.edu> <5468FBFB.1090208@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5468FBFB.1090208@selasky.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Adrian Chadd , freebsd-current , Dag-Erling Sm?rgrav , Ian Lepore 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: Mon, 17 Nov 2014 01:45:58 -0000 On Sun, Nov 16, 2014 at 08:33:15PM +0100, Hans Petter Selasky wrote: > > thread apply all bt > > That will give you the backtrace of all threads. Grep for usbconfig, and > figure out which line is causing the problem in the kernel. Then look at > the USB explore threads and see where they are stuck in the detach of umass! > I haven't tried the kgdb approach, yet. I can say that the problem is coming from sg device. If I have 'device sg' in my config file, the problems occur. Removing 'device sg' gives a working kernel. If I do not start hald in /etc/rc.conf, everything works as expected. Now, if hald was started at boot and I then stop hald with '/usr/local/etc/rc.d/hald stop' then the one hald relate process is not stopped. I've wrapped lines to keep this short. % ps axl | grep hald UID PID PPID CPU PRI NI VSZ RSS MWCHAN STAT TT TIME COMMAND 0 1058 1 195 20 0 13180 3512 - I - 0:00.05 hald-probe-storage: /dev/sg1 (hald-probe-storage) Using the procstat as suggested by Adrian, I have % procstat -ka 1058 100157 hald-probe-storage hald-probe-stora mi_switch sleepq_switch sleepq_catch_signals sleepq_wait_sig _sleep sgread giant_read devfs_read_f dofileread kern_readv sys_read syscall Xint0x80_syscall -- Steve