pipewire/pipewire-jack
Wim Taymans 2a4222a538 jack: fix race in get_buffer_output()
When a single output port is linked to multiple input ports of the same
client and the client uses multiple threads to process the input ports,
get_buffer_output() is called from multiple threads concurrently and
causes a race.

Multiple threads will try to dequeue a buffer concurrently and set the
HAVE_DATA io status, which causes the port to run out of buffers quickly
and the io are to become corrupted.

Use CAS to make sure only one thread dequeues and sets the io status.
The other concurrent threads will spin until there is a buffer. The fast
path will be that the buffer is already dequeued and then it is simply
reused.

Fixes #5324
2026-06-25 11:21:01 +02:00
..
examples pipewire-jack: examples: video-dsp-play: add missing includes 2025-02-02 14:25:08 +01:00
jack jack: use a new JackPortIsMIDI2 flag 2025-01-27 13:05:21 +01:00
src jack: fix race in get_buffer_output() 2026-06-25 11:21:01 +02:00
meson.build [Meson] Change jack-devel option to be boolean 2021-08-06 07:56:16 +00:00