Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

squeezeslave causes snd_bcm2835 to kernelpanic #11

Closed
GadgetUK opened this issue Apr 28, 2012 · 23 comments
Closed

squeezeslave causes snd_bcm2835 to kernelpanic #11

GadgetUK opened this issue Apr 28, 2012 · 23 comments

Comments

@GadgetUK
Copy link

Having successfully compiled squeezeslave http://wiki.slimdevices.com/index.php/SqueezeSlave, appears to work, but after an unknown amount of time the system hangs.
The following kernel output is produced to console.

Linux rasp 3.1.9+ #90 Wed Apr 18 18:23:05 BST 2012 armv6l

Debian GNU/Linux 6.0 rasp ttyAMA0

rasp login: Unable to handle kernel paging request at virtual address 973ed3d0
pgd = c0004000
[973ed3d0] *pgd=00000000
Internal error: Oops: 5 [#1]
Modules linked in: snd_bcm2835 snd_pcm snd_seq snd_timer snd_seq_device snd snd_page_alloc fuse evdev
CPU: 0 Not tainted (3.1.9+ #90)
pc : [] lr : [] psr: 60000193
sp : c0399d9c ip : 00000002 fp : c0399db4
r10: 973ed3d2 r9 : cb919cc8 r8 : cad992e0
r7 : cb919c80 r6 : cad99220 r5 : cb9541e0 r4 : cb918900
r3 : 000000a1 r2 : 346ecf2a r1 : 973ed3d0 r0 : ffdd0000
Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 00c5387d Table: 0bbbc008 DAC: 00000017
Process swapper (pid: 0, stack limit = 0xc0398268)
Stack: (0xc0399d9c to 0xc039a000)
9d80: ffdd0000
9da0: cb918900 c022bda0 c0399dec c0399db8 c0221a3c c022bd9c c0045620 c00174b0
9dc0: c039dac0 00000001 cb919c80 cb9541e0 cb954208 00000000 cb919c90 00000008
9de0: c0399e24 c0399df0 c0222810 c0221658 00000ab3 cb919c98 c03a0500 cb919c80
9e00: e0980000 000014a6 cb919d40 0000004b c03d8a4c c03a2bf0 c0399e44 c0399e28
9e20: c0225994 c0222708 00000000 00000008 cb919c80 00000008 c0399e64 c0399e48
9e40: c0226da0 c02258f4 cb8933a0 a0000193 00000001 00000000 c0399e74 c0399e68
9e60: c022475c c0226ce0 c0399e94 c0399e78 c0203e84 c0224754 c0203e48 cb913c60
9e80: 00000000 00000000 c0399ecc c0399e98 c004e54c c0203e54 00000ab3 13f55e89
9ea0: 60000193 c03a2bf0 0000004b 00000000 c0399f74 00004008 410fb767 003919b0
9ec0: c0399ee4 c0399ed0 c004e6cc c004e504 00020000 c03a2bf0 c0399efc c0399ee8
9ee0: c005010c c004e6a8 c0050084 c03a84d8 c0399f0c c0399f00 c004df84 c0050090
9f00: c0399f2c c0399f10 c000f0dc c004df5c c000f230 c000f234 60000013 f200b200
9f20: c0399f3c c0399f30 c0008190 c000f0b0 c0399f94 c0399f40 c000ddd4 c000818c
9f40: ffffffed 00000000 c0399f88 00000000 c0398000 c03b5dc4 c039cfdc c039cfd4
9f60: 00004008 410fb767 003919b0 c0399f94 c0399f98 c0399f88 c000f230 c000f234
9f80: 60000013 ffffffff c0399fb4 c0399f98 c000f444 c000f214 c039c050 c039a0ac
9fa0: c0392718 c0582960 c0399fc4 c0399fb8 c02fcf10 c000f3b0 c0399ff4 c0399fc8
9fc0: c037b72c c02fcebc c037b1ac 00000000 00000000 c0392718 00000000 00c5387d
9fe0: c039a040 c0392714 00000000 c0399ff8 0000803c c037b50c 00000000 00000000
Backtrace:
Function entered at [] from []
Function entered at [] from []
Function entered at [] from []
Function entered at [] from []
r6:00000008 r5:cb919c80 r4:00000008 r3:00000000
Function entered at [] from []
r7:00000000 r6:00000001 r5:a0000193 r4:cb8933a0
Function entered at [] from []
Function entered at [] from []
r6:00000000 r5:00000000 r4:cb913c60 r3:c0203e48
Function entered at [] from []
Function entered at [] from []
r4:c03a2bf0 r3:00020000
Function entered at [] from []
r4:c03a84d8 r3:c0050084
Function entered at [] from []
Function entered at [] from []
r6:f200b200 r5:60000013 r4:c000f234 r3:c000f230
Function entered at [] from []
Exception stack(0xc0399f40 to 0xc0399f88)
9f40: ffffffed 00000000 c0399f88 00000000 c0398000 c03b5dc4 c039cfdc c039cfd4
9f60: 00004008 410fb767 003919b0 c0399f94 c0399f98 c0399f88 c000f230 c000f234
9f80: 60000013 ffffffff
Function entered at [] from []
Function entered at [] from []
r6:c0582960 r5:c0392718 r4:c039a0ac r3:c039c050
Function entered at [] from []
Function entered at [] from [<0000803c>]
Code: e211c003 0affffc4 e3c11003 e35c0002 (e491e004)
---[ end trace 519aec8eb3f97b25 ]---
Kernel panic - not syncing: Fatal exception in interrupt

@popcornmix
Copy link
Contributor

I wonder why there are no addresses in stacktrace?
Can you try using kernel_debug.img, and see if you can catch panic? It should produce stacktrace with labels.

@GadgetUK
Copy link
Author

Sure no problems. Are there some simple instructions on using kernel_debug.img ?

@popcornmix
Copy link
Contributor

You can download https://github.com/raspberrypi/firmware/raw/master/boot/kernel_debug.img
and replace kernel.img from boot partition with it. (Keep a copy of the old one).

@GadgetUK
Copy link
Author

Ok, debug kernel in place, sound driver module load fails.

sudo modprobe snd-bcm2835
WARNING: Error inserting snd (/lib/modules/3.1.9+/kernel/sound/core/snd.ko): Invalid module format
WARNING: Error inserting snd_timer (/lib/modules/3.1.9+/kernel/sound/core/snd-timer.ko): Invalid module format
WARNING: Error inserting snd_pcm (/lib/modules/3.1.9+/kernel/sound/core/snd-pcm.ko): Invalid module format
FATAL: Error inserting snd_bcm2835 (/lib/modules/3.1.9+/kernel/sound/arm/snd-bcm2835.ko): Invalid module format
pi@rasp:~$

@popcornmix
Copy link
Contributor

You might need to update the modules:
https://github.com/raspberrypi/firmware/tree/master/modules/3.1.9+
(they go in /lib/modules/3.1.9+)

@GadgetUK
Copy link
Author

Do I need the whole tree ? If so whats the best way to do this on the running Pi ?

@popcornmix
Copy link
Contributor

sudo apt-get install git
git clone git://github.com/raspberrypi/firmware.git
sudo cp -a firmware/modules /lib

should do it (untested)

@GadgetUK
Copy link
Author

Sorry, no joy :(

Just to check I'm using the right bits, some md5sums

1ec89746a7bdce068d80549fb70632e2 /boot/kernel.img

0b94b4d526c98260c5626e251ab179d6 /lib/modules/3.1.9+/kernel/sound/core/snd.ko

d4cfb520831dc7a18a43368e06b9f75e /lib/modules/3.1.9+/kernel/sound/arm/snd-bcm2835.ko

@popcornmix
Copy link
Contributor

Looks like your kernel is wrong. modules look okay.

dc4@dc4-VirtualBox:$ md5sum firmware/boot/kernel_emergency.img
49feacb6acc5d657254cbac05cd6767d firmware/boot/kernel_emergency.img
dc4@dc4-VirtualBox:
$ md5sum firmware/modules/3.1.9+/kernel/sound/core/snd.ko
0b94b4d526c98260c5626e251ab179d6 firmware/modules/3.1.9+/kernel/sound/core/snd.ko
dc4@dc4-VirtualBox:~$ md5sum firmware/modules/3.1.9+/kernel/sound/arm/snd-bcm2835.ko
d4cfb520831dc7a18a43368e06b9f75e firmware/modules/3.1.9+/kernel/sound/arm/snd-bcm2835.ko

@GadgetUK
Copy link
Author

Ok, I went with

"You can download https://github.com/raspberrypi/firmware/raw/master/boot/kernel_debug.img
and replace kernel.img from boot partition with it. (Keep a copy of the old one)."

Is this the wrong kernel ?

@GadgetUK
Copy link
Author

pi@rasp:/boot$ md5sum *.img
1ec89746a7bdce068d80549fb70632e2 kernel_debug.img
49feacb6acc5d657254cbac05cd6767d kernel_emergency.img
1ec89746a7bdce068d80549fb70632e2 kernel.img
a6cfd8f688292265b78d55923ab85f9b kernel_normal.img

@popcornmix
Copy link
Contributor

My mistake - you did have correct kernel.
dc4@dc4-VirtualBox:~$ md5sum firmware/boot/kernel_debug.img
1ec89746a7bdce068d80549fb70632e2 firmware/boot/kernel_debug.img

I've just tried, and it looks like the modules between the debug and non-debug kernels are not compatible.
I'll try building the modules for the debug kernel

@popcornmix
Copy link
Contributor

@GadgetUK
Copy link
Author

Looks like thats got it

pi@rasp:$ uname -a
Linux rasp 3.1.9+ #255 Sun Apr 29 18:34:50 BST 2012 armv6l GNU/Linux
pi@rasp:
$ sudo modprobe snd-bcm2835
pi@rasp:$ lsmod
Module Size Used by
snd_bcm2835 21377 0
snd_pcm 78977 1 snd_bcm2835
snd_seq 57144 0
snd_timer 20425 2 snd_pcm,snd_seq
snd_seq_device 6920 1 snd_seq
snd 56168 5 snd_bcm2835,snd_pcm,snd_seq,snd_timer,snd_seq_device
snd_page_alloc 5383 1 snd_pcm
fuse 70333 1
evdev 8502 2
pi@rasp:
$

@GadgetUK
Copy link
Author

Ok. Squeezeslave running.
Dire Straits, Money for Nothing on continuous loop.
Serial console logging on.
Just have to wait.

@GadgetUK
Copy link
Author

As is typical, no kernel panics, but squeezeslave stops playing, whilst remaining running.

@GadgetUK
Copy link
Author

GadgetUK commented May 2, 2012

A little more info from the application developer

I've seen this issue twice before.

  1. It was the alsa kernel driver for the sound card. Updating to the latest ALSA lib and drivers fixed the issue.
  2. Removing -DUSE_SIGNALS_FOR_RESTART from the CFLAGS line in the makefile and rebuild.

I'm going to try a rebuild and see if this helps.

@popcornmix
Copy link
Contributor

There's been a firmware update that could help ALSA issues. Please update and test.

@GadgetUK
Copy link
Author

Ok, I'll try and give this a go over the next few days.

@popcornmix
Copy link
Contributor

Closing as I believe the panic issue is fixed. Please reopen if this is not the case.

@haarts
Copy link

haarts commented Jul 6, 2012

I'm sorry to report that, I too, experience a kernel panic. It will be some days before I can investigate the issue further. I did get lots of addresses in the trace. I was running this version: debian6-19-04-2012.zip. Nothing attached but power and network. The only thing running was a tor relay (no exit).

@popcornmix
Copy link
Contributor

If you haven't udpated firmware then this is expected.
Either update to Wheezy or run rpi-update.
http://elinux.org/R-Pi_Troubleshooting#Updating_firmware

@haarts
Copy link

haarts commented Jul 9, 2012

This seems to work! My Pi has been running for 12 hours now were before I only managed 1 to 8 hours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants