realplayer, mplayer, lost sound, and a kldunload snd_es137x panic

Juergen Lock nox at jelal.kn-bremen.de
Sun Feb 26 08:19:15 PST 2006


I was watching nasatv with realplayer yesterday, but it skipped and
the realplayer process became some 300 MB, so i tried mplayer.
mplayer had problems too which made me restart it a few times, and
suddenly i had no sound anymore.  I tried to kldunload snd_es137x,
got `Device busy', saw no /dev/dsp* anymore (I wanted to look with fstat
who has it open), then i tried kldunload a second time and got a panic:

[...]
This GDB was configured as "i386-marcel-freebsd".
#0  doadump () at pcpu.h:159
159		__asm __volatile("movl %%fs:0,%0" : "=r" (td));
(kgdb) bt
#0  doadump () at pcpu.h:159
#1  0xc05e27b6 in boot (howto=260)
    at /usr/home/nox/src54/usr/src/sys/kern/kern_shutdown.c:410
#2  0xc05e2a7c in panic (fmt=0xc07d54cf "don't do that")
    at /usr/home/nox/src54/usr/src/sys/kern/kern_shutdown.c:566
#3  0xc05bba12 in idestroy_dev (dev=0xc1f91a00)
    at /usr/home/nox/src54/usr/src/sys/kern/kern_conf.c:560
#4  0xc05bbb3c in destroy_dev (dev=0xc1f91a00)
    at /usr/home/nox/src54/usr/src/sys/kern/kern_conf.c:611
#5  0xc1f8600c in ?? ()
#6  0xc1f91a00 in ?? ()
#7  0xc1a82100 in ?? ()
#8  0xc1a82100 in ?? ()
#9  0xc1c4ae80 in ?? ()
#10 0xde851c28 in ?? ()
#11 0xc1f73766 in ?? ()
#12 0xc1a82100 in ?? ()
#13 0xc1a82100 in ?? ()
#14 0xc1a82100 in ?? ()
#15 0xde851c40 in ?? ()
#16 0xc05f5d47 in device_detach (dev=0xc1f579e0) at device_if.h:211
Previous frame inner to this frame (corrupt stack?)
(kgdb) fr 3
#3  0xc05bba12 in idestroy_dev (dev=0xc1f91a00)
    at /usr/home/nox/src54/usr/src/sys/kern/kern_conf.c:560
560			panic("don't do that");
(kgdb) l
555	idestroy_dev(struct cdev *dev)
556	{
557		if (!(dev->si_flags & SI_NAMED)) {
558			printf( "WARNING: Driver mistake: destroy_dev on %d/%d\n",
559			    major(dev), minor(dev));
560			panic("don't do that");
561		}
562			
563		devfs_destroy(dev);
564	
(kgdb) up
#4  0xc05bbb3c in destroy_dev (dev=0xc1f91a00)
    at /usr/home/nox/src54/usr/src/sys/kern/kern_conf.c:611
611		idestroy_dev(dev);
(kgdb) l
606	void
607	destroy_dev(struct cdev *dev)
608	{
609	
610		devlock();
611		idestroy_dev(dev);
612		devunlock();
613	}
614	
615	const char *
(kgdb) p dev
$1 = (struct cdev *) 0xc1f91a00
(kgdb) p *dev
$2 = {si_flags = 0, si_atime = {tv_sec = 1140183292, tv_nsec = 399901000}, 
  si_ctime = {tv_sec = 1140897148, tv_nsec = 0}, si_mtime = {
    tv_sec = 1140897148, tv_nsec = 0}, si_udev = 7683, si_refcount = 1, 
  si_list = {le_next = 0x0, le_prev = 0xc1f91924}, si_clone = {le_next = 0x0, 
    le_prev = 0x0}, si_hash = {le_next = 0xc1c18c00, le_prev = 0xc24b2134}, 
  si_hlist = {slh_first = 0xc3733b58}, si_children = {lh_first = 0x0}, 
  si_siblings = {le_next = 0x0, le_prev = 0x0}, si_parent = 0x0, si_inode = 0, 
  si_name = 0xc1f91aa8 "dsp0.0", si_drv1 = 0x0, si_drv2 = 0x0, si_devsw = 0x0, 
  si_iosize_max = 65536, si_stripesize = 0, si_stripeoffset = 0, si_uid = 0, 
  si_gid = 0, si_mode = 438, si_usecount = 0, si_threadcount = 0, __si_u = {
    __si_tty = {__sit_tty = 0x0}, __si_disk = {__sid_mountpoint = 0x0, 
      __sid_bsize_phys = 0, __sid_bsize_best = 0, __sid_snapshots = {
        tqh_first = 0x0, tqh_last = 0x0}, __sid_snaplistsize = 0, 
      __sid_snapblklist = 0x0, __sid_copyonwrite = 0}}, 
  __si_namebuf = "dsp0.0", '\0' <repeats 57 times>}
(kgdb) q

 relevant parts of dmesg extracted from the dump:

pcm0: unregister: mixer busy
WARNING: Driver mistake: destroy_dev on 30/3
panic: don't do that
KDB: stack backtrace:
kdb_backtrace(100,c2496480,c1f91a00,c1c17a00,c1a82100) at kdb_backtrace+0x29
panic(c07d54cf,c07d54a0,1e,3,c1f579e0) at panic+0xa8
idestroy_dev(c1f91a00,de851c14,c1f8600c,c1f91a00,c1a82100) at idestroy_dev+0x32
destroy_dev(c1f91a00,c1a82100,c1a82100,c1c4ae80,de851c28) at destroy_dev+0x10
pcm_unregister(c1a82100,c1a82100,c1a82100,de851c40,c05f5d47) at pcm_unregister+0xb4
es_pci_detach(c1a82100) at es_pci_detach+0xe
device_detach(c1a82100) at device_detach+0x57
devclass_delete_driver(c1994000,c1f74ea0,c1f3d000,c1e44300,0) at devclass_delete_driver+0x8c
driver_module_handler(c1f3d000,1,c1f74eb8,c1f3d000,de851cc0) at driver_module_handler+0x92
module_unload(c1f3d000,0,c08a1260,0,0) at module_unload+0x37
linker_file_unload(c1e44300,0,c24b1710,0,de851cec) at linker_file_unload+0x62
kern_kldunload(c2496480,8,0,de851d40,c0771fcf) at kern_kldunload+0x98
kldunloadf(c2496480,de851d14,2,0,292) at kldunloadf+0x1e
syscall(2f,2f,2f,8,bfbfe91a) at syscall+0x2ab
Xint0x80_syscall() at Xint0x80_syscall+0x1f
--- syscall (444, FreeBSD ELF32, kldunloadf), eip = 0x280c953b, esp = 0xbfbfe34c, ebp = 0xbfbfe7c0 ---
Uptime: 8d6h19m19s
Dumping 511 MB
 16 32 48 64 80 96 112 128 144 160 176 192 208 224 240 256 272 288 304 320 336 352 368 384 400 416 432 448 464 480 496

 did `pcm0: unregister: mixer busy' have something to do with why
i got no sound anymore?  This is RELENG_5_4, maybe this is fixed in
RELENG_6 or HEAD?

 Curious...
	Juergen

PS: I just tried realplayer again, and nasatv doesnt skip anymore now
(maybe the stream was too busy yesterday because of the press conference
that was on?)  Oh and i forgot to say i have hw.snd.pcm0.vchans=4
in sysctl.conf.


More information about the freebsd-multimedia mailing list