"Unable to handle kernel paging request" panic in snd-usb-audio on x86_64
Hi,
Last month I submitted a patch adding support for non-standard sample rates to the snd-usb-audio driver [1], which was added to the ALSA GIT tree.
This works fine with 2.6.16 on i386 on one of my machines, but causes a kernel panic on opening the sound device on my other machine (dual AMD Opterton with x86_64 kernel).
I need to go and hook up a serial cable to get the full panic, but the gist of it is:
Unable to handle kernel paging request
snd_pcm_hw_refine+658
snd_pcm_common_ioctl+423
snd_pcm_hw_constraint_list+31
snd_usb_pcm_open+976
snd_pcm_hw_constraint_minmax+39
RIP: snd_pcm_hw_params_any
I've had this on both 2.6.17 with only the above patch (which seems to compile cleanly), and also on 2.6.18-rc7 with the MM patches whih includes a git-alsa pull.
Before I dig out the serial cable to get a full panic trace, is there anything which I ought to be looking at as a first port of call, which would explain why this happens on x86_64 bit not i386?
Thanks,
Luke
[1] http://www.spinics.net/lists/alsa-devel/msg03536.html
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
At Wed, 20 Sep 2006 23:51:28 +0100,
Quoted 24 lines · Luke Ross
Hi,
Last month I submitted a patch adding support for non-standard sample rates to the snd-usb-audio driver [1], which was added to the ALSA GIT tree.
This works fine with 2.6.16 on i386 on one of my machines, but causes a kernel panic on opening the sound device on my other machine (dual AMD Opterton with
x86_64kernel).I need to go and hook up a serial cable to get the full panic, but the gist of it is:
Unable to handle kernel paging requestsnd_pcm_hw_refine+658
snd_pcm_common_ioctl+423
snd_pcm_hw_constraint_list+31
snd_usb_pcm_open+976
snd_pcm_hw_constraint_minmax+39RIP: snd_pcm_hw_params_any
Quoted 7 lines
I've had this on both 2.6.17 with only the above patch (which seems to compile cleanly), and also on 2.6.18-rc7 with the MM patches whih includes a git-alsa pull.
Before I dig out the serial cable to get a full panic trace, is there anything which I ought to be looking at as a first port of call, which would explain why this happens on
x86_64bit not i386?
Try to build with debug option. Maybe it comes from OSS emulation?
Or are you using dmix?
Takashi
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Hi,
Quoted 7 lines · Takashi Iwai
At Wed, 20 Sep 2006 23:51:28 +0100,
Quoted 5 lines · Luke Ross
Last month I submitted a patch adding support for non-standard sample rates to the snd-usb-audio driver [1], which was added to the ALSA GIT tree.
Quoted 7 lines
Quoted 3 lines
This works fine with 2.6.16 on i386 on one of my machines, but causes a kernel panic on opening the sound device on my other machine (dual AMD Opterton with
x86_64kernel).Try to build with debug option. Maybe it comes from OSS emulation?
Or are you using dmix?
At the moment I'm using neither. I'm using an alsa-enabled mpg123:
mpg123 -a hw:1,0 sound.mp3
I've built the kernel with CONFIG_SND_DEBUG, which I assume is what you mean, but I didn't get any further output. Do you need to enable the debug at runtime as well?
Luke
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Hi,
Quoted 10 lines · Takashi Iwai
Quoted 6 lines
Quoted 2 lines
Or are you using dmix?
At the moment I'm using neither. I'm using an alsa-enabled mpg123:
mpg123 -a hw:1,0 sound.mp3
Is there any other known program to cause this?
Also, does it happen with the very first time you use the sound driver, too?
Yes, it happens with all programs I've tried so far, including gstream-properties, and it always happens on the first time the channel is PCM opened (the mixer is fine).
Quoted 1 line
I still couldn't find a proper way to reproduce this bug...
So I can compare, which kernel version are you using? As touched on before, it only happens to me on x86_64, and it may be SMP dependent (my i386 machine is uniprocessor, my x86_64 one is SMP).
I'm still awaiting the laplink cable to do a full panic log :-(
Thanks,
Luke
Signature · 7 lines
``Never attribute to malice what can be explained by incompetence.'' (Hanlon) ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
At Fri, 22 Sep 2006 11:48:50 +0100,
Quoted 15 lines · Luke Ross
Hi,
Quoted 11 lines · Takashi Iwai
At Wed, 20 Sep 2006 23:51:28 +0100,
Quoted 8 lines · Luke Ross
Last month I submitted a patch adding support for non-standard sample rates to the snd-usb-audio driver [1], which was added to the ALSA GIT tree.
This works fine with 2.6.16 on i386 on one of my machines, but causes a kernel panic on opening the sound device on my other machine (dual AMD Opterton with
x86_64kernel).
Quoted 7 lines
Quoted 3 lines
Try to build with debug option. Maybe it comes from OSS emulation?
Or are you using dmix?
At the moment I'm using neither. I'm using an alsa-enabled mpg123:
mpg123 -a hw:1,0 sound.mp3
Is there any other known program to cause this?
Also, does it happen with the very first time you use the sound driver, too?
I still couldn't find a proper way to reproduce this bug...
Takashi
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Hi,
Quoted 11 lines · Takashi Iwai
Quoted 6 lines
Quoted 2 lines
I still couldn't find a proper way to reproduce this bug...
So I can compare, which kernel version are you using? As touched on before, it only happens to me on
x86_64, and it may be SMP dependent (my i386 machine is uniprocessor, myx86_64one is SMP).My test machine is an Intel x86-64 single core running (almost) vanilla 2.6.18 SMP kernel with HT. ALSA 1.0.13rc3 is now built on that, and seems working with mpg321, at least.
The whole ALSA stuff is built as modules.
Sorry if I've jumped to an incorrect conclusion here, but you are including the patch and/or Hg pull? Neither 2.6.18 nor 1.0.13rc3 incorporate the patch in question, as it went in after both of these were released. The patch is in Hg and also the latest -mm, although I can also reproduce the problem by taking a stock kernel and applying the patch as posted to the mailing list[1]
Regards,
Luke
Signature · 8 lines
``Avoid employing unlucky people - throw half of the pile of CVs in the bin without reading them'' (David Brent) ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
At Mon, 25 Sep 2006 00:48:58 +0100,
Quoted 11 lines · Luke Ross
Hi,
Quoted 7 lines · Takashi Iwai
Quoted 6 lines
Quoted 2 lines
Or are you using dmix?
At the moment I'm using neither. I'm using an alsa-enabled mpg123:
mpg123 -a hw:1,0 sound.mp3
Quoted 7 lines
Quoted 3 lines
Is there any other known program to cause this?
Also, does it happen with the very first time you use the sound driver, too?Yes, it happens with all programs I've tried so far, including gstream-properties, and it always happens on the first time the channel is PCM opened (the mixer is fine).
I have no mpg123 but only mpg321. And I don't use gstreamer... Anyway, then something else than I thought of.
Quoted 5 lines
Quoted 1 line
I still couldn't find a proper way to reproduce this bug...
So I can compare, which kernel version are you using? As touched on before, it only happens to me on
x86_64, and it may be SMP dependent (my i386 machine is uniprocessor, myx86_64one is SMP).
My test machine is an Intel x86-64 single core running (almost) vanilla 2.6.18 SMP kernel with HT. ALSA 1.0.13rc3 is now built on that, and seems working with mpg321, at least.
The whole ALSA stuff is built as modules.
Takashi
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
At Tue, 26 Sep 2006 11:13:15 +0100,
Quoted 16 lines · Luke Ross
Hi,
Quoted 11 lines · Takashi Iwai
Quoted 6 lines
Quoted 2 lines
I still couldn't find a proper way to reproduce this bug...
So I can compare, which kernel version are you using? As touched on before, it only happens to me on
x86_64, and it may be SMP dependent (my i386 machine is uniprocessor, myx86_64one is SMP).My test machine is an Intel x86-64 single core running (almost) vanilla 2.6.18 SMP kernel with HT. ALSA 1.0.13rc3 is now built on that, and seems working with mpg321, at least.
The whole ALSA stuff is built as modules.
Quoted 4 lines
Sorry if I've jumped to an incorrect conclusion here, but you are including the patch and/or Hg pull? Neither 2.6.18 nor 1.0.13rc3 incorporate the patch in question, as it went in after both of these were released.
Hm? ALSA 1.0.13rc3 includes _all_ HG patches...
Takashi
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Hi,
Quoted 12 lines · Takashi Iwai
Quoted 12 lines · Takashi Iwai
Quoted 11 lines
At Wed, 20 Sep 2006 23:51:28 +0100,
Quoted 8 lines · Luke Ross
Last month I submitted a patch adding support for non-standard sample rates to the snd-usb-audio driver [1], which was added to the ALSA GIT tree.
This works fine with 2.6.16 on i386 on one of my machines, but causes a kernel panic on opening the sound device on my other machine (dual AMD Opterton with
x86_64kernel).
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
Try to build with debug option. Maybe it comes from OSS emulation?
Or are you using dmix?
At the moment I'm using neither. I'm using an alsa-enabled mpg123:
mpg123 -a hw:1,0 sound.mp3
Here's the panic log, in the hope it makes things clearer.
Cheers,
Luke
Fedora Core release 5 (Bordeaux)
Kernel 2.6.17-1.2187_FC5 on an x86_64
hintertux login: Unable to handle kernel paging request at 0000000067f53f32 RIP:
<ffffffff881514a8>{:snd_pcm:snd_interval_list+91}
PGD 3d184067 PUD 0
Oops: 0000 [1] SMP
last sysfs file: /devices/pci0000:00/0000:00:07.3/i2c-0/0-002e/fan4_min
CPU 1
Modules linked in: ipv6 autofs4 w83627hf eeprom lm75 lm85 hwmon_vid hwmon i2c_isa hidp l2cap bluetooth ipt_REJECT xt_tcpudp xt_state ip_conntrack nfnetlink iptable_filter ip_tables x_tables dm_mirror dm_multipath dm_mod video button battery acpi_memhotplug ac lp parport_pc parport usb_storage snd_usb_audio snd_usb_lib snd_rawmidi snd_hwdep snd_intel8x0 snd_ac97_codec snd_ac97_bus snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq ohci1394 snd_seq_device ieee1394 snd_pcm_oss snd_mixer_oss ohci_hcd sg tg3 snd_pcm snd_timer snd soundcore snd_page_alloc hw_random i2c_amd8111 i2c_amd756 serio_raw i2c_core raid1 ext3 jbd sata_sil libata sd_mod scsi_mod
Pid: 3027, comm: mpg123 Not tainted 2.6.17-1.2187_FC5 #1
RIP: 0010:[<ffffffff881514a8>] <ffffffff881514a8>{:snd_pcm:snd_interval_list+91}
RSP: 0018:ffff810020389b50 EFLAGS: 00010206
RAX: 0000000037f8096b RBX: ffff810037f80c00 RCX: 0000000037f8096b
RDX: ffffffff88151986 RSI: 0000000037f80978 RDI: ffff810037f80d28
RBP: ffff810020389cb8 R08: 0000000000000fa0 R09: 0000000000000001
R10: ffff810020389cb3 R11: 00000000ffffffff R12: ffff810038a86450
R13: 0000000000000017 R14: 0000000000000019 R15: 0000000000000017
FS: 00002aaaaaae1380(0000) GS:ffff810037e91640(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000067f53f32 CR3: 000000002006d000 CR4: 00000000000006e0
Process mpg123 (pid: 3027, threadinfo ffff810020388000, task ffff810020353860)
Stack: ffffffff8814f43b ffff81001d15a960 0000000300000002 0000000500000004
0000000700000006 0000000900000008 0000000b0000000a 0000000d0000000c
0000000f0000000e 0000001100000010
Call Trace: <ffffffff8814f43b>{:snd_pcm:snd_pcm_hw_refine+658}
<ffffffff8814fb4a>{:snd_pcm:snd_pcm_common_ioctl1+447}
<ffffffff88154338>{:snd_pcm:snd_pcm_hw_constraint_list+31}
<ffffffff883246fe>{:snd_usb_audio:snd_usb_pcm_open+976}
<ffffffff88151986>{:snd_pcm:snd_pcm_hw_constraint_minmax+39}
<ffffffff80269d1c>{_read_unlock_irq+9} <ffffffff802075ed>{find_get_page+71}
<ffffffff80213e89>{filemap_nopage+390} <ffffffff802089be>{__handle_mm_fault+1303}
<ffffffff80269d8e>{_spin_lock_irqsave+9} <ffffffff80222cba>{__up_read+25}
<ffffffff88150b93>{:snd_pcm:snd_pcm_playback_ioctl1+569}
<ffffffff8020dd02>{do_mmap_pgoff+1543} <ffffffff881513e9>{:snd_pcm:snd_pcm_playback_ioctl+38}
<ffffffff80244ada>{do_ioctl+33} <ffffffff80231e88>{vfs_ioctl+598}
<ffffffff8024fb4d>{sys_ioctl+89} <ffffffff80262b41>{tracesys+209}
Code: 8b 04 82 39 47 04 75 08 f6 47 08 02 75 04 eb 18 77 09 ff c9 RIP <ffffffff881514a8>{:snd_pcm:snd_interval_list+91} RSP <ffff810020389b50>
CR2: 0000000067f53f32
<0>Kernel panic - not syncing: Oops
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
At Wed, 4 Oct 2006 21:13:41 +0100,
Quoted 18 lines · Luke Ross
Hi,
Quoted 14 lines · Takashi Iwai
Quoted 14 lines · Takashi Iwai
Quoted 13 lines
At Wed, 20 Sep 2006 23:51:28 +0100,
Quoted 8 lines · Luke Ross
Last month I submitted a patch adding support for non-standard sample rates to the snd-usb-audio driver [1], which was added to the ALSA GIT tree.
This works fine with 2.6.16 on i386 on one of my machines, but causes a kernel panic on opening the sound device on my other machine (dual AMD Opterton with
x86_64kernel).Try to build with debug option. Maybe it comes from OSS emulation?
Quoted 7 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line
Or are you using dmix?
At the moment I'm using neither. I'm using an alsa-enabled mpg123:
mpg123 -a hw:1,0 sound.mp3
Here's the panic log, in the hope it makes things clearer.
According to the stack trace, the problem looks rather like a problem of usb-audio driver than the PCM core stuff I've suspected.
Could you try the patch below? It's to the latest HG but should be applicable to other recent versions, too.
Takashi
usb/usbaudio.c +1 -1
@@ -2457,6 +2457,7 @@ static int parse_audio_format_rates(strureturn -1 ; } + fp->needs_knot =0 ;if (nr_rates) {/* * build the rate table and bitmap flags
@@ -2473,7 +2474,6 @@ static int parse_audio_format_rates(strureturn -1 ; } - fp->needs_knot =0 ; fp->nr_rates = nr_rates; fp->rate_min = fp->rate_max =combine_triple (&fmt[8 ]);for (r =0 , idx = offset +1 ; r < nr_rates; r++, idx +=3 ) {
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Hi,
Quoted 6 lines · Takashi Iwai
According to the stack trace, the problem looks rather like a problem of usb-audio driver than the PCM core stuff I've suspected.
Could you try the patch below? It's to the latest HG but should be applicable to other recent versions, too.
I gave your patch a try, but the problem is still there.
Just for the record, the device in question supports only one rate, which is a non-ALSA-standard one. Therefore, needs_knot should be set and hence the call to snd_pcm_hw_constraint_list.
As a basic sanity check I did some printk just before the call and neither runtime nor fp are null, and fp->nr_rates is 1 as expected. I'm happy to try some more printk to try and work out what's going on, but still don't quite see why the code/soundcard combination works on i386 but not x86_64 - could it be arch dependent?
Luke
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV