Re: Assertion failure in alsa-lib crashing applications (snd_pcm_area_copy: Assertion `dst < src || dst >= src + bytes' failed)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 26 Jun 2016 20:28:32 +0200,
Baptiste Jonglez wrote:
> 
> Is there anything else I can provide to help getting this issue fixed?
> 
> The main issue is that snd_pcm_area_copy() gets called with overlapping
> source and destination buffers, which triggers this assertion before a
> memcpy:
> 
>   http://git.alsa-project.org/?p=alsa-lib.git;a=blob;f=src/pcm/pcm.c;h=0d0d093deb49f2db7d207b29b728df372cce84bc;hb=HEAD#l2762

Right, this isn't supposed to happen.

> This happens when the system is really loaded (CPU-wise).
> 
> Do you think the problem is likely to come from an incorrect API usage
> from the application?  Knowing this would significantly narrow down the
> search, because the problem could also come from within alsa itself.
> 
> The callling code from the application is quite complex, see here:
> 
>   https://github.com/savoirfairelinux/ring-daemon/blob/master/src/media/audio/alsa/alsalayer.cpp
> 
> In particular, the assertion is triggered by the call to
> snd_pcm_avail_update() at line 694 (see the stack trace below).

I have too little time to investigate on this issue, but judging from
the fact that there has been no such a report until now, I guess it's
specific to your code.  But I can't say sure, of course.

Is the relevant code path accessed concurrently?  The possible race is
the first suspect I'd always think of in such a case.


Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux