Distribution: Gentoo 1.4 (cvs) Hardware Environment: Athlon XP, MSI Kt 3 Ultra 2 (VIA VT8366/A/7) Software Environment: Linux 2.4.21, usb-storage, usb-uhci, ? I saw a page here saying "2.5 only", but since I cannot test it using a 2.5 kernel (it unfortunately messes with my xfs partitions and damages them), please accept this one :) The issue is: When I terminate the usb hotplug 20030501 I get a 'kernel BUG at base.c:914'... I'll try to attach a ksymoops thingie ...
Created attachment 569 [details] ksymoops traced output of the kernel
Created attachment 570 [details] My config kernel config file
This bug is reproduceable every time, so I can test stuff easily etc ;) The only patch I put over the vanilla kernel is the xfs patch, but that doesnt have anything to do with usb, does it ? Since this is a source based distro, I have everything in source, and I can use a debugger too ;)
Believe the "2.5" only comment :) This looks like a devfs bug, not a hotplug one too.
ok, *compiling 2.6.0-test1* lets see :)
Stock 2.6.0-test1. same error. The usb hid device is a Seiko Inklink. The usb storage device is a noname memory stick. ksymoops complain about not being able to find /proc/ksyms and doesnt do much.
Created attachment 571 [details] dmesg output before I issue /etc/init.d/hotplug stop
Created attachment 572 [details] dmesg output after I issue /etc/init.d/hotplug stop
Created attachment 573 [details] the error message as appearing on screen
Created attachment 574 [details] the ksymoops 'parsed' version... not really...
btw, I suspect this to happen in response to the rmmod calls in maybe_stop_usb in /etc/hotplug/usb.rc ... what next ?
Created attachment 575 [details] the kernel config for 2.6.0
Created attachment 576 [details] /etc/hotplug/usb.rc, gets called with "stop" as argument
Created attachment 577 [details] lsmod before /etc/init.d/hotplug stop
Created attachment 578 [details] lsmod after /etc/init.d/hotplug stop
as you can see, the "hid" module has been removed.
btw: you may be right that the culprit component is not hotplug, feel free to change it to devfs or something, if it is sure that that is the cause...
What does 'tree /dev/usb/' look like before you shutdown the usb stuff?
tree /dev/usb /dev/usb `-- hid `-- hiddev0
Okay, I reduced this to the following: This happens in single mode (without any user-space daemons running etc), with 2.6.0-test1, after booting, with only 1 usb device plugged, and that is the "Seiko Inklink Handwriting System". rmmod hid -> *boom* modprobe hid -> ok rmmod hid -> *boom* modprobe hid -> ok rmmod hid -> *boom* .... --> note that both the kernel module and the devfs entry for the hid *are* removed just like they should. What can I do to track this bug down ? (f.e. how can I fix ksymoops to actually do something with 2.5/2.6 ? :))
put the oops here that happens when you remove the hid driver.
drivers/usb/core/usb.c: deregistering driver hid usb 3-2: hcd_unlink_urb c6f42708 fail -22 usb 3-2: hcd_unlink_urb cb9d0f3c fail -22 drivers/usb/core/file.c: removing 96 minor devfs_remove: usb/hid/hiddev0 not found, cannot remove Call Trace: [<c01a515c>] devfs_remove+0x9c/0xa0 [<c0224d26>] snprintf+0x26/0x30 [<c02b2ad0>] usb_deregister_dev+0x70/0x90 [<c015a050>] lookup_hash+0x20/0x30 [<d083de0f>] hiddev_cleanup+0x1f/0x40 [hid] [<d083d8a9>] hid_disconnect+0xb9/0xe0 [hid] [<c02aa596>] usb_device_remove+0x66/0x70 [<c0289afe>] device_release_driver+0x5e/0x60 [<c0289b22>] driver_detach+0x22/0x40 [<c0289d7b>] bus_remove_driver+0x3b/0x70 [<c028a194>] driver_unregister+0x14/0x26 [<c02aa67a>] usb_deregister+0x2a/0x40 [<d08403e7>] hid_exit+0x17/0x20 [hid] [<c012d035>] sys_delete_module+0x125/0x180 [<c01427ca>] do_munmap+0x12a/0x180 [<c0142863>] sys_munmap+0x43/0x60 [<c010913f>] syscall_call+0x7/0xb
despite the error message, the /dev/usb/hid/hiddev0 is there after the modprobe, until the rmmod, and then it is gone. So I dunno why that error message appears, anyways :)
devfs is no longer available as of 2.6.13-rc1.