jack_port_get_aliases() blocks until the buffer size change callback returns
If you are filing this issue with a regular release please try master as it might already be fixed.
Version, Distribution, Desktop Environment: 0.3.30, pipewire JACK dropin using arch linux
Description of Problem:
jack_port_get_aliases()
blocks until the buffer size change callback returns
How Reproducible: not sure, it happened very randomly in my app
Steps to Reproduce:
- wait for the JACK buffer size callback to be called and sleep in there
- call
jack_port_get_aliases()
from another thread while the buffer size callback is sleeping
Actual Results:
looks like jack_port_get_aliases()
blocks while buffer size callback is sleeping:
Thread 26 (Thread 0x7fffb57fa640 (LWP 1701274) "Zrythm"):
0 0x00007ffff6035a95 in clock_nanosleep@GLIBC_2.2.5 () at /usr/lib/libc.so.6
1 0x00007ffff603ac77 in nanosleep () at /usr/lib/libc.so.6
2 0x00007ffff7ee55f1 in g_usleep () at /usr/lib/libglib-2.0.so.0
3 0x0000555555ea26e6 in process_change_request (self=0x5555832f8370) at ../src/audio/engine_jack.c:197
4 0x0000555555ea2a66 in buffer_size_cb (nframes=2048, self=0x5555832f8370) at ../src/audio/engine_jack.c:263
5 0x00007ffff68b395b in () at /usr/lib/pipewire-0.3/jack/libjack.so.0
6 0x00007ffff7fb3d66 in () at /usr/lib/spa-0.2/support/libspa-support.so
7 0x00007ffff7fb2c66 in () at /usr/lib/spa-0.2/support/libspa-support.so
8 0x00007ffff7fb511b in () at /usr/lib/spa-0.2/support/libspa-support.so
9 0x00007ffff4d248f6 in () at /usr/lib/libpipewire-0.3.so.0
10 0x00007ffff6890259 in start_thread () at /usr/lib/libpthread.so.0
11 0x00007ffff606d5e3 in clone () at /usr/lib/libc.so.6
Thread 1 (Thread 0x7ffff1c0fb80 (LWP 1701249) "zrythm"):
0 0x00007ffff6899600 in __lll_lock_wait () at /usr/lib/libpthread.so.0
1 0x00007ffff6892580 in pthread_mutex_lock () at /usr/lib/libpthread.so.0
2 0x00007ffff4d24c9e in pw_thread_loop_lock () at /usr/lib/libpipewire-0.3.so.0
3 0x00007ffff68c1f7b in jack_port_get_aliases () at /usr/lib/pipewire-0.3/jack/libjack.so.0
4 0x0000555555e0c648 in ext_port_from_jack_port (jport=0x7fff98009030) at ../src/audio/ext_port.c:471
5 0x0000555555e0c851 in get_ext_ports_from_jack (type=TYPE_AUDIO, flow=FLOW_OUTPUT, hw=1, arr=0x7fffffffdb60, size=0x7fffffffdbc4) at ../src/audio/ext_port.c:536
6 0x0000555555e0ce66 in ext_ports_get (type=TYPE_AUDIO, flow=FLOW_OUTPUT, hw=true, arr=0x7fffffffdb60, size=0x7fffffffdbc4) at ../src/audio/ext_port.c:826
7 0x0000555555e17deb in hardware_processor_rescan_ext_ports (self=0x555582afc160) at ../src/audio/hardware_processor.c:195
8 0x00007ffff7ebc614 in () at /usr/lib/libglib-2.0.so.0
9 0x00007ffff7ebbf30 in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
10 0x00007ffff7f0fb59 in () at /usr/lib/libglib-2.0.so.0
11 0x00007ffff7eb9781 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
12 0x00007ffff730828e in g_application_run () at /usr/lib/libgio-2.0.so.0
13 0x0000555555dd8e7b in main (argc=1, argv=0x7fffffffdf38) at ../src/main.c:52
Expected Results:
jack_port_get_aliases()
should not wait for buffer size callback to finish
Additional Info Eg. pw-dump -N > file
(As Attachment Please):