From owner-freebsd-usb@FreeBSD.ORG Mon Nov 1 14:38:38 2010 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id C5CAC1065698; Mon, 1 Nov 2010 14:38:38 +0000 (UTC) Date: Mon, 1 Nov 2010 14:38:38 +0000 From: Alexander Best To: Alexander Motin Message-ID: <20101101143838.GA64120@freebsd.org> References: <20101020153040.GA3184@freebsd.org> <201010201955.56816.hselasky@c2i.net> <4CC529CF.8000304@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4CC529CF.8000304@FreeBSD.org> Cc: freebsd-current@freebsd.org, freebsd-usb@freebsd.org Subject: Re: serious issue caused by usb device, stalling almost all operations 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: Mon, 01 Nov 2010 14:38:38 -0000 On Mon Oct 25 10, Alexander Motin wrote: > Hans Petter Selasky wrote: > > On Wednesday 20 October 2010 17:30:40 Alexander Best wrote: > >> hi there, > >> > >> i'm running HEAD (r213495; amd64). i stumbled upon this severe problem: > >> > >> after attaching my mobile phone, it simply resets without doing mount or > >> anything. however after letting the device come up again it won't show up > >> in the console. after detaching it the usb subsystem seemed to have > >> completely crashed. but that's not all. the following programs now simply > >> hang without producing any output C-C won't do anything: > >> > >> - dmesg > >> - top > >> - ps > >> - killall > >> - camcontrol devlist > >> - usbconfig > > > > That's most likely because USB's umass driver is waiting for cam to drain. > > Possibly some refcounting is not correct. I suspect this is not a USB problem. > > Try to enter into the debugger, and look for backtrace for function stuck in > > umass_detach. i set debug.kdb.panic=1, but didn't work, because writing the core dump stalled and watchdog came up. any advice? cheers. alex > > It is a bit suspicious that problem happens only when device dies during > request. Are you sure that running command was properly aborted when > device got detached? Every running command has own set of references, > denying detach. > > -- > Alexander Motin -- a13x