From owner-freebsd-usb@FreeBSD.ORG Fri Jul 6 20:08:05 2007 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C3C6F16A41F for ; Fri, 6 Jul 2007 20:08:05 +0000 (UTC) (envelope-from victor.liu@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.179]) by mx1.freebsd.org (Postfix) with ESMTP id 9DC9513C4BE for ; Fri, 6 Jul 2007 20:08:05 +0000 (UTC) (envelope-from victor.liu@gmail.com) Received: by wa-out-1112.google.com with SMTP id j37so403552waf for ; Fri, 06 Jul 2007 13:08:05 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=CcgGFJ5aAbVkniB2nBW/vHM1kOgNXTz98QdTU5ukF9R2JQbBGYXwaQweYxHQH0reLQZZXPT4rf4gYI13Mq7LNV1hpIjTygrtzet4SvUxdUlrpbYxUZBhoMoJrkEfsJZuTr4drt7D+/YbLUMCirKqYpjV0ngoBQh0hD6jazQ7LNo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=A3hlLJy2w0J33cHSzRZ+2E90WWhV44JallnhCg5/rk8C8vWufqgwe/c5EE73FPvrJTMe+7n5zUQKADme6jlIOcUV68TSUECIMgP/sUNml/z66dSgTsr+mBkkUNcF+CaCdWU8F03o7AAKeZA4DdyWCbeyrGUhDPj0d3BrvKSKab4= Received: by 10.114.106.1 with SMTP id e1mr971394wac.1183752485248; Fri, 06 Jul 2007 13:08:05 -0700 (PDT) Received: by 10.114.75.11 with HTTP; Fri, 6 Jul 2007 13:08:05 -0700 (PDT) Message-ID: Date: Fri, 6 Jul 2007 13:08:05 -0700 From: "Victor Liu" To: "M. Warner Losh" In-Reply-To: <20070706.133037.-1540390124.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200707050410.l654AARS029968@freefall.freebsd.org> <20070706.133037.-1540390124.imp@bsdimp.com> Cc: bug-followup@freebsd.org, freebsd-usb@freebsd.org Subject: Re: usb/114310: USB hub attachment panics kernel during libusb device scan 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: Fri, 06 Jul 2007 20:08:05 -0000 Here is the code I just used to panic it just now (requires libusb): /////////// usbtest.c: #include "/usr/local/include/usb.h" int main(int argc, char **argv){ while(1){ usb_init (); usb_find_busses (); usb_find_devices (); } return 0; } //////////// Makefile: CC=gcc LD=ld CFLAGS = -g -c -Wall all: usbtest.o $(CC) -o usbtest usbtest.o /usr/local/lib/libusb.a clean: rm -f usbtest usbtest.tgz *.o *~ It took me about 15 plug-in/unplug cycles to get it to crash (sometimes as many as 30 during previous testing when I'm unlucky). There's about a 200ms window during which the panic will occur, and it's hard to say exactly when that is. You can probably add a printf to given an indication of where in the loop you're plugging in the hub, so you can change the timing around a bit. -victor On 7/6/07, M. Warner Losh wrote: > Thanks for the update Victor. > > I can't get it to happen in current. Maybe I'm doing something > differently than you. Do you have an easy recipe for causing the > panic? > > Warner > > In message: > "Victor Liu" writes: > : Managed to find a newer box, and yes, I could duplicate the panic > : within less than 10 attachments. uname -a: > : FreeBSD xxxxxxxxxxxxxxxxxx 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan > : 12 11:05:30 UTC 2007 > : xxxxxxxxxxxxxxxxxxxxxxxxxxxx:/usr/obj/usr/src/sys/SMP i386 > : > : -victor > : > : On 7/4/07, M. Warner Losh wrote: > : > The following reply was made to PR usb/114310; it has been noted by GNATS. > : > > : > From: "M. Warner Losh" > : > To: victor.liu@gmail.com > : > Cc: freebsd-gnats-submit@FreeBSD.org > : > Subject: Re: usb/114310: USB hub attachment panics kernel during libusb > : > device scan > : > Date: Wed, 04 Jul 2007 22:03:35 -0600 (MDT) > : > > : > Would you happen to know if this happens on FreeBSD -current? > : > > : > Warner > : > _______________________________________________ > : > freebsd-usb@freebsd.org mailing list > : > http://lists.freebsd.org/mailman/listinfo/freebsd-usb > : > To unsubscribe, send any mail to "freebsd-usb-unsubscribe@freebsd.org" > : > > : > : >