The following reply was made to PR usb/114310; it has been noted by GNATS.
From: "Victor Liu" <[EMAIL PROTECTED]>
To: "M. Warner Losh" <[EMAIL PROTECTED]>
Cc: [email protected], [EMAIL PROTECTED]
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 <[EMAIL PROTECTED]> 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: <[EMAIL PROTECTED]>
> "Victor Liu" <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> wrote:
> : > The following reply was made to PR usb/114310; it has been noted by
> GNATS.
> : >
> : > From: "M. Warner Losh" <[EMAIL PROTECTED]>
> : > To: [EMAIL PROTECTED]
> : > Cc: [EMAIL PROTECTED]
> : > 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
> : > _______________________________________________
> : > [email protected] mailing list
> : > http://lists.freebsd.org/mailman/listinfo/freebsd-usb
> : > To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> : >
> :
> :
>
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[EMAIL PROTECTED]"