From owner-freebsd-usb@FreeBSD.ORG Fri Jul 6 20:40:12 2007 Return-Path: X-Original-To: freebsd-usb@hub.freebsd.org Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A4D7C16A400 for ; Fri, 6 Jul 2007 20:40:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 7B60413C448 for ; Fri, 6 Jul 2007 20:40:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l66KeBBZ033524 for ; Fri, 6 Jul 2007 20:40:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l66KeBE7033521; Fri, 6 Jul 2007 20:40:11 GMT (envelope-from gnats) Date: Fri, 6 Jul 2007 20:40:11 GMT Message-Id: <200707062040.l66KeBE7033521@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: "Victor Liu" Cc: 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 Reply-To: Victor Liu 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:40:12 -0000 The following reply was made to PR usb/114310; it has been noted by GNATS. From: "Victor Liu" To: "M. Warner Losh" Cc: freebsd-usb@freebsd.org, bug-followup@freebsd.org Subject: Re: usb/114310: USB hub attachment panics kernel during libusb device scan Date: Fri, 6 Jul 2007 13:08:05 -0700 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" > : > > : > : >