Bug 7299 - Client side PulseAudio crashes with ALSA pcm.c assertion
Summary: Client side PulseAudio crashes with ALSA pcm.c assertion
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Sound (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: LowPrio
Assignee: Pierre Ossman
Depends on: 6966
  Show dependency treegraph
Reported: 2018-12-19 15:05 CET by Peter Åstrand
Modified: 2019-12-16 17:12 CET (History)
1 user (show)

See Also:
Acceptance Criteria:


Description Peter Åstrand cendio 2018-12-19 15:05:24 CET
We have a report of the Linux client PulseAudio crashes with:

pulseaudio[E]: pulseaudio: pcm.c:3050: snd_pcm_area_copy: Assertion 'src < dst || src >= dst + bytes' failed

pcm.c is from alsa-utils rather than PulseAudio. This problem is discussed here:


From http://mailman.alsa-project.org/pipermail/alsa-devel/2016-June/109749.html:

"Now I reread the code again, and I guess it's really the racy
accesses.  Basically you can't call alsa-lib functions concurrently.
For example, calling snd_pcm_avail_update() from multiple threads
concurrently may lead to such an error.  Internally it copies /
converts the content (e.g. for softvol plugin), and this would
conflict when called in parallel."

Thus, even though the assert is in ALSA, it could be that the problem is in PulseAudio, which we ship.
Comment 1 Peter Åstrand cendio 2018-12-19 15:17:50 CET
Found this report:


They seem to think that this is a problem in ALSA after all, and refers to:


This fix is in alsa-libs v1.0.27.2 and later.
Comment 2 Karl Mikaelsson cendio 2019-01-02 14:19:45 CET
Customer claims to be using alsa-libs 1.1.3-1.
Comment 3 Pierre Ossman cendio 2019-01-14 13:41:29 CET
I tested ALSA on my Fedora 28 workstation (alsa-lib 1.1.6) without issues. What I did was:

 * remove /etc/alsa/conf.d/99-pulseaudio-default.conf

 * run: pasuspender tlclient

 * configure the client to use ALSA

Audio played without issues, and no errors in the log.

So it doesn't seem to be a general ALSA issue.
Comment 5 Pierre Ossman cendio 2019-11-13 12:49:26 CET
We've seen this before in bug 6966, but couldn't reproduce it then either.
Comment 7 Pierre Ossman cendio 2019-11-13 15:44:21 CET
Another upstream fix for ALSA:


And Fedora did a patch for an issue like this:


Ubuntu also has a report, that seems to have been automatically closed because of no more reports:

Comment 8 Samuel Mannehed cendio 2019-12-16 17:12:00 CET
Could reliably reproduce this on our eLux RP machine just now:

 Client OS: eLux RP 5.7.300
 Client ALSA version:
 ThinLinc client: 4.11.0rc1 (build 6323)

However, after seeing this problem we downgraded the ThinLinc client to 4.8 to see if it was a regression. After this point we could no longer reproduce the issue again, even upgrading back to 4.11.0rc1.

It seems like this is caused by something more subtle. Perhaps it has something to do with how the OS is installed.

In the state where we could see the bug eLux RP was just upgraded from 5.6 to 5.7. Looking at bug 6966 I would guess that the initial report in there was also made just after having upgraded eLux RP.

Note You need to log in before you can comment on or make changes to this bug.