I was debugging an Alsa/snd-usb-audio problem where a USB Midi device is not seen until I do a cable pull. The Alsa developers said that probably my hotplug scripts weren't getting run, so I tried turning hotplug on for either boot or default. Either way, when I boot I get a lot of script text on the boot console. I get so much text that the buffer overruns and I Cannot go back to the beginning and read it. (Can I make this buffer deeper?) But worse, when shutting down the machine hangs and the only way out is a reboot. This may be releated to Bug #35791. It looks pretty similar, but it's a pretty different set of conditions I think. I have tried re-emerging all of Alsa, hotplug and a few other things. No change. Reproducible: Always Steps to Reproduce: 1. emerge hotplug 2. rc-update add hotplug default 3. reboot to strt hotplug 4. shutdown -h now Actual Results: The machine goes to shutdown, and then gets to the following state: Stopping USB and PCI hot plugging... usb.c: deregistering driver hiddev... usb.c: deregistering driver hid... devfs_put(c3e427c0): poisoned pointer Forcing Oops kernel BUG at base.c: 914 Then I get a bunch of kernel register data and stuff, and then: /etc/hotplug/usb.rc: Line 370: 5943 segmentation fault rmmod hid>/dev/null 2>&1 * Unloading Alsa [OK] * Storing Alsa mixer levels [OK] * Unloading modules <6> usb.c: deregistering driver snd-usb-audio and at this point the machine is hung. Expected Results: Shut down cleanly Wizard root # emerge info Portage 2.0.49-r20 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.4.22-gentoo-r2) ================================================================= System uname: 2.4.22-gentoo-r2 i686 AMD Athlon(TM) XP 2600+ Gentoo Base System version 1.4.3.12 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-mcpu=athlon-xp -O3 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-mcpu=athlon-xp -O3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X aalib alsa apm arts avi berkdb bonobo cdr crypt cups dvd dvdr encode esd foomaticdb gdbm gif gnome gpm gtk gtk2 gtkhtml guile imlib jack jack-caps jack-tmpfs java jpeg kde libg++ libwww mad mikmod motif mozilla mpeg ncurses nls oggvorbis opengl oss pam pdflib perl png python qt quicktime readline sdl slang spell ssl svga tcltk tcpd truetype x86 xml2 xmms xv zlib video_cards_radeon" Wizard root #
More info: 1) /etc/init.d/hotplug stop before shutting down allows the machien to shut down. 2) Doing an rmmod snd-usb-audio before shutting down does NOT let the machine shut down . 3) Starting hotplug in a terminal and saving the output yields: ^[[32;01m*^[[0m Starting USB and PCI hotplugging... ** can't synthesize input events - /proc/bus/input/devices missing ACTION=add AWK=/bin/gawk BASH=/bin/bash BASH_VERSINFO=([0]="2" [1]="05b" [2]="0" [3]="1" [4]="release" [5]="i686-pc-linux-gnu") BASH_VERSION='2.05b.0(1)-release' BOOTLEVEL=boot <SNIP> This may be the same as bug #37375
Should be fixed in latest release.
Created attachment 27698 [details] /etc/init.d/hotplug start messages
I haven't tried a shutdown with hotplug turned on yet, but I'm still getting lots of junk in my terminal if I try and start it. This version stops cleanly which I think the older one did not. Is 3/11 new enough? Maybe my rsync server hasn't picked up somethign newer. Wizard root # /etc/init.d/hotplug stop * Stopping USB and PCI hotplugging... [ ok ] Wizard root # /etc/init.d/hotplug start >hotplug.txt /etc/hotplug/pci.rc: line 50: [: missing `]' /etc/hotplug/pci.rc: line 51: -o: command not found modules.usbmap unparsable line: . modules.usbmap unparsable line: . modules.usbmap unparsable line: . modules.usbmap unparsable line: . modules.usbmap unparsable line: . modules.usbmap unparsable line: . modules.usbmap unparsable line: . modules.usbmap unparsable line: . modules.usbmap unparsable line: . modules.usbmap unparsable line: . modules.usbmap unparsable line: . modules.usbmap unparsable line: . Wizard root # ACCEPT_KEYWORDS="~x86" emerge -pv hotplug These are the packages that I would merge, in order: Calculating dependencies ...done! [ebuild R ] sys-apps/hotplug-20040311 0 kB Total size of downloads: 0 kB Wizard root #