Your message dated Thu, 06 Aug 2020 15:38:18 +0000
with message-id <[email protected]>
and subject line Bug#944509: fixed in portaudio19 19.6.0-1.1
has caused the Debian Bug report #944509,
regarding libportaudio2: random crashes in pa_linux_alsa.c: Assertion failed -
fix available
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
944509: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=944509
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libportaudio2
Version: 19.6.0-1
Severity: important
Dear PA maintainers,
our RaspberryPi based smart speaker software started crashing with the
update to buster - the reason is not really clear, but pyaudio started
to crash with
python3: src/hostapi/alsa/pa_linux_alsa.c:3641:
PaAlsaStreamComponent_BeginPolling: Assertion `ret == self->nfds' failed.
I could reproduce this bug 100% with our pyaudio based application on
arm, but I guess it might show up in other areas, too.
Fortunately, there is a patch posted to the portaudio mailing list
already back in July 2019 (but I only found it recently).
https://lists.columbia.edu/pipermail/portaudio/2019-July/001888.html
I rebuild the arm version of libportaudio2 locally and after installing
it on our system, with nothing else changed, the crashed went away.
(patch attached)
I have already contacted upstream mailing list to include the patch, but
the activity level of development there is rather low.
Could you be so nice and include this patch into the Debian sources,
ideally backporting/uploading it also to buster?
Thanks a lot and all the best
Norbert
-- System Information:
Debian Release: bullseye/sid
APT prefers unstable
APT policy: (500, 'unstable'), (200, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 5.3.10 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_WARN, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages libportaudio2 depends on:
ii libasound2 1.1.9-1
ii libc6 2.29-3
ii libjack0 [libjack-0.125] 1:0.125.0-3+b1
libportaudio2 recommends no packages.
libportaudio2 suggests no packages.
-- no debconf information
diff --git a/src/hostapi/alsa/pa_linux_alsa.c b/src/hostapi/alsa/pa_linux_alsa.c
index 584cde8..643198c 100644
--- a/src/hostapi/alsa/pa_linux_alsa.c
+++ b/src/hostapi/alsa/pa_linux_alsa.c
@@ -3628,12 +3628,18 @@ error:
/** Fill in pollfd objects.
*/
-static PaError PaAlsaStreamComponent_BeginPolling( PaAlsaStreamComponent*
self, struct pollfd* pfds )
+static PaError PaAlsaStreamComponent_BeginPolling( PaAlsaStreamComponent*
self, struct pollfd* pfds, int *xrunOccurred )
{
PaError result = paNoError;
int ret = alsa_snd_pcm_poll_descriptors( self->pcm, pfds, self->nfds );
- (void)ret; /* Prevent unused variable warning if asserts are turned off */
- assert( ret == self->nfds );
+ if( -EPIPE == ret )
+ {
+ *xrunOccurred = 1;
+ }
+ else
+ {
+ assert( ret == self->nfds );
+ }
self->ready = 0;
@@ -3794,17 +3800,22 @@ static PaError PaAlsaStream_WaitForFrames( PaAlsaStream
*self, unsigned long *fr
if( pollCapture )
{
capturePfds = self->pfds;
- PA_ENSURE( PaAlsaStreamComponent_BeginPolling( &self->capture,
capturePfds ) );
+ PA_ENSURE( PaAlsaStreamComponent_BeginPolling( &self->capture,
capturePfds, &xrun ) );
totalFds += self->capture.nfds;
}
if( pollPlayback )
{
/* self->pfds is in effect an array of fds; if necessary, index
past the capture fds */
playbackPfds = self->pfds + (pollCapture ? self->capture.nfds : 0);
- PA_ENSURE( PaAlsaStreamComponent_BeginPolling( &self->playback,
playbackPfds ) );
+ PA_ENSURE( PaAlsaStreamComponent_BeginPolling( &self->playback,
playbackPfds, &xrun ) );
totalFds += self->playback.nfds;
}
+ if ( xrun )
+ {
+ break;
+ }
+
#ifdef PTHREAD_CANCELED
if( self->callbackMode )
{
--- End Message ---
--- Begin Message ---
Source: portaudio19
Source-Version: 19.6.0-1.1
Done: Thorsten Glaser <[email protected]>
We believe that the bug you reported is fixed in the latest version of
portaudio19, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Thorsten Glaser <[email protected]> (supplier of updated portaudio19 package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA384
Format: 1.8
Date: Thu, 30 Jul 2020 16:27:02 +0200
Source: portaudio19
Architecture: source
Version: 19.6.0-1.1
Distribution: unstable
Urgency: medium
Maintainer: Debian VoIP Team <[email protected]>
Changed-By: Thorsten Glaser <[email protected]>
Closes: 944509
Changes:
portaudio19 (19.6.0-1.1) unstable; urgency=medium
.
* Non-maintainer upload.
* Apply crash fix patch (Closes: #944509)
Checksums-Sha1:
b35793e74894df149c86b6edb328cf94a655ef59 2397 portaudio19_19.6.0-1.1.dsc
ec7517b161d4afaf520e114e944e55979b61b368 9008
portaudio19_19.6.0-1.1.debian.tar.xz
Checksums-Sha256:
e631df0f31b07114e62a28f113cae25c813f8c8a694091eb90fae95a40d5ae9a 2397
portaudio19_19.6.0-1.1.dsc
5e5bc9d6ab9c5da1d642965d3713e3ee4d197b01a423eb878c5cde47633f29ad 9008
portaudio19_19.6.0-1.1.debian.tar.xz
Files:
997da2a0d5d8190ebea9ebf4ed2dcd6b 2397 sound optional portaudio19_19.6.0-1.1.dsc
75561c54b3ca624f8a34c1fbb6840cb6 9008 sound optional
portaudio19_19.6.0-1.1.debian.tar.xz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (MirBSD)
Comment: ☃ ЦΤℱ—8 ☕☂☄
iQIcBAEBCQAGBQJfIt1+AAoJEHa1NLLpkAfg0eYP/j3s6XBj1rdj7D1FwCYIuM7c
Kczs0m1nS8YSKp5tcDIeoiuLQfe0Kq76CEEZTEzO5eXHwxZZz4x8PIXWTAqKTfID
n6qwEXglOO+B05DQ/jxMYnZZ8/wV9X4kroxYRLvAUPvYEXm42YQkJbPzNqVRqoF7
R5hQqOilwif5wUJLXLQHd4J1CVzjOqywC8AMIuCKsWfJbOpF3VAWPA8De0njO3oW
mjH+JmBCeN9HMyjA8qVGfhs1lE59lbw6hIcviBlBXGw7/sVUu5TN8cLxCOLNqIdo
+min90ktYmj1S3QvcCkXkMpx2OjPxqiLmrkzh6wJ8+LzIh2CukGFix0gBj1K5Gbj
IyHvtS41eqlQUhi1/fwC0yrh8pcrycV9q990bbA/URz3DSxMQKsv5ogzdGptjR6s
NEqVUvkyGH3xlFKzC3aTRdHXE16M8hsn3zYdignxjHzS3xFVyr3GbDUL+6mcQfen
MdhFASlSzyh2jBOaTVbB7+iFQkHf4dtpcKXHuvP1TRHy+tCRxljV4KotEWudjwwj
/jrngzcuHH5h+Nzi9KRxy6q2d5l/cJVMj4c+ZxEon623yLNMYApcZI1OkfuOZqAZ
3zBZQNC7bjQwTK65htU08SF1wLMp9ajd84Lq4OaeBAw0YsXLiG+ZLhsOgQ+QAgo3
uQDV3Wo8cqJOPrNxstr+
=6y8a
-----END PGP SIGNATURE-----
--- End Message ---