Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pulseaudio: Termination stream before operation release can lead locking #969

Merged

Conversation

illuusio
Copy link
Collaborator

Cases when Pulseaudio server releases stream before operation releasing can be lead locking in pa_threaded_mainloop_wait forever.

Test if operation is running before running pa_threaded_mainloop_wait which should prevent forever waiting releasing lock.

@illuusio illuusio added bug Something isn't working P2 Priority: High src-pulseaudio PulseAudio Host API in src/hostapi/pulseaudio labels Oct 19, 2024
@illuusio illuusio force-pushed the pulseaudio-termination-too-soon branch 2 times, most recently from 3fbac14 to 6d03bb5 Compare October 23, 2024 05:34
@illuusio
Copy link
Collaborator Author

illuusio commented Nov 9, 2024

@kleinerm could you approve this so I can merge it to repo..

@kleinerm
Copy link
Contributor

@illuusio Looks good to me, approved.

Cases when Pulseaudio server releases stream before operation releasing
can be lead locking in pa_threaded_mainloop_wait forever.

Test if operation is running before running pa_threaded_mainloop_wait
which should prevent forever waiting releasing lock.
As documentation says:
  This function may not be called inside the event loop thread.
  Events that are dispatched from the event loop thread are
  executed with this lock held.

Add small debug print that makes sure that future code won't be
calling it from main thread.
@illuusio illuusio force-pushed the pulseaudio-termination-too-soon branch from 6d03bb5 to 80b1168 Compare November 24, 2024 08:57
@RossBencina RossBencina merged commit aa1cfb0 into PortAudio:master Nov 25, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P2 Priority: High src-pulseaudio PulseAudio Host API in src/hostapi/pulseaudio
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants