usb/114310: USB hub attachment panics kernel during libusb device scan

Victor Liu victor.liu at gmail.com
Fri Jul 6 20:40:12 UTC 2007


The following reply was made to PR usb/114310; it has been noted by GNATS.

From: "Victor Liu" <victor.liu at gmail.com>
To: "M. Warner Losh" <imp at bsdimp.com>
Cc: freebsd-usb at freebsd.org, bug-followup at 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 <imp at bsdimp.com> 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: <a58ca4220707061007w66ff866esba5adbd4781ac7ed at mail.gmail.com>
 >             "Victor Liu" <victor.liu at gmail.com> 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 <imp at bsdimp.com> wrote:
 > : > The following reply was made to PR usb/114310; it has been noted by GNATS.
 > : >
 > : > From: "M. Warner Losh" <imp at bsdimp.com>
 > : > To: victor.liu at gmail.com
 > : > Cc: freebsd-gnats-submit at 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 at freebsd.org mailing list
 > : > http://lists.freebsd.org/mailman/listinfo/freebsd-usb
 > : > To unsubscribe, send any mail to "freebsd-usb-unsubscribe at freebsd.org"
 > : >
 > :
 > :
 >


More information about the freebsd-usb mailing list