From owner-freebsd-current@FreeBSD.ORG Mon Mar 8 13:59:41 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B4E51065670; Mon, 8 Mar 2010 13:59:41 +0000 (UTC) (envelope-from giovanni.trematerra@gmail.com) Received: from mail-fx0-f223.google.com (mail-fx0-f223.google.com [209.85.220.223]) by mx1.freebsd.org (Postfix) with ESMTP id 77BBB8FC14; Mon, 8 Mar 2010 13:59:40 +0000 (UTC) Received: by fxm23 with SMTP id 23so4785746fxm.3 for ; Mon, 08 Mar 2010 05:59:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=pxMjNWa0CYaQM7ISYgE0ySI+RbCVv2uD6+FwYij4Vug=; b=AqJSzm/PB2UVckXQwEVWRacOVqPbJMVMN491M3R2ePMTqg5AgLKunFq0vN3VPzIH8y zItFiPebCGsnB4msFFWVqopVGqK2jCWKJGOPEMLEpc3oHp1iMjSZPTCiUGwulBwLxXlq l/dMGkiyWRpFc90vwM7XpfIoFv5QeCa4gmiKE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=UArpe/4IS7OGSTan3Vpv3pILjWc42F0/DB7FY7YjrsKCeKMHwoapu/4HIoAjr2npeU 1LA3hnydpGrLJUgt8E0UPrieXQaffqJiEO0gWqXymej56gjHGD/XmFj+NTBib6kWTdQg Sxnm7IFywf0+iam1SXfZW3U4BaGstrrBwMvEM= MIME-Version: 1.0 Received: by 10.223.100.214 with SMTP id z22mr5569348fan.104.1268056779326; Mon, 08 Mar 2010 05:59:39 -0800 (PST) In-Reply-To: <7d6fde3d1003070224k3626a9b5y98c11a43eef1bed4@mail.gmail.com> References: <7d6fde3d1003070207q621e69ado2cb64e431feacd76@mail.gmail.com> <7d6fde3d1003070224k3626a9b5y98c11a43eef1bed4@mail.gmail.com> Date: Mon, 8 Mar 2010 14:59:39 +0100 Message-ID: <4e6cba831003080559p128e741em649030480a49153f@mail.gmail.com> From: Giovanni Trematerra To: Garrett Cooper Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Alexander Motin , FreeBSD Current Subject: Re: Removing USB keyboard after filesystems synced causes panic with destroyed mutex twa(4)? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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, 08 Mar 2010 13:59:41 -0000 On Sun, Mar 7, 2010 at 11:24 AM, Garrett Cooper wrote: > On Sun, Mar 7, 2010 at 2:07 AM, Garrett Cooper wrote= : >> Hi Alexander and Hans, >> =A0 =A0I recently did the following which generated a panic on a >> 9-CURRENT kernel compiled on the 26th: >> >> 1. Executed reboot >> 2. Removed keyboard. >> 3. Some time after `All buffers synced\nUptime: ...' was displayed, >> the keyboard was registered disconnected. >> 4. The interrupt was delivered to my twa(4) enabled card and the >> kernel panicked, like so: >> >> ugen2.2: at usbus2 (disconnected) >> uhub8: at uhub2, port 1, addr 2 (disconnected) >> ugen2.3: at usbus2 (disconnected) >> ukbd0: at uhub8, port 3, addr 3 (disconnected) >> uhid0: at uhub8, port 3, addr 3 (disconnected) >> panic: mtx_lock_spin() of destroyed mutex @ /usr/src/sys/dev/twa/tw_cl_i= ntr.c:88 >> >> cpuid =3D 1 >> KDB: enter: panic >> [thread pid 12 tid 100025 ] >> Stopped at =A0 =A0 =A0 =A0 kdb_enter+0x3d: movq =A0 =A0 $0,0x40289c(%rip= ) >> db> >> >> =A0 =A0I wish I could provide you with more details, but unfortunately I >> the USB bus isn't registering the fact that I'm reattaching the >> keyboard right now and the box won't reboot automatically :( (didn't >> set the right sysctl beforehand to panic automatically). I'll try and >> reproduce the issue again, but I was just wondering whether or not you >> guys had seen this problem before. > > =A0 =A0Phew... it's reproducible with that kernel. Here's what I did > exactly (because my original directions were incorrect): > =A0 =A01. Hit power button (for S5). > =A0 =A02. Disconnect keyboard RIGHT as `Uptime: ...' is displayed. > =A0 =A0Kernel panicked on my system again. Now to figure out if it still > exists with a kernel compiled today, and also how to debug it if it > still does exist :/... I thinks that's a race in twa driver. You could unplug another USB device different from your keyboard and you should still got the panic. If you get the panic again try to show at least the following information: bt; show pcpu; show alllocks; show locks; ps Thank you -- Gianni