From owner-freebsd-dtrace@freebsd.org Thu Mar 31 17:43:07 2016 Return-Path: Delivered-To: freebsd-dtrace@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 B5437AE3891; Thu, 31 Mar 2016 17:43:07 +0000 (UTC) (envelope-from mail@eax.me) Received: from relay12.nicmail.ru (relay12.nicmail.ru [195.208.5.7]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69B0F106F; Thu, 31 Mar 2016 17:43:06 +0000 (UTC) (envelope-from mail@eax.me) Received: from [109.70.25.214] (port=50579 helo=portege) by f06.mail.nic.ru with esmtp (Exim 5.55) (envelope-from ) id 1algch-000Ln7-0H; Thu, 31 Mar 2016 20:43:11 +0300 Received: from [188.123.231.37] (account mail@eax.me HELO portege) by proxy01.mail.nic.ru (Exim 5.55) with id 1algcT-0007Et-8Q; Thu, 31 Mar 2016 20:42:57 +0300 Date: Thu, 31 Mar 2016 20:42:56 +0300 From: Aleksander Alekseev To: Adrian Chadd Cc: Hans Petter Selasky , "freebsd-hackers@freebsd.org" , Andriy Voskoboinyk , freebsd-dtrace@freebsd.org Subject: Re: I need a little help in fixing `exclusive sleep mutex urtwn0_com_lock` in CURRENT Message-ID: <20160331204256.5cb1fdaf@portege> In-Reply-To: References: <20160330123048.3361a9e4@fujitsu> <56FBBC62.6040905@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "A discussion list for developers working on DTrace in FreeBSD." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Mar 2016 17:43:07 -0000 > 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? By any chance is it possible to trace mtx_lock / mtx_unlock calls using DTrace? I see number of probes in `dtrace -l` which look like something I need. Unfortunately they are named like knlist_mtx_lock or do_lock_umutex so I can't figure out whether these are probes I looking for or not. cc: freebsd-dtrace@ -- Best regards, Aleksander Alekseev http://eax.me/