Rack: alsa error

Created on 19 Sep 2017  路  9Comments  路  Source: VCVRack/Rack

Every few minutes I get an engine crash (probably after a few alsa underruns)

ALSA lib pcm.c:7963:(snd_pcm_recover) underrun occurred
Expression 'err' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3350
Expression 'ContinuePoll( self, StreamDirection_In, &pollTimeout, &pollCapture )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3891
Expression 'PaAlsaStream_WaitForFrames( stream, &framesAvail, &xrun )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 4269

I have a self-compiled version of the core. This happens even with no plugins loaded at startup.

build system

Most helpful comment

@maricn ok then maybe post your console output right after a crash.

All 9 comments

I experience the same on "dev" version I compiled on Debian.

Saving settings ./settings.json
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred

^ That's not the same issue @leopard86 is having.

@maricn do you experience a crash after this? Alsa underruns are not scary, maybe you will just hear some glitches, the problem is if these will crash your app.
I still experience these crashes with the latest dev, but maybe it's my machine. I can run VCV for hours if not connected to the audio card, but after I connect to Alsa some underruns occur in one or two minutes and then boom.

BTW: maybe I could ask for help in the linux audio mailing list?

I have audio glitches - clicking sound when underrun occurs, and usually experience crash after some time. I just built it last night, so didn't have a chance to properly play around yet..

@maricn ok then maybe post your console output right after a crash.

My issue maybe better fits to #131. Attaching details there too.

Basically, I also experience a crash every couple of minutes. That is, application hangs, so I interrupt it:

ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
Expression 'err' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3350
Expression 'ContinuePoll( self, StreamDirection_In, &pollTimeout, &pollCapture )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3891
Expression 'PaAlsaStream_WaitForFrames( stream, &framesAvail, &xrun )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 4269
^CMakefile:49: recipe for target 'run' failed
make: *** [run] Interrupt

It's been going on ea47c915 build, v0.4.0, and current master.
OS: Debian jessie.
aplay: version 1.0.28 by Jaroslav Kysela perex@perex.cz
Advanced Linux Sound Architecture Driver Version k3.16.0-4-amd64.

I wrote to the linuxaudio and the portaudio mailing list but so far I got no one replying.
BTW: I think this should be merged with #131
Increasing the buffer size reduces the number of underruns and this increases the "longevity" before the crash, but it is not a guarantee of success on the long run.

hi, I had the same problem in my software and posted on the portaudio mailing list: apparently this is due to ALSA's pulseaudio wrapper alsa-pulse.

Here's the mail: https://lists.columbia.edu/pipermail/portaudio/2018-January/001342.html

There is a WIP for a native pulseaudio backend https://app.assembla.com/spaces/portaudio/git/merge_requests/3719213

Closing this issue. Audio related problems in Linux will be covered in #1317

Was this page helpful?
0 / 5 - 0 ratings

Related issues

oblivionratula picture oblivionratula  路  7Comments

DomiKamu picture DomiKamu  路  6Comments

PixelBulb picture PixelBulb  路  4Comments

AndrewBelt picture AndrewBelt  路  4Comments

alectron picture alectron  路  6Comments