From owner-freebsd-current@FreeBSD.ORG Wed Sep 22 00:36:48 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0416516A4CE for ; Wed, 22 Sep 2004 00:36:48 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 64AD043D45 for ; Wed, 22 Sep 2004 00:36:47 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (harmony.village.org [10.0.0.6]) by harmony.village.org (8.13.1/8.13.1) with ESMTP id i8M0Zmj4087971; Tue, 21 Sep 2004 18:35:49 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 21 Sep 2004 18:36:50 -0600 (MDT) Message-Id: <20040921.183650.28787484.imp@bsdimp.com> To: Alex.Kovalenko@verizon.net From: "M. Warner Losh" In-Reply-To: <1095812538.2535.36.camel@RabbitsDen> References: <20040920.225931.29867687.imp@bsdimp.com> <200409211309.25428.Lutz.Bichler@unibw-muenchen.de> <1095812538.2535.36.camel@RabbitsDen> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: current@freebsd.org Subject: Re: Detaching USB stick crashes BETA4/BETA5 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Sep 2004 00:36:48 -0000 In message: <1095812538.2535.36.camel@RabbitsDen> "Alexandre \"Sunny\" Kovalenko" 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@freebsd.org mailing list : > http://lists.freebsd.org/mailman/listinfo/freebsd-current : > To unsubscribe, send any mail to "freebsd-current-unsubscribe@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);