You are not logged in.

#1 2020-01-30 10:20:16

Theon144
Member
Registered: 2012-01-28
Posts: 15

PaAlsaStreamComponent_BeginPolling: Assertion `ret == self->nfds' fail

When I try to run `soundmeter` (a python script: https://github.com/shichao-an/soundmeter) it always runs fine for some amount of time, but then, invariably, fails with the following error:

python: src/hostapi/alsa/pa_linux_alsa.c:3636: PaAlsaStreamComponent_BeginPolling: Assertion `ret == self->nfds' failed.
Aborted (core dumped)

My googling revealed this is a fairly common issue:

https://askubuntu.com/questions/1159754 … -dont-know
https://github.com/alexa/avs-device-sdk/issues/532
https://app.assembla.com/spaces/portaud … 68/details

And I think that the problem is that PortAudio/ALSA throws an assert error (which is actually "just" an xrun?), but bubbles up and crashes the application.

The last link, the portaudio ticket, seems to indicate it was fixed somewhere, but I don't really know ALSA all that well, so I don't think I can just fix the issue myself using the alternative pa_linux_alsa.c file that's on there; and in any case, it's a thread from 2018, and I doubt it would work on the latest version. I was also thinking that ArchLinux may have its own patched version of ALSA somewhere, or another solution to this issue.

What should I do? Thanks in advance!

edit: for the record:

$ pacman -Q|grep pulse
libpulse 13.0-3.0
pulseaudio 13.0-3.0

edit2: This really is a bug of PortAudio; even their examples trigger this error.

Last edited by Theon144 (2020-01-30 13:42:33)

Offline

#2 2020-03-24 01:44:39

MegaLoler
Member
Registered: 2012-06-15
Posts: 16

Re: PaAlsaStreamComponent_BeginPolling: Assertion `ret == self->nfds' fail

Hi! I just wanted to chime in and say I'm having this issue as well!

It happens exactly the same for me: it runs fine for some nondeterminable amount of time, before crashing with such things like this:

ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
kft: src/hostapi/alsa/pa_linux_alsa.c:3636: PaAlsaStreamComponent_BeginPolling: Assertion `ret == self->nfds' failed.
$ uname -a
Linux Aardbei-Tablet 5.5.8-arch1-1 #1 SMP PREEMPT Fri, 06 Mar 2020 00:57:33 +0000 x86_64 GNU/Linux

Offline

Board footer

Powered by FluxBB