Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 196612 - [2.6.22 regression] ALSA HDSP driver division-by-zero crash
Summary: [2.6.22 regression] ALSA HDSP driver division-by-zero crash
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: High critical (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard: linux-2.6.22-regression
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2007-10-21 14:15 UTC by Andreas Dehmel
Modified: 2007-11-07 13:17 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Kernel crash stack during shutdown (kernel-crash-hdsp.txt,2.85 KB, text/plain)
2007-10-21 19:55 UTC, Andreas Dehmel
Details
The output of emerge --info on my system (emerge-info.txt,5.77 KB, text/plain)
2007-10-21 19:57 UTC, Andreas Dehmel
Details
alsa hdsp patch from development list (alsa-hdsp.patch,393 bytes, patch)
2007-10-22 14:33 UTC, Mike Pagano
Details | Diff
Adapted hdsp patch for my source tree (kernel-patch-hdsp-ad.patch,389 bytes, patch)
2007-10-23 19:13 UTC, Andreas Dehmel
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Dehmel 2007-10-21 14:15:54 UTC
I recently upgraded from a 2.6.20 kernel (Alsa 1.0.14-rc1) to a 2.6.22 kernel (Alsa 1.0.14) and found out the new snd-hdsp driver completely broke tools and kernel with my HDSP-9632 card (Firmware 1.51). The first time I shut down after the upgrade, I got a kernel crash via alsactl and when I tried reading the card's controls/contents using amixer after the next boot, the command hung and couldn't be killed anymore even with "kill -9"; the following shutdown also hung rather than crashed the kernel. Back on 2.6.20, everything's working fine. I made sure the kernel was consistently built by cleaning the tree and rebuilding it after the first crash (I also wiped the modules left from the previous install).

I read on the Alsa user forum, that this was probably introduced after 1.0.14-rc3 and may be fixed with a firmware upgrade to 1.52, but since until very recently (definitely Alsa 1.0.12) anything newer than 1.51 was not supported at all and a firmware up-/downgrade requires putting the card into a windows box (which I don't have) means there's no way I'll tackle this any time soon (not least because it'll probably break usability of my tried and tested 2.6.20 kernel). People who can't add support for newer firmware without completely breaking support for anything older (and the kernel in the process) shouldn't be allowed to develop drivers.


Reproducible: Always

Steps to Reproduce:
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-10-21 14:19:54 UTC
Nice rant. It'd be much more useful though if you could explain *clearly* whether you use in-kernel ALSA, or media-sound/alsa-driver. If you get kernel crash, then post the output. If you get errors in dmesg, then post them. You neglected to post emerge --info as well.
Comment 2 Andreas Dehmel 2007-10-21 19:53:37 UTC
Since I mentioned kernel versions with different Alsa-driver versions I thought it was clear enough I'm using the in-kernel alsa drivers (i.e. 1.0.14-rc1 that ships with 2.6.20 and works, vs. 1.0.14 that ships with 2.6.22 and doesn't). I'll create attachments for the kernel crash and emerge --info.
Comment 3 Andreas Dehmel 2007-10-21 19:55:23 UTC
Created attachment 134072 [details]
Kernel crash stack during shutdown
Comment 4 Andreas Dehmel 2007-10-21 19:57:18 UTC
Created attachment 134074 [details]
The output of emerge --info on my system

Note that this is from a working system with kernel 2.6.20-r7, not from 2.6.22-r8 for obvious (I think) reasons.
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2007-10-21 20:12:46 UTC
Reopen...
Comment 6 Mike Pagano gentoo-dev 2007-10-22 14:33:17 UTC
Created attachment 134118 [details, diff]
alsa hdsp patch from development list

Can you patch your kernel sources with this patch, rebuild and test.

To apply patch go where your kernel sources live and type:
patch -p1 < /location/where/the/patch/is/alsa-hdsp.patch
Comment 7 Andreas Dehmel 2007-10-23 19:12:50 UTC
The patch didn't apply because oddly enough there's a shift of about 50 lines in my sources, but as far as I know I have the bog standard gentoo-sources-2.6.22-r8 installed. I added the lines manually and that seems to fix the problem. I haven't rebooted 2.6.22 yet, but I did manually shut down and restart Alsa as well as query the card with amixer, all of which worked fine now. The card is also playing at the moment.
I'll attach the patch against my sources and post the outcome of my next shutdown/reboot tomorrow at the latest.
Comment 8 Andreas Dehmel 2007-10-23 19:13:56 UTC
Created attachment 134189 [details, diff]
Adapted hdsp patch for my source tree
Comment 9 Andreas Dehmel 2007-10-24 19:28:45 UTC
OK, shutdown worked fine as well (as was expected after manual Alsa start/stop worked), so I'd say you can close the bug. Could you tell me how this patch will be handled upstream (Alsa) and in future versions of gentoo-sources?

Comment 10 Mike Pagano gentoo-dev 2007-10-24 23:29:38 UTC
So I committed the patch to genpatches for 2.6.22 and 2.6.23 so they will be in the next patch released for both versions when that occurs.

The upstream patch has made it to Linus' tree and will be in the 2.6.24 release.

Bug will be closed once the gentoo-sources revision containing the patch is
released.
Comment 11 Mike Pagano gentoo-dev 2007-11-02 17:32:51 UTC
Please note that genpatches-2.6.23-2 has been released with this patch included, gentoo-sources-2.6.23-r1 is using it.
Comment 12 Daniel Drake (RETIRED) gentoo-dev 2007-11-07 13:17:30 UTC
also fixed in gentoo-sources-2.6.22-r10