[alsa-devel] seg fault with 1.0.17rc2
#0 0xb7e892ff in memcpy () from /lib/tls/libc.so.6 #1 0xb74e40a9 in snd_pcm_area_copy (dst_area=0xb7125b70, dst_offset=0, src_area=0x81dc1c0, src_offset=170, samples=0, format=SND_PCM_FORMAT_S16_LE) at pcm.c:2589 #2 0xb74e438d in snd_pcm_areas_copy (dst_areas=0xb7125b7c, dst_offset=0, src_areas=0x81dc1cc, src_offset=170, channels=1, frames=122, format=SND_PCM_FORMAT_S16_LE) at pcm.c:2736 #3 0xb74ee0a1 in snd_pcm_mmap_read_areas (pcm=0x81de3b8, areas=0xb7125b70, offset=0, size=122) at pcm_mmap.c:151 #4 0xb74e350d in snd1_pcm_read_areas (pcm=0x81de3b8, areas=0xb7125b70, offset=0, size=122, func=0xb74edfd0 <snd_pcm_mmap_read_areas>) at pcm.c:6501 #5 0xb74ed2df in snd_pcm_mmap_readi (pcm=0x81de3b8, buffer=0xb6352a04, size=122) at pcm_mmap.c:236 #6 0xb74dbb14 in snd_pcm_readi (pcm=0x81de110, buffer=0xb6352a04, size=61) at pcm_local.h:526 #7 0xb756279b in alsa_read (chan=0x821c928) at chan_alsa.c:683 #8 0x080855b1 in __ast_read (chan=0x821c928, dropaudio=0) at channel.c:2100
I am using a usb-audio device.
Bus 003 Device 001: ID 0000:0000 Bus 003 Device 002: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter Bus 002 Device 002: ID 13fe:1f00 Bus 002 Device 001: ID 0000:0000 Bus 004 Device 001: ID 0000:0000 Bus 001 Device 001: ID 0000:0000
I am using this as my asound.conf file
pcm.usb-audio { type hw card 0 }
ctl.usb-audio { type hw card 0 }
I am using debian etch 2.6.18-6-486 #1 Fri Jun 6 21:47:01 UTC 2008 i486 GNU/Linux
It works for a couple times then I get the seg fault. I am using the Console output from asterisk.
help? Thanks,
Jerry
At Thu, 26 Jun 2008 10:38:57 -0400, Jerry Geis wrote:
#0 0xb7e892ff in memcpy () from /lib/tls/libc.so.6 #1 0xb74e40a9 in snd_pcm_area_copy (dst_area=0xb7125b70, dst_offset=0, src_area=0x81dc1c0, src_offset=170, samples=0, format=SND_PCM_FORMAT_S16_LE) at pcm.c:2589
samples = 0 and...
#2 0xb74e438d in snd_pcm_areas_copy (dst_areas=0xb7125b7c, dst_offset=0, src_areas=0x81dc1cc, src_offset=170, channels=1, frames=122, format=SND_PCM_FORMAT_S16_LE) at pcm.c:2736
... here frames = 122. Something inconsistent around here. snd_pcm_areas_copy() must passe samples=frames when channels=1. Could you check the values via gdb?
Takashi
Takashi Iwai wrote:
At Thu, 26 Jun 2008 10:38:57 -0400, Jerry Geis wrote:
#0 0xb7e892ff in memcpy () from /lib/tls/libc.so.6 #1 0xb74e40a9 in snd_pcm_area_copy (dst_area=0xb7125b70, dst_offset=0, src_area=0x81dc1c0, src_offset=170, samples=0, format=SND_PCM_FORMAT_S16_LE) at pcm.c:2589
samples = 0 and...
#2 0xb74e438d in snd_pcm_areas_copy (dst_areas=0xb7125b7c, dst_offset=0, src_areas=0x81dc1cc, src_offset=170, channels=1, frames=122, format=SND_PCM_FORMAT_S16_LE) at pcm.c:2736
... here frames = 122. Something inconsistent around here. snd_pcm_areas_copy() must passe samples=frames when channels=1. Could you check the values via gdb?
Takashi
Takashi,
I am not sure what your asking me. The output I provided is gdb what else can I check? Really anxious to get this USB sound device playing consistantly.
Is there a better asound.conf to use? How can I help?
Jerry
At Thu, 26 Jun 2008 12:03:24 -0400, Jerry Geis wrote:
Takashi Iwai wrote:
At Thu, 26 Jun 2008 10:38:57 -0400, Jerry Geis wrote:
#0 0xb7e892ff in memcpy () from /lib/tls/libc.so.6 #1 0xb74e40a9 in snd_pcm_area_copy (dst_area=0xb7125b70, dst_offset=0, src_area=0x81dc1c0, src_offset=170, samples=0, format=SND_PCM_FORMAT_S16_LE) at pcm.c:2589
samples = 0 and...
#2 0xb74e438d in snd_pcm_areas_copy (dst_areas=0xb7125b7c, dst_offset=0, src_areas=0x81dc1cc, src_offset=170, channels=1, frames=122, format=SND_PCM_FORMAT_S16_LE) at pcm.c:2736
... here frames = 122. Something inconsistent around here. snd_pcm_areas_copy() must passe samples=frames when channels=1. Could you check the values via gdb?
Takashi
Takashi,
I am not sure what your asking me. The output I provided is gdb what else can I check? Really anxious to get this USB sound device playing consistantly.
Check whether frames still 122 in frame#1, for example.
Is there a better asound.conf to use?
The strange thing is that the recent config for usb-audio also uses dmix/dsnoop. And you don't get any errors with the system-default config?
Takashi
Takashi Iwai wrote:
At Thu, 26 Jun 2008 12:03:24 -0400, Jerry Geis wrote:
Takashi Iwai wrote:
At Thu, 26 Jun 2008 10:38:57 -0400, Jerry Geis wrote:
#0 0xb7e892ff in memcpy () from /lib/tls/libc.so.6 #1 0xb74e40a9 in snd_pcm_area_copy (dst_area=0xb7125b70, dst_offset=0, src_area=0x81dc1c0, src_offset=170, samples=0, format=SND_PCM_FORMAT_S16_LE) at pcm.c:2589
samples = 0 and...
#2 0xb74e438d in snd_pcm_areas_copy (dst_areas=0xb7125b7c, dst_offset=0, src_areas=0x81dc1cc, src_offset=170, channels=1, frames=122, format=SND_PCM_FORMAT_S16_LE) at pcm.c:2736
... here frames = 122. Something inconsistent around here. snd_pcm_areas_copy() must passe samples=frames when channels=1. Could you check the values via gdb?
Takashi
Takashi,
I am not sure what your asking me. The output I provided is gdb what else can I check? Really anxious to get this USB sound device playing consistantly.
Check whether frames still 122 in frame#1, for example.
Is there a better asound.conf to use?
The strange thing is that the recent config for usb-audio also uses dmix/dsnoop. And you don't get any errors with the system-default config?
Takashi
Takashi,
checking frames still 122 in frame #1 is way over my expertise.
With this asound.conf file It plays but choppy audio.
defaults.ctl.card 0 defaults.pcm.card 0
pcm.card0 { type hw card 0 }
pcm.dmixer { type dmix ipc_key 1025 slave { pcm "hw:0,0" period_time 0 period_size 2048 buffer_size 32768 rate 48000 } bindings { 0 0 1 1 } } pcm.skype { type asym
playback.pcm "dmixer" capture.pcm "card0" }
pcm.!default { type plug slave.pcm "skype" }
Jerry
At Thu, 26 Jun 2008 12:46:24 -0400, Jerry Geis wrote:
Takashi Iwai wrote:
At Thu, 26 Jun 2008 12:03:24 -0400, Jerry Geis wrote: Takashi Iwai wrote: At Thu, 26 Jun 2008 10:38:57 -0400, Jerry Geis wrote: #0 0xb7e892ff in memcpy () from /lib/tls/libc.so.6 #1 0xb74e40a9 in snd_pcm_area_copy (dst_area=0xb7125b70, dst_offset=0, src_area=0x81dc1c0, src_offset=170, samples=0, format=SND_PCM_FORMAT_S16_LE) at pcm.c:2589 samples = 0 and... #2 0xb74e438d in snd_pcm_areas_copy (dst_areas=0xb7125b7c, dst_offset=0, src_areas=0x81dc1cc, src_offset=170, channels=1, frames=122, format=SND_PCM_FORMAT_S16_LE) at pcm.c:2736 ... here frames = 122. Something inconsistent around here. snd_pcm_areas_copy() must passe samples=frames when channels=1. Could you check the values via gdb? Takashi Takashi, I am not sure what your asking me. The output I provided is gdb what else can I check? Really anxious to get this USB sound device playing consistantly. Check whether frames still 122 in frame#1, for example. Is there a better asound.conf to use? The strange thing is that the recent config for usb-audio also uses dmix/dsnoop. And you don't get any errors with the system-default config? Takashi
Takashi,
checking frames still 122 in frame #1 is way over my expertise.
With this asound.conf file It plays but choppy audio.
And doesn't it work if you don't define anything, just using the system default?
The bug must be fixed, of course. But I still don't see why you have to redefine the configuration...
Takashi
defaults.ctl.card 0 defaults.pcm.card 0
pcm.card0 { type hw card 0 }
pcm.dmixer { type dmix ipc_key 1025 slave { pcm "hw:0,0" period_time 0 period_size 2048 buffer_size 32768 rate 48000 } bindings { 0 0 1 1 } } pcm.skype { type asym
playback.pcm "dmixer" capture.pcm "card0" }
pcm.!default { type plug slave.pcm "skype" }
Jerry
Takashi Iwai wrote:
At Thu, 26 Jun 2008 12:46:24 -0400, Jerry Geis wrote:
Takashi Iwai wrote:
At Thu, 26 Jun 2008 12:03:24 -0400, Jerry Geis wrote: Takashi Iwai wrote: At Thu, 26 Jun 2008 10:38:57 -0400, Jerry Geis wrote: #0 0xb7e892ff in memcpy () from /lib/tls/libc.so.6 #1 0xb74e40a9 in snd_pcm_area_copy (dst_area=0xb7125b70, dst_offset=0, src_area=0x81dc1c0, src_offset=170, samples=0, format=SND_PCM_FORMAT_S16_LE) at pcm.c:2589 samples = 0 and... #2 0xb74e438d in snd_pcm_areas_copy (dst_areas=0xb7125b7c, dst_offset=0, src_areas=0x81dc1cc, src_offset=170, channels=1, frames=122, format=SND_PCM_FORMAT_S16_LE) at pcm.c:2736 ... here frames = 122. Something inconsistent around here. snd_pcm_areas_copy() must passe samples=frames when channels=1. Could you check the values via gdb? Takashi Takashi, I am not sure what your asking me. The output I provided is gdb what else can I check? Really anxious to get this USB sound device playing consistantly. Check whether frames still 122 in frame#1, for example. Is there a better asound.conf to use? The strange thing is that the recent config for usb-audio also uses dmix/dsnoop. And you don't get any errors with the system-default config? Takashi
Takashi,
checking frames still 122 in frame #1 is way over my expertise.
With this asound.conf file It plays but choppy audio.
And doesn't it work if you don't define anything, just using the system default?
The bug must be fixed, of course. But I still don't see why you have to redefine the configuration...
Takashi
defaults.ctl.card 0 defaults.pcm.card 0
pcm.card0 { type hw card 0 }
pcm.dmixer { type dmix ipc_key 1025 slave { pcm "hw:0,0" period_time 0 period_size 2048 buffer_size 32768 rate 48000 } bindings { 0 0 1 1 } } pcm.skype { type asym
playback.pcm "dmixer" capture.pcm "card0" }
pcm.!default { type plug slave.pcm "skype" }
Jerry
No, thats what I am saying, when I remove the /etc/asound.conf file I get seg faults. When I run with the above file I get choppy audio but at least 15 times it played with no fault. I presume the system-default file is have no asound.conf file.
Now also, I am not just doing aplay, which seems to work everytime and audio sounds fine. I am using the console/dsp from asterisks and playing a wave file through that. Does that help.
How can I help?
Jerry
At Thu, 26 Jun 2008 12:59:08 -0400, Jerry Geis wrote:
Takashi Iwai wrote:
At Thu, 26 Jun 2008 12:46:24 -0400, Jerry Geis wrote: Takashi Iwai wrote: At Thu, 26 Jun 2008 12:03:24 -0400, Jerry Geis wrote: Takashi Iwai wrote: At Thu, 26 Jun 2008 10:38:57 -0400, Jerry Geis wrote: #0 0xb7e892ff in memcpy () from /lib/tls/libc.so.6 #1 0xb74e40a9 in snd_pcm_area_copy (dst_area=0xb7125b70, dst_offset=0, src_area=0x81dc1c0, src_offset=170, samples=0, format=SND_PCM_FORMAT_S16_LE) at pcm.c:2589 samples = 0 and... #2 0xb74e438d in snd_pcm_areas_copy (dst_areas=0xb7125b7c, dst_offset=0, src_areas=0x81dc1cc, src_offset=170, channels=1, frames=122, format=SND_PCM_FORMAT_S16_LE) at pcm.c:2736 ... here frames = 122. Something inconsistent around here. snd_pcm_areas_copy() must passe samples=frames when channels=1. Could you check the values via gdb? Takashi Takashi, I am not sure what your asking me. The output I provided is gdb what else can I check? Really anxious to get this USB sound device playing consistantly. Check whether frames still 122 in frame#1, for example. Is there a better asound.conf to use? The strange thing is that the recent config for usb-audio also uses dmix/dsnoop. And you don't get any errors with the system-default config? Takashi Takashi, checking frames still 122 in frame #1 is way over my expertise. With this asound.conf file It plays but choppy audio. And doesn't it work if you don't define anything, just using the system default? The bug must be fixed, of course. But I still don't see why you have to redefine the configuration... Takashi defaults.ctl.card 0 defaults.pcm.card 0 pcm.card0 { type hw card 0 } pcm.dmixer { type dmix ipc_key 1025 slave { pcm "hw:0,0" period_time 0 period_size 2048 buffer_size 32768 rate 48000 } bindings { 0 0 1 1 } } pcm.skype { type asym playback.pcm "dmixer" capture.pcm "card0" } pcm.!default { type plug slave.pcm "skype" } Jerry
No, thats what I am saying, when I remove the /etc/asound.conf file I get seg faults. When I run with the above file I get choppy audio but at least 15 times it played with no fault. I presume the system-default file is have no asound.conf file.
OK. Also make sure that you have no ~/.asoundrc file.
Now also, I am not just doing aplay, which seems to work everytime and audio sounds fine. I am using the console/dsp from asterisks and playing a wave file through that. Does that help.
The best is to find a simpler test case, such as arecord, because otherwise your problem cannot be reproduced on other environment easily.
Not sure which format and sample rate asterisk is using, but you may adjust parameters for arecord via command line options to fit with asterisk, too.
Takashi
Takashi Iwai wrote:
At Thu, 26 Jun 2008 12:59:08 -0400, Jerry Geis wrote:
Takashi Iwai wrote:
At Thu, 26 Jun 2008 12:46:24 -0400, Jerry Geis wrote: Takashi Iwai wrote: At Thu, 26 Jun 2008 12:03:24 -0400, Jerry Geis wrote: Takashi Iwai wrote: At Thu, 26 Jun 2008 10:38:57 -0400, Jerry Geis wrote: #0 0xb7e892ff in memcpy () from /lib/tls/libc.so.6 #1 0xb74e40a9 in snd_pcm_area_copy (dst_area=0xb7125b70, dst_offset=0, src_area=0x81dc1c0, src_offset=170, samples=0, format=SND_PCM_FORMAT_S16_LE) at pcm.c:2589 samples = 0 and... #2 0xb74e438d in snd_pcm_areas_copy (dst_areas=0xb7125b7c, dst_offset=0, src_areas=0x81dc1cc, src_offset=170, channels=1, frames=122, format=SND_PCM_FORMAT_S16_LE) at pcm.c:2736 ... here frames = 122. Something inconsistent around here. snd_pcm_areas_copy() must passe samples=frames when channels=1. Could you check the values via gdb? Takashi Takashi, I am not sure what your asking me. The output I provided is gdb what else can I check? Really anxious to get this USB sound device playing consistantly. Check whether frames still 122 in frame#1, for example. Is there a better asound.conf to use? The strange thing is that the recent config for usb-audio also uses dmix/dsnoop. And you don't get any errors with the system-default config? Takashi Takashi, checking frames still 122 in frame #1 is way over my expertise. With this asound.conf file It plays but choppy audio. And doesn't it work if you don't define anything, just using the system default? The bug must be fixed, of course. But I still don't see why you have to redefine the configuration... Takashi defaults.ctl.card 0 defaults.pcm.card 0 pcm.card0 { type hw card 0 } pcm.dmixer { type dmix ipc_key 1025 slave { pcm "hw:0,0" period_time 0 period_size 2048 buffer_size 32768 rate 48000 } bindings { 0 0 1 1 } } pcm.skype { type asym playback.pcm "dmixer" capture.pcm "card0" } pcm.!default { type plug slave.pcm "skype" } Jerry
No, thats what I am saying, when I remove the /etc/asound.conf file I get seg faults. When I run with the above file I get choppy audio but at least 15 times it played with no fault. I presume the system-default file is have no asound.conf file.
OK. Also make sure that you have no ~/.asoundrc file.
Now also, I am not just doing aplay, which seems to work everytime and audio sounds fine. I am using the console/dsp from asterisks and playing a wave file through that. Does that help.
The best is to find a simpler test case, such as arecord, because otherwise your problem cannot be reproduced on other environment easily.
Not sure which format and sample rate asterisk is using, but you may adjust parameters for arecord via command line options to fit with asterisk, too.
Takashi
I am not having any luck using arecord and aplay to simulate my problem.
Do you have any further suggestions?
Jerry
Jerry Geis wrote:
Takashi Iwai wrote:
At Thu, 26 Jun 2008 12:59:08 -0400, Jerry Geis wrote:
Takashi Iwai wrote:
At Thu, 26 Jun 2008 12:46:24 -0400, Jerry Geis wrote: Takashi Iwai wrote: At Thu, 26 Jun 2008 12:03:24 -0400, Jerry Geis wrote: Takashi Iwai wrote: At Thu, 26 Jun 2008 10:38:57 -0400, Jerry Geis wrote: #0 0xb7e892ff in memcpy () from /lib/tls/libc.so.6 #1 0xb74e40a9 in snd_pcm_area_copy (dst_area=0xb7125b70, dst_offset=0, src_area=0x81dc1c0, src_offset=170, samples=0, format=SND_PCM_FORMAT_S16_LE) at pcm.c:2589 samples = 0 and... #2 0xb74e438d in snd_pcm_areas_copy (dst_areas=0xb7125b7c, dst_offset=0, src_areas=0x81dc1cc, src_offset=170, channels=1, frames=122, format=SND_PCM_FORMAT_S16_LE) at pcm.c:2736 ... here frames = 122. Something inconsistent around here. snd_pcm_areas_copy() must passe samples=frames when channels=1. Could you check the values via gdb? Takashi Takashi, I am not sure what your asking me. The output I provided is gdb what else can I check? Really anxious to get this USB sound device playing consistantly. Check whether frames still 122 in frame#1, for example. Is there a better asound.conf to use? The strange thing is that the recent config for usb-audio also uses dmix/dsnoop. And you don't get any errors with the system-default config? Takashi Takashi, checking frames still 122 in frame #1 is way over my expertise. With this asound.conf file It plays but choppy audio. And doesn't it work if you don't define anything, just using the system default? The bug must be fixed, of course. But I still don't see why you have to redefine the configuration... Takashi defaults.ctl.card 0 defaults.pcm.card 0 pcm.card0 { type hw card 0 } pcm.dmixer { type dmix ipc_key 1025 slave { pcm "hw:0,0" period_time 0 period_size 2048 buffer_size 32768 rate 48000 } bindings { 0 0 1 1 } } pcm.skype { type asym playback.pcm "dmixer" capture.pcm "card0" } pcm.!default { type plug slave.pcm "skype" } Jerry
No, thats what I am saying, when I remove the /etc/asound.conf file I get seg faults. When I run with the above file I get choppy audio but at least 15 times it played with no fault. I presume the system-default file is have no asound.conf file.
OK. Also make sure that you have no ~/.asoundrc file.
Now also, I am not just doing aplay, which seems to work everytime and audio sounds fine. I am using the console/dsp from asterisks and playing a wave file through that. Does that help.
The best is to find a simpler test case, such as arecord, because otherwise your problem cannot be reproduced on other environment easily.
Not sure which format and sample rate asterisk is using, but you may adjust parameters for arecord via command line options to fit with asterisk, too.
Takashi
I am not having any luck using arecord and aplay to simulate my problem.
Do you have any further suggestions?
Jerry
As a thought I switched my asterisk interface from using alsa to oss. The audio is fine now not choppy and no seg faults.
Jerry
participants (2)
-
Jerry Geis
-
Takashi Iwai