From owner-freebsd-usb@FreeBSD.ORG Tue Nov 2 11:24:20 2010 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B34101065672; Tue, 2 Nov 2010 11:24:20 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id 43ADD8FC1B; Tue, 2 Nov 2010 11:24:20 +0000 (UTC) Received: from outgoing.leidinger.net (p57B3A76A.dip.t-dialin.net [87.179.167.106]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 1785984400D; Tue, 2 Nov 2010 12:24:17 +0100 (CET) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id BB1421453; Tue, 2 Nov 2010 12:24:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1288697053; bh=cxY4IIbBWTqZoFYjrpSMLobAmCwiR4CPs5aPtvt8akk=; h=Message-ID:Date:From:To:Cc:Subject:References:In-Reply-To: MIME-Version:Content-Type:Content-Transfer-Encoding; b=n+03Rv354v/mhXJ2GrToAHta/FwWLcgdxGuTa2ZuPm9C4nlJktbkm/+pcGVgmunPS /AKSEyzuCxwl0252f4B0fglu/Pcz2KfJP+zMF3AInLy/dLn18vqF1HSo57XkdrcAMb Q5m8I5/JrgV4OWwzAYdvua2WLF9WP7xfmG7gTo9pr3weLaZ6HBf/vIneAK1J+nFksO HUE5Yke3qToYZl9VoeqOnmKef0PGi15JjRqkQGDORhC7dHHFTx5AJL2KdN/OND2AKJ GNrcDUtaO7eGZ6wvZEmmm3MS00LzwIW7O8ChP35vj5GdXLPAVAAN3f/7w21KU76U22 4ghVKqeo8u4hA== Received: (from www@localhost) by webmail.leidinger.net (8.14.4/8.13.8/Submit) id oA2BOCwl075270; Tue, 2 Nov 2010 12:24:12 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from pslux.ec.europa.eu (pslux.ec.europa.eu [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Tue, 02 Nov 2010 12:24:10 +0100 Message-ID: <20101102122410.1227532bno09pfs4@webmail.leidinger.net> Date: Tue, 02 Nov 2010 12:24:10 +0100 From: Alexander Leidinger To: Alexander Motin References: <20101102103208.45064dxs60sp833w@webmail.leidinger.net> <201011021036.41617.hselasky@freebsd.org> <20101102110134.53027bx6btjokpgc@webmail.leidinger.net> <4CCFFDC9.1040002@FreeBSD.org> In-Reply-To: <4CCFFDC9.1040002@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.4) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 1785984400D.A7625 X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-0.423, required 6, autolearn=disabled, ALL_TRUSTED -1.00, DKIM_SIGNED 0.10, DKIM_VALID -0.10, DKIM_VALID_AU -0.10, J_CHICKENPOX_45 0.60, TW_KD 0.08) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1289301857.70195@AVjC6746S8QygavbYjEHBg X-EBL-Spam-Status: No Cc: Hans Petter Selasky , freebsd-usb@FreeBSD.org Subject: Re: usbconfig reset ugen4.2 hanging since an hour X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Nov 2010 11:24:20 -0000 Quoting Alexander Motin (from Tue, 02 Nov 2010 14:02:17 +0200): > Alexander Leidinger wrote: >> >> Quoting Hans Petter Selasky (from Tue, 2 Nov 2010 >> 10:36:41 +0100): >>> If you dump all threads in this state I think you will see that USB is >>> waiting >> >> # procstat -kk 29213 >> PID TID COMM TDNAME KSTACK >> 29213 100291 usbconfig - mi_switch+0x188 >> sleepq_switch+0x13c sleepq_timedwait+0x40 _sleep+0x320 pause+0x30 >> usb_pause_mtx+0x94 usb_ioctl+0x171 devfs_ioctl_f+0x73 kern_ioctl+0x9d >> ioctl+0xc5 syscallenter+0x1af syscall+0x34 Xint0x80_syscall+0x21 >> >>> somewhere in umass_detach(), which is preventing the usbconfig reset from >> >> No umass_detach in there... > > umass_detach() (if there) should be in some other thread. Not here: ---snip--- # procstat -kka | grep umass_detach ---snip--- >>> grabbing the SX-lock associated with serialisation. Because >>> umass_detach() is >>> not returning we are stuck. >> >> And there is no way to use some kind of timeout for cases which cause >> problem reports (like umass_detach() and maybe this one)? I could >> imagine several possibilities: usbconfig tries a trylock first (maybe >> several times) and if it does not succeed in a specified timeperiode, it >> returns an error. Adidtionally there is maybe the possibility to >> determine if a command did not finish in a given timeperiode and print >> out a warning message (syslog) to have an indication, that somthing is >> not in a good condition. > > Not sure what should it give. We should track the real problem, not the > consequences. Possible reason could be that due to some error umass/CAM > leaked some references, which made impossible to destroy CAM bus on > stick disconnection. But to diagnose it we need much more info. Something I could provide? Some kdb magic I could copy&paste? Bye, Alexander. -- Phosflink, v.: To flick a bulb on and off when it burns out (as if, somehow, that will bring it back to life). -- Rich Hall & Friends, "Sniglets" http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137