On Tue, Jun 14, 2016 at 11:02:21PM +0200, Baptiste Jonglez wrote:
Hi,
On Tue, Jun 07, 2016 at 07:29:35PM +0200, Baptiste Jonglez wrote:
When using Ring [1], an audio-video application, it sometimes crashes because of an assertion in libasound.so:
pcm.c:2758: snd_pcm_area_copy: Assertion `dst < src || dst >= src + bytes' failed.
The complete upstream bug report is at [2]. The (not-so-useful) stack trace is the following:
<snip>
The next time it crashes, I will have debug symbols in dring. I can also recompile alsa-lib with debug symbols, what is the best way to do that?
As promised, here is a new stack trace with debug symbols:
<snip>
Sorry, this stack trace still had some arguments optimised out. Here is the stack trace without optimisation:
#0 0x00007f42a8696295 in raise () from /usr/lib/libc.so.6 #1 0x00007f42a86976da in abort () from /usr/lib/libc.so.6 #2 0x00007f42a868f297 in __assert_fail_base () from /usr/lib/libc.so.6 #3 0x00007f42a868f342 in __assert_fail () from /usr/lib/libc.so.6 #4 0x00007f42ad7463da in snd_pcm_area_copy (dst_area=0x7f4290ced250, dst_offset=144, src_area=0x7f4290ced260, src_offset=0, samples=0, format=SND_PCM_FORMAT_S32_LE) at pcm.c:2758 #5 0x00007f42ad746918 in snd_pcm_areas_copy (dst_areas=0x7f427c000e90, dst_offset=72, src_areas=0x7f427c000e90, src_offset=0, channels=2, frames=1904, format=SND_PCM_FORMAT_S32_LE) at pcm.c:2904 #6 0x00007f42ad79cb66 in softvol_convert_stereo_vol (svol=0x7f427c02f500, dst_areas=0x7f427c000e70, dst_offset=72, src_areas=0x7f427c000e70, src_offset=0, channels=2, frames=1904) at pcm_softvol.c:291 #7 0x00007f42ad79e081 in snd_pcm_softvol_read_areas (pcm=0x7f427c031080, areas=0x7f427c000e70, offset=72, size=1904, slave_areas=0x7f427c000e70, slave_offset=0, slave_sizep=0x7f4290ced408) at pcm_softvol.c:630 #8 0x00007f42ad75e367 in snd_pcm_plugin_avail_update (pcm=0x7f427c031080) at pcm_plugin.c:490 #9 0x00007f42ad745c3e in snd_pcm_avail_update (pcm=0x7f427c031080) at pcm.c:2508 #10 0x00007f42ad75e214 in snd_pcm_plugin_avail_update (pcm=0x7f427c02fc70) at pcm_plugin.c:460 #11 0x00007f42ad745c3e in snd_pcm_avail_update (pcm=0x7f427c02faa0) at pcm.c:2508 #12 0x00000000005486d4 in ring::AlsaLayer::capture (this=0x1978220) at alsalayer.cpp:694 #13 0x0000000000545de4 in ring::AlsaThread::run (this=0x19706f0) at alsalayer.cpp:137
Attached is a full stack trace with local variables. I can provide the core dump privately.
Also note that this happens when the application is under high CPU pressure (for instance other programs with higher priority are using all available CPU cores).
The calling code into the lib is here, when capturing from a device:
https://github.com/savoirfairelinux/ring-daemon/blob/master/src/media/audio/...
Baptiste
Is there anything in there that could explain the assertion failure? Perhaps a wrong API usage?
Thanks, Baptiste
Looking around, it seems other projects have run into the same issue:
https://aur.archlinux.org/packages/ultrastardx-git/?comments=all#comment-435458 https://aur.archlinux.org/packages/zoom/#comment-544696 http://ubuntuforums.org/showthread.php?t=2248373 https://github.com/js-platform/node-webrtc/issues/110 https://fedorahosted.org/fldigi/ticket/70
The output of the alsa-info.sh script on my system is at [3]. What else can I provide to debug this issue further?
Thanks, Baptiste
[1] https://ring.cx [2] https://tuleap.ring.cx/plugins/tracker/?aid=502 [3] http://www.alsa-project.org/db/?f=0dd2ba1021b3d535f30f07c55dc18e2ef60db26d
Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel