All of lore.kernel.org
 help / color / mirror / Atom feed
From: GitHub issues - opened <github@alsa-project.org>
To: alsa-devel@alsa-project.org
Subject: Pulse PCM: stale notification pipe can cause repeated poll wakeups without readiness
Date: Thu,  3 Dec 2026 00:30:36 +0100 (CET)	[thread overview]
Message-ID: <18ed93b4ae48d000-webhooks-bot@alsa-project.org> (raw)
In-Reply-To: <18ed93b4ae1ae600-webhooks-bot@alsa-project.org>

alsa-project/alsa-plugins issue #69 was opened from aibarz:

A candidate fix for a reproducible stale-readiness condition in pulse/pcm_pulse.c is documented here:

https://gist.github.com/aibarz/89e321262222e5baba4a7b66df5a925d

When check_active() returns zero, pulse_pcm_poll_revents() clears the reported events but can leave the notification pipe readable. The candidate drains stale notifications using pulse_poll_deactivate() under the existing mainloop lock. Positive readiness and error paths remain unchanged.

The same callback behavior was inspected in ALSA master. Comparative tests were run on the Waydroid fork using real native Linux libraries and an isolated PipeWire/PulseAudio-compatible session. Across 12,000 forced stale-readiness cases per version, the original retained 12,000 false wakeups, whereas the candidate retained none; valid readiness was preserved in all 12,000 cases. Playback and capture regression tests also passed.

The linked Gist contains the bilingual explanation, patch, modified source and original license. This is a tested candidate for a conditional defect, not yet proof of the cause of naturally occurring Android audio HAL hangs. ALSA master itself has not yet been built/tested in this investigation. Android ABI and live validation remain pending.

Could maintainers review the synchronization and suggest a suitable upstream regression test?

Related symptom report (causal connection unconfirmed): https://github.com/waydroid/waydroid/issues/1683

Español: se ha reproducido y corregido en laboratorio una condicion de notificacion obsoleta. La documentacion completa y las limitaciones estan en el Gist enlazado.

Issue URL     : https://github.com/alsa-project/alsa-plugins/issues/69
Repository URL: https://github.com/alsa-project/alsa-plugins

           reply	other threads:[~2026-12-02 23:31 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <18ed93b4ae1ae600-webhooks-bot@alsa-project.org>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18ed93b4ae48d000-webhooks-bot@alsa-project.org \
    --to=github@alsa-project.org \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.