Skip to contentSkip to conversation

2.5.5-pre1: Deadlocks and ALSA driver problems

DISCUSSION Jos Hulzink 3 participants 6 messages Feb 15, 2002

lore
Share & tools
lore
#0 lore raw

Hi,

Still fighting with the debug tools (I'm new to kernel debugging), but maybe this info is useful to others:

2.5.5-pre1 deadlocked completely about 7 times in 40 minutes. The Magic SysRq key didn't work anymore. Don't know if it is related, but after I recompiled the ALSA driver as modules, the system was stable for about 4 hours. (With ALSA modules loaded, playing music, and I rebooted it myself afterwards.)

Besides: the ALSA /proc interface is terribly broken, any cat /proc/asound/... results in a no such device error. The ALSA /dev entries return the same errors while opening them, but the OSS emulation layer works fine.

System Info:
PII-333 SMP on Asus P2L97-DS (Intel LX chipset), 512 MB RAM SB Live 5.1 soundcard

The kernel is compiled with ALSA driver and Preemptive=Y

I hope to provide you better emails in the future.

Jos

#1 lore raw
Quoted 11 lines · Jos Hulzink

Hi,

Still fighting with the debug tools (I'm new to kernel debugging), but maybe this info is useful to others:

2.5.5-pre1 deadlocked completely about 7 times in 40 minutes. The Magic SysRq key didn't work anymore. Don't know if it is related, but after I recompiled the ALSA driver as modules, the system was stable for about 4 hours. (With ALSA modules loaded, playing music, and I rebooted it myself afterwards.)

Quoted 4 lines

Besides: the ALSA /proc interface is terribly broken, any cat /proc/asound/... results in a no such device error. The ALSA /dev entries return the same errors while opening them, but the OSS emulation layer works fine.

Attached patch for linux/sound/core/info.c fixes the problem with /proc entries.

Jaroslav

-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project http://www.alsa-project.org
SuSE Linux http://www.suse.com

Index: info.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/info.c,v
retrieving revision 1.7
retrieving revision 1.8

info.c +5 -5
diff -u -r1.7 -r1.8
@@ -278,7 +278,7 @@
 	int mode, err;
 
 	down(&info_mutex);
-	p = (struct proc_dir_entry *) inode->u.generic_ip;
+	p = PDE(inode);
 	entry = p == NULL ? NULL : (snd_info_entry_t *)p->data;
 	if (entry == NULL) {
 		up(&info_mutex);
@@ -541,7 +541,7 @@
 static int snd_info_card_readlink(struct dentry *dentry,
 				  char *buffer, int buflen)
 {
-        char *s = ((struct proc_dir_entry *) dentry->d_inode->u.generic_ip)->data;
+        char *s = PDE(dentry->d_inode)->data;
 #ifndef LINUX_2_2
 	return vfs_readlink(dentry, buffer, buflen, s);
 #else
@@ -562,7 +562,7 @@
 static int snd_info_card_followlink(struct dentry *dentry,
 				    struct nameidata *nd)
 {
-        char *s = ((struct proc_dir_entry *) dentry->d_inode->u.generic_ip)->data;
+        char *s = PDE(dentry->d_inode)->data;
         return vfs_follow_link(nd, s);
 }
 #else
@@ -570,7 +570,7 @@
 					       struct dentry *base,
 					       unsigned int follow)
 {
-	char *s = ((struct proc_dir_entry *) dentry->d_inode->u.generic_ip)->data;
+	char *s = PDE(dentry->d_inode)->data;
 	return lookup_dentry(s, base, follow);
 }
 #endif
@@ -845,7 +845,7 @@
 		return;
 	}
 	MOD_INC_USE_COUNT;
-	de = (struct proc_dir_entry *) inode->u.generic_ip;
+	de = PDE(inode);
 	if (de == NULL)
 		return;
 	entry = (snd_info_entry_t *) de->data;
#2 lore raw
Quoted 4 lines · Jaroslav Kysela

Attached patch for linux/sound/core/info.c fixes the problem with /proc entries.

Confirmed. /proc interface seems working as expected.

Jos

#3 lore raw

XMMS ALSA extension problems

In reply to Jaroslav Kysela

Hi,

The xmms ALSA extension doesn't work. It returns errors in the ALSA lib:

ALSA lib dlmisc.c:97:(snd_dlsym_verify) unable to verify version for symbol snd_config_hook_load
ALSA lib conf.c:2285:(snd_config_hooks_call) symbol snd_config_hook_load is not defined inside (null)
ALSA lib conf.c:2671:(snd_config_update) hooks failed, removing configuration
xmms: pcm_params.c:2084: snd_pcm_hw_refine: Assertion `pcm && params' failed. Aborted

Can anybody tell if this is a problem in the ALSA lib, or is it the XMMS plugin that causes this problem ?

ALSA kernel 2.5.5-pre1
XMMS 1.2.6

Greetings,

Jos Hulzink

P.S. I'm not on the list, please send me a copy of your answer

_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

#4 lore raw

Re: XMMS ALSA extension problems

Quoted 12 lines · Jos Hulzink

Hi,

The xmms ALSA extension doesn't work. It returns errors in the ALSA lib:

ALSA lib dlmisc.c:97:(snd_dlsym_verify) unable to verify version for symbol snd_config_hook_load
ALSA lib conf.c:2285:(snd_config_hooks_call) symbol snd_config_hook_load is not defined inside (null)
ALSA lib conf.c:2671:(snd_config_update) hooks failed, removing configuration
xmms: pcm_params.c:2084: snd_pcm_hw_refine: Assertion `pcm && params' failed. Aborted

Quoted 2 lines

Can anybody tell if this is a problem in the ALSA lib, or is it the XMMS plugin that causes this problem ?

both really. as i understand it alsa-lib uses dlopen(3) to resolve some of its internal symbols. these are not properly resolved if the xmms plugin isn't loaded RTLD_GLOBAL. you need to get xmms to open the alsa plugin RTLD_GLOBAL for it to work.

regards,

wingo.

_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

#5 lore raw

Re: XMMS ALSA extension problems

Quoted 13 lines · Andy Wingo
Quoted 12 lines · Jos Hulzink

Hi,

The xmms ALSA extension doesn't work. It returns errors in the ALSA lib:

ALSA lib dlmisc.c:97:(snd_dlsym_verify) unable to verify version for symbol snd_config_hook_load
ALSA lib conf.c:2285:(snd_config_hooks_call) symbol snd_config_hook_load is not defined inside (null)
ALSA lib conf.c:2671:(snd_config_update) hooks failed, removing configuration xmms: pcm_params.c:2084: snd_pcm_hw_refine: Assertion `pcm && params' failed. Aborted

Quoted 7 lines
Quoted 2 lines

Can anybody tell if this is a problem in the ALSA lib, or is it the XMMS plugin that causes this problem ?

both really. as i understand it alsa-lib uses dlopen(3) to resolve some of its internal symbols. these are not properly resolved if the xmms plugin isn't loaded RTLD_GLOBAL. you need to get xmms to open the alsa plugin RTLD_GLOBAL for it to work.

On the XMMS ALSA plugin site, it is stated that this only holds for XMMS v 1.2.5. I'll try if this works, and contact the author about it, if it works.

Jos

_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel