From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 14 13:11:17 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7D1AE16A41C for ; Tue, 14 Jun 2005 13:11:17 +0000 (GMT) (envelope-from NKoch@demig.de) Received: from server.absolute-media.de (server.absolute-media.de [213.239.231.9]) by mx1.FreeBSD.org (Postfix) with ESMTP id E71F843D1F for ; Tue, 14 Jun 2005 13:11:16 +0000 (GMT) (envelope-from NKoch@demig.de) Received: from localhost (unknown [127.0.0.1]) by server.absolute-media.de (Postfix) with ESMTP id 2209E85959; Tue, 14 Jun 2005 15:11:14 +0200 (CEST) Received: from server.absolute-media.de ([127.0.0.1]) by localhost (server [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 05331-09; Tue, 14 Jun 2005 15:11:09 +0200 (CEST) Received: from firewall.demig (p50839636.dip0.t-ipconnect.de [80.131.150.54]) by server.absolute-media.de (Postfix) with ESMTP id 405FA85616; Tue, 14 Jun 2005 15:11:09 +0200 (CEST) Received: from ws-ew-3 (ws-ew-3.w2kdemig [192.168.1.72]) by firewall.demig (8.13.4/8.13.1) with SMTP id j5EDAjMM043204; Tue, 14 Jun 2005 15:10:45 +0200 (CEST) (envelope-from NKoch@demig.de) From: "Norbert Koch" To: "Maksim Yevmenkin" Date: Tue, 14 Jun 2005 15:10:45 +0200 Message-ID: <000001c570e2$79541300$4801a8c0@ws-ew-3.W2KDEMIG> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 Importance: Normal In-Reply-To: <001e01c570ab$13e1a280$4801a8c0@ws-ew-3.W2KDEMIG> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2120.0 X-Virus-Scanned: by amavisd-new X-Virus-Scanned: by amavisd-new at absolute-media.de Cc: "Freebsd-Hackers@Freebsd.Org" Subject: kernel panic in usb0; was: RE: using vkbd device X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2005 13:11:17 -0000 > The ukbd-specific detaching only works, because I implemented something in > ukbd.c, > that Hans Petter Selasky [hselasky@c2i.net] suggested in thread > "usbd.conf: > detach ukbd". > (See the patch files, I posted there) > > When the kernel panics, it does this in usb0 kernel thread. > I figured out that this is only related to connecting/disconnecting > the usb keyboard. It panics without kbdmux loaded and it panics with > unmodified ukbd.c. So I'll have to try to remote debug it, as > my embedded device has no swap space at all and so no core dump device > (256MB flash/256 MD dram). Hello, I am observing spurious crashes in usb0 under FreeBSD 4.11. Kernel configuration/hardware: HZ=400, NO_SWAPPING, DEVICE_POLLING (with kern.polling.user_frac=90), fxp ethernet, 6x sio, ohci, Pentium MMX 166 MHz When quickly connecting/disconnecting a usb keyboard, after some time I have a panic in process 3 (usb0), either at usbd_ar_pipe+0x7 (when detaching) or at usbd_get_interface_descriptor+0x6 (when attaching). Stack traces are: (a) usbd_ar_pipe+0x7 usbd_ar_pipe(0,...) usbd_abort_pipe(0,...) ukbd_enable_intr() ukbd_term() ukbd_detach() DEVICE_DETACH() device_detach() device_delete_child() usb_discommect_port() uhub_explore() usb_discover() usb_event_thread() (b) usbd_get_interface_descriptor+0x6 usbd_get_interface_descriptor(0) ukbd_attach(c0bf3b80) DEVICE_ATTACH() device_probe_and_attach() usbd_probe_and_attach() usbd_new_device() uhub_explore() usb_discover() usb_event_thread() In situation(a), ipl is at bio, ks_intr_pipe is NULL when calling usbd_abort_pipe(). In situation (b), ipl is at none, USB_ATTACH_START() in USB_ATTACK(ukbd) in ukbd.c seems to make problems. The above stack traces are from ddb. Booting the kernel with -gd and using gdb -k didn't give more information. I almost always get an unusable empty stack trace and different crash addresses. It seems like 'usbd_setup_pipe: failed to start endpoint, IOERROR' always comes before the crash and ipl is mostly at bio, never at usb. When I'm doing these tests, I have an ssh console connected through fxp0 where I run usbd -dv. Any idea? Norbert