Re: ALSA bugs with 2.6.12-rc1

2005-04-04 Thread Jaroslav Kysela
On Mon, 4 Apr 2005, Adrian Bunk wrote:

> On Mon, Apr 04, 2005 at 06:08:43PM +0100, Daniel Drake wrote:
> > David Ford wrote:
> > > It seems that 2.6.12-rc1 introduced an ALSA bug generating an oops for a
> > > null pointer.
> > > 
> > > codec_semaphore: semaphore is not ready [0x1][0x300300]
> > > codec_read 0: semaphore is not ready for register 0x2c
> > > Unable to handle kernel NULL pointer dereference at virtual address
> > > 
> > > 
> > > This happens on multiple machines, 32b and 64bit.  I'll be happy to
> > > provide further information if needed.
> > 
> > This only happens when you mismatch your kernel and alsa-lib versions, e.g.
> > running alsa-lib-1.0.9-rc2 with alsa-1.0.8 in-kernel drivers, or possibly
> > vice-versa.
> 
> Are you saying the userspace interface of the ALSA kernel drivers has 
> incompatible changes between minor versions of ALSA?
> 
> If this is true, that's a serious bug.

Nope, but newer alsa-lib use an ALSA timer API feature which was not well 
debugged. This oops should be fixed in 2.6.12-rc2 and older libraries will 
work with newer kernels as well.

Jaroslav

-
Jaroslav Kysela <[EMAIL PROTECTED]>
Linux Kernel Sound Maintainer
ALSA Project, SUSE Labs
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: ALSA bugs with 2.6.12-rc1

2005-04-04 Thread Adrian Bunk
On Mon, Apr 04, 2005 at 06:08:43PM +0100, Daniel Drake wrote:
> David Ford wrote:
> > It seems that 2.6.12-rc1 introduced an ALSA bug generating an oops for a
> > null pointer.
> > 
> > codec_semaphore: semaphore is not ready [0x1][0x300300]
> > codec_read 0: semaphore is not ready for register 0x2c
> > Unable to handle kernel NULL pointer dereference at virtual address
> > 
> > 
> > This happens on multiple machines, 32b and 64bit.  I'll be happy to
> > provide further information if needed.
> 
> This only happens when you mismatch your kernel and alsa-lib versions, e.g.
> running alsa-lib-1.0.9-rc2 with alsa-1.0.8 in-kernel drivers, or possibly
> vice-versa.

Are you saying the userspace interface of the ALSA kernel drivers has 
incompatible changes between minor versions of ALSA?

If this is true, that's a serious bug.

> Daniel

cu
Adrian

-- 

   "Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   "Only a promise," Lao Er said.
   Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: ALSA bugs with 2.6.12-rc1

2005-04-04 Thread Takashi Iwai
At Mon, 04 Apr 2005 18:08:43 +0100,
Daniel Drake wrote:
> 
> David Ford wrote:
> > It seems that 2.6.12-rc1 introduced an ALSA bug generating an oops for a
> > null pointer.
> > 
> > codec_semaphore: semaphore is not ready [0x1][0x300300]
> > codec_read 0: semaphore is not ready for register 0x2c
> > Unable to handle kernel NULL pointer dereference at virtual address
> > 
> > 
> > This happens on multiple machines, 32b and 64bit.  I'll be happy to
> > provide further information if needed.
> 
> This only happens when you mismatch your kernel and alsa-lib versions, e.g.
> running alsa-lib-1.0.9-rc2 with alsa-1.0.8 in-kernel drivers, or possibly
> vice-versa.

Only the former case (kernel < lib).

It's already fixed in linux-sound bk tree.  The relevant patch is
below.  The patch was already submitted to stable, too.


Takashi


# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2005/03/22 09:01:11+01:00 [EMAIL PROTECTED] 
#   [ALSA] Fix Oops with timer notifying
#   
#   Timer Midlevel
#   Fixed Oops with timer notifying after TIMER_TREAD ioctl.
#   
#   Signed-off-by: Takashi Iwai <[EMAIL PROTECTED]>
# 
# sound/core/timer.c
#   2005/03/15 04:25:51+01:00 [EMAIL PROTECTED] +2 -1
#   [ALSA] Fix Oops with timer notifying
#   
#   D:2005/03/15 11:25:51
#   C:Timer Midlevel
#   F:core/timer.c:1.65->1.66 
#   L:Fixed Oops with timer notifying after TIMER_TREAD ioctl.
#   Signed-off-by: Takashi Iwai <[EMAIL PROTECTED]>
# 
diff -Nru a/sound/core/timer.c b/sound/core/timer.c
--- a/sound/core/timer.c2005-04-04 19:25:12 +02:00
+++ b/sound/core/timer.c2005-04-04 19:25:12 +02:00
@@ -1117,7 +1117,8 @@
if (tu->qused >= tu->queue_size) {
tu->overrun++;
} else {
-   memcpy(&tu->queue[tu->qtail++], tread, sizeof(*tread));
+   memcpy(&tu->tqueue[tu->qtail++], tread, sizeof(*tread));
+   tu->qtail %= tu->queue_size;
tu->qused++;
}
 }
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: ALSA bugs with 2.6.12-rc1

2005-04-04 Thread Daniel Drake
David Ford wrote:
> It seems that 2.6.12-rc1 introduced an ALSA bug generating an oops for a
> null pointer.
> 
> codec_semaphore: semaphore is not ready [0x1][0x300300]
> codec_read 0: semaphore is not ready for register 0x2c
> Unable to handle kernel NULL pointer dereference at virtual address
> 
> 
> This happens on multiple machines, 32b and 64bit.  I'll be happy to
> provide further information if needed.

This only happens when you mismatch your kernel and alsa-lib versions, e.g.
running alsa-lib-1.0.9-rc2 with alsa-1.0.8 in-kernel drivers, or possibly
vice-versa.

Daniel
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


ALSA bugs with 2.6.12-rc1

2005-04-04 Thread David Ford
It seems that 2.6.12-rc1 introduced an ALSA bug generating an oops for a 
null pointer.

codec_semaphore: semaphore is not ready [0x1][0x300300]
codec_read 0: semaphore is not ready for register 0x2c
Unable to handle kernel NULL pointer dereference at virtual address 
printing eip:
c01d7746
*pde = 
Oops: 0002 [#1]
PREEMPT
Modules linked in: orinoco_cs orinoco hermes pcmcia yenta_socket 
rsrc_nonstatic pcmcia_core vfat fat nls_base i2c_sensor i2c_core eth1394 
ohci1394 ieee1394 i8k
CPU:0
EIP:0060:[]Not tainted VLI
EFLAGS: 00010202   (2.6.12-rc1)
EIP is at memcpy+0x1e/0x39
eax: 0010   ebx: e7608180   ecx: 0004   edx: 
esi: e13d1ee4   edi:    ebp: bf924390   esp: e13d1eb4
ds: 007b   es: 007b   ss: 0068
Process artsd (pid: 11880, threadinfo=e13d1000 task=e1436590)
Stack: ffea ffea e13d1ef4 c02b8793  e13d1ee4 0010 
e7608180
  c02b954d e7608180 e13d1ee4 0050 0006   

  0005 0001   8002   

Call Trace:
[] snd_timer_user_append_to_tqueue+0x40/0x49
[] snd_timer_user_params+0x236/0x245
[] do_ioctl+0x9a/0xa9
[] vfs_ioctl+0x65/0x1e1
[] get_unused_fd+0x2c/0xd2
[] sys_ioctl+0x45/0x6d
[] sysenter_past_esp+0x54/0x75
Code: fd 31 c0 c3 31 d2 b8 f2 ff ff ff c3 90 83 ec 0c 8b 44 24 18 8b 54 
24 10 89 74 24 04 89 c1 89 7c 24 08 8b 74 24 14 c1 e9 02 89 d7  a5 
a8 02 74 02 66 a5 a8 01 74 01 a4 89 d0 8b 74 24 04 8b 7c
codec_semaphore: semaphore is not ready [0x1][0x300300]
codec_read 1: semaphore is not ready for register 0x54
codec_semaphore: semaphore is not ready [0x1][0x300300]
codec_write 1: semaphore is not ready for register 0x54

This happens on multiple machines, 32b and 64bit.  I'll be happy to 
provide further information if needed.

-david
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/