Skip to contentSkip to conversation

2.6.10-rc3 snd-powermac crash

BUG Benjamin Herrenschmidt 5 participants 13 messages Dec 18, 2004 – Jan 7, 2005

lore
Share & tools
lore
#0 lore raw

Hi Takashi !

I get that regulary with latest kernel when using Alsa. Can't tell if it's new as I used dmasound so far, just wanted to give Alsa a try...

Ben.

Oops: kernel access of bad area, sig: 11 [#1]
NIP: 00000000 LR: C278B664 SP: BA901DB0 REGS: ba901d00 TRAP: 0400    Not tainted

MSR: 40009032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
TASK = bf4ef2a0[4821] 'gtkpbbuttons' THREAD: ba900000
Last syscall: 4
GPR00: 00000000 BA901DB0 BF4EF2A0 C2231000 00000FD7 00000000 00000000 C2550000
GPR08: C2231000 C2550000 00000001 00000000 00000001 1002317C 100C0000 100A0000
GPR16: 00000000 0022E480 00004002 00000000 00000000 00000800 BF384460 BB52A260
GPR24: 00000000 00000FD8 00000000 00000000 BAAE36AC BAAE3690 BAAE3620 00000800 NIP [00000000] 0x0
LR [c278b664] rate_transfer+0x80/0x88 [snd_pcm_oss]

Call trace:
 [c278b664] rate_transfer+0x80/0x88 [snd_pcm_oss]
 [c278853c] snd_pcm_plug_write_transfer+0xd4/0x14c [snd_pcm_oss]
 [c2783520] snd_pcm_oss_write2+0xb0/0x128 [snd_pcm_oss]
 [c27837b8] snd_pcm_oss_write1+0x220/0x26c [snd_pcm_oss]
 [c2785fec] snd_pcm_oss_write+0x64/0xb4 [snd_pcm_oss]
 [8005c620] vfs_write+0xdc/0x128
 [8005c750] sys_write+0x50/0x94
 [800042e0] ret_from_syscall+0x0/0x44

benh@gaston:~$

Signature · 1 line
Benjamin Herrenschmidt <[email protected]>
#1 lore raw
Quoted 4 lines · Benjamin Herrenschmidt

Hi Takashi !

I get that regulary with latest kernel when using Alsa. Can't tell if it's new as I used dmasound so far, just wanted to give Alsa a try...

It seems to be related to oss emulation I'd say ... it's triggered by gtkpbbuttons volume control keys, which will open/ioctl/write/close the device very quicky (changing volume & outputing a beep)

Maybe a race ? This is a laptop, so UP, no PREEMPT.

Ben.

#2 lore raw

At Sat, 18 Dec 2004 18:33:58 +0100,

Quoted 10 lines · Benjamin Herrenschmidt
Quoted 4 lines · Benjamin Herrenschmidt

Hi Takashi !

I get that regulary with latest kernel when using Alsa. Can't tell if it's new as I used dmasound so far, just wanted to give Alsa a try...

It seems to be related to oss emulation I'd say ... it's triggered by gtkpbbuttons volume control keys, which will open/ioctl/write/close the device very quicky (changing volume & outputing a beep)

So, it's not reproducible when you do playback normally? Can you get /proc/asound/card0/pcm0p/sub0/hw_params during playback?

Quoted 1 line

Maybe a race ? This is a laptop, so UP, no PREEMPT.

Well, the volume and PCM shouldn't be racy. I'd first suspect another bug in PCM OSS emulation code...

Could you compile with CONFIG_SND_DEBUG=y and see whether it catches anything?

thanks,

Takashi

#3 lore raw
Quoted 9 lines · Takashi Iwai

At Sat, 18 Dec 2004 18:33:58 +0100,

Quoted 7 lines · Benjamin Herrenschmidt
Quoted 4 lines · Benjamin Herrenschmidt

Hi Takashi !

I get that regulary with latest kernel when using Alsa. Can't tell if it's new as I used dmasound so far, just wanted to give Alsa a try...

Quoted 6 lines
Quoted 3 lines

It seems to be related to oss emulation I'd say ... it's triggered by gtkpbbuttons volume control keys, which will open/ioctl/write/close the device very quicky (changing volume & outputing a beep)

So, it's not reproducible when you do playback normally? Can you get /proc/asound/card0/pcm0p/sub0/hw_params during playback?

No, it's not something that happens during normal playback, but occasionally when tweaking the volume ... I suspect a fast open/ioctl/close sequence or something like that... weird.

Quoted 7 lines
Quoted 1 line

Maybe a race ? This is a laptop, so UP, no PREEMPT.

Well, the volume and PCM shouldn't be racy. I'd first suspect another bug in PCM OSS emulation code...

Could you compile with CONFIG_SND_DEBUG=y and see whether it catches anything?

Ok.

Ben.

#4 lore raw
In reply to Takashi Iwai
Quoted 5 lines · Takashi Iwai

Well, the volume and PCM shouldn't be racy. I'd first suspect another bug in PCM OSS emulation code...

Could you compile with CONFIG_SND_DEBUG=y and see whether it catches anything?

Didn't catch anything. However, I reproduced it a bit differently this time, it didn't try to jump into a NULL pointer in the rate "plugin", but rather went into resample and died there on a data access exception to some corrupt pointer.

I don't have a 100% reprocase yet, it seem to be related to playing with an OSS mixer while using an OSS app (like xmms), that is basically having 2 things opening the OSS emulation, and one of them closing it, or something like that, causing the rate plugin (and maybe more) to be tore down, while still in use by the other app (looks like a use-after-free).

Ben.

#5 lore raw

At Mon, 20 Dec 2004 17:55:17 +0100,

Quoted 6 lines · Benjamin Herrenschmidt
Quoted 3 lines · Takashi Iwai

Well, the volume and PCM shouldn't be racy. I'd first suspect another bug in PCM OSS emulation code...

Quoted 7 lines
Quoted 2 lines

Could you compile with CONFIG_SND_DEBUG=y and see whether it catches anything?

Didn't catch anything. However, I reproduced it a bit differently this time, it didn't try to jump into a NULL pointer in the rate "plugin", but rather went into resample and died there on a data access exception to some corrupt pointer.

Hmm, we had once a compiler problem about rate.c. The problem was fixed when you compiled with frame pointer.
I don't seriously think this is related with your problem, though.

Quoted 6 lines

I don't have a 100% reprocase yet, it seem to be related to playing with an OSS mixer while using an OSS app (like xmms), that is basically having 2 things opening the OSS emulation, and one of them closing it, or something like that, causing the rate plugin (and maybe more) to be tore down, while still in use by the other app (looks like a use-after-free).

OK, I'll try to reproduce on my system (emulating - currently I have no powermac systems here). Is the SRC from 48k to 44.1k Hz?

Takashi

#6 lore raw
In reply to Benjamin Herrenschmidt

Hi,

Le Montag 20 Dezember 2004 17:55, vous avez écrit :

Quoted 6 lines

I don't have a 100% reprocase yet, it seem to be related to playing with an OSS mixer while using an OSS app (like xmms), that is basically having 2 things opening the OSS emulation, and one of them closing it, or something like that, causing the rate plugin (and maybe more) to be tore down, while still in use by the other app (looks like a use-after-free).

on my B/W G3 it crashes when doing such stupid things like "dir > /dev/audio". I'm using debian/sarge, kernel 2.6.10-rc3, alsa 1.0.7. This also happend in past kernel/alsa versions. I don't remember anymore when it started. Sorry, but here is the ops.

Oops: kernel access of bad area, sig: 11 [#1]

PREEMPT
NIP: CE0A40C4 LR: CE0A49D8 SP: C0E2DDC0 REGS: c0e2dd10 TRAP: 0300 Not
tainted
MSR: 00009032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
DAR: CE0AA438, DSISR: 40000000
TASK = c1266d10[5114] 'dir' THREAD: c0e2c000Last syscall: 4
GPR00: 000007F8 C0E2DDC0 C1266D10 C9CCEC80 C426FAA0 C426F5A0 00000200 00000B03
GPR08: 00000001 CE0A9C40 000007F8 CE0A9C80 C37416A4 1002D000 00000000 100C0000
GPR16: 00000000 C426FAA0 C426F5A0 10020000 10020000 10020000 10020000 10010000
GPR24: 00000000 CB796F00 C426FAA0 CE0A407C C426FAA0 C9CCECF0 C9CCEC80 00000B03 NIP [ce0a40c4] resample_expand+0x48/0x3a8 [snd_pcm_oss]
LR [ce0a49d8] rate_transfer+0x7c/0x98 [snd_pcm_oss]

Call trace:
 [ce0a49d8] rate_transfer+0x7c/0x98 [snd_pcm_oss]
 [ce0a13c4] snd_pcm_plug_write_transfer+0x1cc/0x2a0 [snd_pcm_oss]
 [ce09c520] snd_pcm_oss_write2+0xbc/0x134 [snd_pcm_oss]
 [ce09ef28] snd_pcm_oss_write+0x268/0x2e4 [snd_pcm_oss]
 [c005de88] vfs_write+0x114/0x13c
 [c005df8c] sys_write+0x4c/0x90
 [c0004420] ret_from_syscall+0x0/0x44

Greetings

Marc

#7 lore raw
In reply to Benjamin Herrenschmidt
Quoted 27 lines · Benjamin Herrenschmidt

Hi Takashi !

I get that regulary with latest kernel when using Alsa. Can't tell if it's new as I used dmasound so far, just wanted to give Alsa a try...

Ben.

Oops: kernel access of bad area, sig: 11 [#1]
NIP: 00000000 LR: C278B664 SP: BA901DB0 REGS: ba901d00 TRAP: 0400    Not tainted

MSR: 40009032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
TASK = bf4ef2a0[4821] 'gtkpbbuttons' THREAD: ba900000
Last syscall: 4
GPR00: 00000000 BA901DB0 BF4EF2A0 C2231000 00000FD7 00000000 00000000 C2550000
GPR08: C2231000 C2550000 00000001 00000000 00000001 1002317C 100C0000 100A0000
GPR16: 00000000 0022E480 00004002 00000000 00000000 00000800 BF384460 BB52A260
GPR24: 00000000 00000FD8 00000000 00000000 BAAE36AC BAAE3690 BAAE3620 00000800 NIP [00000000] 0x0
LR [c278b664] rate_transfer+0x80/0x88 [snd_pcm_oss]

Call trace:
 [c278b664] rate_transfer+0x80/0x88 [snd_pcm_oss]
 [c278853c] snd_pcm_plug_write_transfer+0xd4/0x14c [snd_pcm_oss]
 [c2783520] snd_pcm_oss_write2+0xb0/0x128 [snd_pcm_oss]
 [c27837b8] snd_pcm_oss_write1+0x220/0x26c [snd_pcm_oss]
 [c2785fec] snd_pcm_oss_write+0x64/0xb4 [snd_pcm_oss]
 [8005c620] vfs_write+0xdc/0x128
 [8005c750] sys_write+0x50/0x94
 [800042e0] ret_from_syscall+0x0/0x44
Quoted 1 line

benh@gaston:~$

I also get the very same oops - though very rarely - with pbbuttons and kernel 2.6.9 on my 1GHz-pbook 15"

However I am not 100% sure whether this is 2.6.9 + alsa from sid or vanilla 2.6.9...

Soeren

#8 lore raw
Quoted 2 lines · Soeren Sonnenburg

I also get the very same oops - though very rarely - with pbbuttons and kernel 2.6.9 on my 1GHz-pbook 15"

I have been using ALSA on my G3 iBook already for a long time and never saw this. I didn't try 2.6.10 yet, though.

Andreas.

Signature · 4 lines
Andreas Schwab, SuSE Labs, [email protected]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
#9 lore raw
Quoted 7 lines · Andreas Schwab
Quoted 2 lines · Soeren Sonnenburg

I also get the very same oops - though very rarely - with pbbuttons and kernel 2.6.9 on my 1GHz-pbook 15"

I have been using ALSA on my G3 iBook already for a long time and never saw this. I didn't try 2.6.10 yet, though.

FYI: I have been running 2.6.10 (which includes bens alsa ppc fix) since it was released... no oopses no crashes so far.

Soeren (happy)

Signature · 2 lines
Sometimes, there's a moment as you're waking, when you become aware of
the real world around you, but you're still dreaming.
#10 lore raw
In reply to Andreas Schwab

At Fri, 31 Dec 2004 16:23:35 +0100,

Quoted 8 lines · Andreas Schwab
Quoted 2 lines · Soeren Sonnenburg

I also get the very same oops - though very rarely - with pbbuttons and kernel 2.6.9 on my 1GHz-pbook 15"

I have been using ALSA on my G3 iBook already for a long time and never saw this. I didn't try 2.6.10 yet, though.

Isn't it the bug which was fixed in 2.6.10-final?

================================================================
[email protected], 2004-12-22 10:46:54-08:00, [email protected]
[PATCH] alsa: fix oops with ALSA OSS emulation on PPC
================================================================

Takashi

#11 lore raw
Quoted 11 lines · Takashi Iwai

At Fri, 31 Dec 2004 16:23:35 +0100,

Quoted 8 lines · Andreas Schwab
Quoted 2 lines · Soeren Sonnenburg

I also get the very same oops - though very rarely - with pbbuttons and kernel 2.6.9 on my 1GHz-pbook 15"

I have been using ALSA on my G3 iBook already for a long time and never saw this. I didn't try 2.6.10 yet, though.

Quoted 6 lines

Isn't it the bug which was fixed in 2.6.10-final?

================================================================
[email protected], 2004-12-22 10:46:54-08:00, [email protected]
[PATCH] alsa: fix oops with ALSA OSS emulation on PPC
================================================================

well yes, that is what at least I thought...

Soeren

Signature · 2 lines
Sometimes, there's a moment as you're waking, when you become aware of
the real world around you, but you're still dreaming.
#12 lore raw
In reply to Takashi Iwai
Quoted 6 lines · Takashi Iwai

Isn't it the bug which was fixed in 2.6.10-final?

================================================================
[email protected], 2004-12-22 10:46:54-08:00, [email protected]
[PATCH] alsa: fix oops with ALSA OSS emulation on PPC
================================================================

Yes, I guess so.

Andreas.

Signature · 4 lines
Andreas Schwab, SuSE Labs, [email protected]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."