Detaching USB stick crashes BETA4/BETA5

Alexandre "Sunny" Kovalenko Alex.Kovalenko at verizon.net
Tue Sep 21 18:27:07 PDT 2004


On Tue, 2004-09-21 at 20:36, M. Warner Losh wrote:
> In message: <1095812538.2535.36.camel at RabbitsDen>
>             "Alexandre \"Sunny\" Kovalenko" <Alex.Kovalenko at verizon.net> writes:
> : On Tue, 2004-09-21 at 07:09, Lutz Bichler wrote:
> : > On Tuesday 21 September 2004 06:59, you wrote:
> : > > This may be my fault.  Any chance you can give me a traceback?
> : > 
> : > I would like to, but i cannot get a crash dump. Tried the kernel debugger 
> : > (option DDB) an got the following trace:
> : > 
> : > db> trace
> : > kobj_delete(c1e2ab80,c068c6a0,c1e28180,cc726c2c,c04862e2) at kobj_delete+0x14
> : > device_delete_child(c1ef6c80, c1e2ab80,c16v4200,c16c4200,0) at 
> : > device_delete_child+0xb1
> : > usb_disconnect_port(c1f21870,c1ef6c80,cc726c50,c1614bc0,c1ef6c80) at 
> : > usb_disconnect_port+0xd2
> : > uhub_detach(c1ef6c80,c1578874,c067dfc4,c1ef6c80,0) at uhub_detach+0x7e
> : > device_detach(c1ef6c80,c1e2ab80,c1ef6b00,cc726ca8,c04862e2) at 
> : > device_detach+0x6a
> : > device_delete_child(c15b4880,c1ef6c80,c15bda80,c15bda80,3) at 
> : > device_delete_child+0x3f
> : > usb_disconnect_port(c15b4430,c15b4880,10,c04dca9c,c15ca210) at 
> : > usb_disconnect_port+0xd2
> : > uhub_explore(c15b8900,c15d3140,cc726d10,c0482e48,c15d3140) at 
> : > uhub_explore+0x1be
> : > usb_discover(c15d3140,0,5c,c065d8d9,1770) at usb_discover+0x35
> : > usb_event:_thread(c15d3140,cc726d48,0,0,0) at usb_event_thread+0x88
> : > fork_exit(c0482dc0,c15d3140,cc726d48) at fork_exit+0x80
> : > fork_trampoline() at for_trampoline+0x8
> : > --- trap 0x1, eip = 0, esp = 0xcc726d7c, ebp = 0 ---
> : > db>
> : > 
> : > Regards
> : >  Lutz
> : > _______________________________________________
> : > freebsd-current at freebsd.org mailing list
> : > http://lists.freebsd.org/mailman/listinfo/freebsd-current
> : > To unsubscribe, send any mail to "freebsd-current-unsubscribe at freebsd.org"
> : I was able to get crash dump in the situation that looks similar to one
> : above and posted my explorations to this list (see "Re: usb hub
> : disconnect crashes 5.3-BETA4 hard"). If you think they are relevant or
> : useful, let me know and I can resend it to you privately. I am running
> : -current though.
> 
> Ian Dowse also is having problems in this area.  He suggested the
> following patch to me.  I have some concerns about the patch, but they
> are theoretical (what does it mean when a parent is detached, but all
> its children are attached?), but given the current state of the newbus
> code it will fix the problem for you.
> 
> Warner
> 
> Index: usb_port.h
> ===================================================================
> RCS file: /dump/FreeBSD-CVS/src/sys/dev/usb/usb_port.h,v
> retrieving revision 1.67
> diff -u -r1.67 usb_port.h
> --- usb_port.h	15 Aug 2004 23:39:18 -0000	1.67
> +++ usb_port.h	21 Sep 2004 23:46:27 -0000
> @@ -422,6 +422,7 @@
>  #define config_detach(dev, flag) \
>  	do { \
>  		free(device_get_ivars(dev), M_USB); \
> +		device_detach(dev); \
>  		device_delete_child(device_get_parent(dev), dev); \
>  	} while (0);
>  
> _______________________________________________
> freebsd-current at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe at freebsd.org"
I can confirm that with this patch system does not crash no matter how
many times I plug and unplug the hub with plenty of devices attached to
it. System in question is 6.0 current as of 9/18.

Thank you very much.
---
Alexandre "Sunny" Kovalenko.



More information about the freebsd-current mailing list