Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Jun 2005 15:10:45 +0200
From:      "Norbert Koch" <NKoch@demig.de>
To:        "Maksim Yevmenkin" <maksim.yevmenkin@savvis.net>
Cc:        "Freebsd-Hackers@Freebsd.Org" <freebsd-hackers@freebsd.org>
Subject:   kernel panic in usb0; was: RE: using vkbd device
Message-ID:  <000001c570e2$79541300$4801a8c0@ws-ew-3.W2KDEMIG>
In-Reply-To: <001e01c570ab$13e1a280$4801a8c0@ws-ew-3.W2KDEMIG>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
> 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




Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?000001c570e2$79541300$4801a8c0>