Opened 12 years ago

Closed 12 years ago

#3010 closed defect (fixed)

Instructions to autoload wrapper modules (like snd-pcm-oss) need updating with kmod

Reported by: Bryan Kadzban Owned by: Bryan Kadzban
Priority: normal Milestone: 7.1
Component: Book Version: SVN
Severity: normal Keywords:
Cc:

Description

Either kmod or udev go into some kind of forkbomb or almost-infinite loop with a naive extension of our instructions. I had this in /etc/modprobe.d/sound.conf:

install snd-pcm /sbin/modprobe -i snd-pcm ; /sbin/modprobe snd-pcm-oss ; /sbin/modprobe snd-mixer-oss ; /sbin/modprobe snd-seq ; /bin/true

per section 7.9, and the forkbomb happened when I loaded the snd-xxxx module for my card. (It does eventually finish, but much later than the udev timeout, and much longer than it should ever take to load ~20 different modules in the dependency list for my sound card. The PID of the next process to be forked is up in the 10000 range when this is hit at boot time, as well, so at least 10k processes were forked and exited. Possibly plus some integer multiple of 32768, since the PID ends up wrapping around. Anyway...)

Couldn't find upstream documentation on how to do this specifically for snd-pcm-oss, but it turns out the syntax for a usable alternative is in kmod's modprobe.d manpage:

softdep snd-pcm post: snd-pcm-oss snd-mixer-oss snd-seq

Which works fine; no more forkbombs.

The manpage also says that eventually "install" and "remove" commands will get deprecated (printing warnings), and then removed, and softdep is the way to go. Seems reasonable (the only thing I ever used "install" for was soft user-added dependencies anyway).

(Note that kmod also provides a "softdep <module> pre: <module>..." alternative, or one with both "pre:" and "post:". Just "post:" is fine for wrapper modules though.)

We should update chapter07/udev.xml (section 7.9) to refer people to "softdep" instead of "install". I can throw together a change to do it, but filing this ticket so it isn't forgotten about. (And so I can find the method next time I need to use it, and so I can try to get Google to show something newer than 2003 for "autoload snd-pcm-oss". Heh.)

Change History (1)

comment:1 by Bryan Kadzban, 12 years ago

Resolution: fixed
Status: newclosed

Fixed in r9727.

Note: See TracTickets for help on using tickets.