pipewire crashing since (probably) 0918899b
When e.g. pavucontrol
is closed:
../src/modules/module-client-node/client-node.c:1496:21: runtime error: member access within null pointer of type 'struct pw_resource'
AddressSanitizer:DEADLYSIGNAL
=================================================================
==103940==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000058 (pc 0x7fefd6ba838d bp 0x7fff03e6c810 sp 0x7fff03e6c770 T0)
==103940==The signal is caused by a READ memory access.
==103940==Hint: address points to the zero page.
#0 0x7fefd6ba838d in impl_mix_port_set_io ../src/modules/module-client-node/client-node.c:1496
#1 0x7fefdbbba4a7 in port_set_io ../src/pipewire/impl-link.c:441
#2 0x7fefdbbc6bb6 in pw_impl_link_deactivate ../src/pipewire/impl-link.c:844
#3 0x7fefdbc13991 in node_deactivate ../src/pipewire/impl-node.c:173
#4 0x7fefdbc476ce in pw_impl_node_destroy ../src/pipewire/impl-node.c:1859
#5 0x7fefd6ba135a in client_node_resource_destroy ../src/modules/module-client-node/client-node.c:1234
#6 0x7fefdbcce47b in pw_resource_destroy ../src/pipewire/resource.c:335
#7 0x7fefdbae4714 in destroy_resource ../src/pipewire/impl-client.c:584
#8 0x7fefdbadaf04 in pw_map_for_each ../src/pipewire/map.h:238
#9 0x7fefdbae61b3 in pw_impl_client_destroy ../src/pipewire/impl-client.c:638
#10 0x7fefd80ee42a in handle_client_error ../src/modules/module-protocol-native.c:410
#11 0x7fefd80eecb7 in connection_data ../src/modules/module-protocol-native.c:447
#12 0x7fefd84c4e74 in source_io_func ../spa/plugins/support/loop.c:443
#13 0x7fefd84c41f3 in loop_iterate ../spa/plugins/support/loop.c:431
#14 0x7fefdbbea086 in pw_main_loop_run ../src/pipewire/main-loop.c:148
#15 0x5606622b5722 in main ../src/daemon/pipewire.c:131
#16 0x7fefdac3c28f (/usr/lib/libc.so.6+0x2328f)
#17 0x7fefdac3c349 in __libc_start_main (/usr/lib/libc.so.6+0x23349)
#18 0x5606622b42a4 in _start ../sysdeps/x86_64/start.S:115
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV ../src/modules/module-client-node/client-node.c:1496 in impl_mix_port_set_io
==103940==ABORTING
I have not done a git-bisect yet but since 0918899b introduced the access to the resource I think it is very likely the first bad commit.
As far as I can see client_node_resource_destroy()
clears node::resource
, afterwards when impl_mix_port_set_io()
is called, it tries to dereference the NULL pointer.