From owner-freebsd-hackers@freebsd.org Wed Mar 30 09:44:42 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C58C6AE17CE for ; Wed, 30 Mar 2016 09:44:42 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9142A1E0C; Wed, 30 Mar 2016 09:44:42 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 888FE1FE023; Wed, 30 Mar 2016 11:44:40 +0200 (CEST) Subject: Re: I need a little help in fixing `exclusive sleep mutex urtwn0_com_lock` in CURRENT To: Aleksander Alekseev , freebsd-hackers@freebsd.org, Adrian Chadd References: <20160330123048.3361a9e4@fujitsu> From: Hans Petter Selasky Message-ID: <56FBA0C0.8030809@selasky.org> Date: Wed, 30 Mar 2016 11:47:44 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <20160330123048.3361a9e4@fujitsu> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2016 09:44:42 -0000 On 03/30/16 11:30, Aleksander Alekseev wrote: > So as I understand some code acquired a mutex and didn't release it. > And naturally it has something to do with USB. Now how can I figure out > what code acquired this lock? Best approach I can think of currently is > to find all places where this lock is accessed and add a debug logging. > But perhaps there is a better way? Looks like the USB driver or WLAN stack needs to drain this taskqueue before detaching. Maybe Adrian knows? --HPS