segfault in module-rt
Got a segfault in a program that plays sound to multiple alsasrc:es in different threads:
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x736d61f2 in spa_list_insert (elem=0x75b238c4, list=0x75b50065) at ../git/spa/include/spa/utils/list.h:61
[Current thread is 1 (LWP 1286)]
#0 0x736d61f2 in spa_list_insert (elem=0x75b238c4, list=0x75b50065) at ../git/spa/include/spa/utils/list.h:61
#1 impl_create (data=0x75b8d898, props=<optimized out>, start_routine=0x7479584d <do_loop>, arg=0x75b20228) at ../git/src/modules/module-rt.c:677
#2 0x74795c26 in spa_thread_utils_create (props=0x0, start_routine=<optimized out>, arg=0x75b20228, o=<optimized out>) at ../git/spa/include/spa/support/thread.h:85
#3 pw_data_loop_start (loop=0x75b20228) at ../git/src/pipewire/data-loop.c:203
#4 0x74790cc6 in pw_context_new (main_loop=main_loop@entry=0x75b6d0b0, properties=<optimized out>, user_data_size=user_data_size@entry=0) at ../git/src/pipewire/context.c:408
#5 0x7480efcc in snd_pcm_pipewire_open (period_bytes=1280, channels=1, format=SND_PCM_FORMAT_S32_LE, rate=16000, flags=0, mode=1, stream=SND_PCM_STREAM_PLAYBACK, role=<optimized out>, capture_node=<optimized out>, playback_node=<optimized out>, server_name=0x0, node_name=0x0, name=0x75b175e0 "audiosink0", pcmp=0x75138fb8) at ../git/pipewire-alsa/alsa-plugins/pcm_pipewire.c:1067
#6 _snd_pcm_pipewire_open (pcmp=0x75138fb8, name=0x75b175e0 "audiosink0", root=<optimized out>, conf=<optimized out>, stream=SND_PCM_STREAM_PLAYBACK, mode=1) at ../git/pipewire-alsa/alsa-plugins/pcm_pipewire.c:1231
#7 0x748a6b38 in snd_pcm_open_conf (pcmp=pcmp@entry=0x75138fb8, name=name@entry=0x75b175e0 "audiosink0", pcm_root=pcm_root@entry=0xd35520, pcm_conf=0x75b17600, stream=stream@entry=SND_PCM_STREAM_PLAYBACK, mode=mode@entry=1) at ../../../alsa-lib-1.2.5.1/src/pcm/pcm.c:2609
#8 0x748a6fec in snd_pcm_open_noupdate (pcmp=pcmp@entry=0x75138fb8, root=root@entry=0xd35520, name=0x75b175e0 "audiosink0", stream=stream@entry=SND_PCM_STREAM_PLAYBACK, mode=mode@entry=1, hop=1) at ../../../alsa-lib-1.2.5.1/src/pcm/pcm.c:2668
#9 0x748a9762 in snd1_pcm_open_named_slave (pcmp=pcmp@entry=0x75138fb8, name=name@entry=0x0, root=root@entry=0xd35520, conf=0x75b175a8, stream=stream@entry=SND_PCM_STREAM_PLAYBACK, mode=mode@entry=1, parent_conf=parent_conf@entry=0x75b6cfc8) at ../../../alsa-lib-1.2.5.1/src/pcm/pcm.c:2821
#10 0x748d8d3a in _snd_pcm_asym_open (pcmp=0x75138fb8, name=0x0, root=0xd35520, conf=0x75b6cfc8, stream=SND_PCM_STREAM_PLAYBACK, mode=1) at ../../../alsa-lib-1.2.5.1/src/pcm/pcm_asym.c:112
#11 0x748a6b38 in snd_pcm_open_conf (pcmp=pcmp@entry=0x75138fb8, name=name@entry=0x0, pcm_root=pcm_root@entry=0xd35520, pcm_conf=pcm_conf@entry=0x75b6cfc8, stream=stream@entry=SND_PCM_STREAM_PLAYBACK, mode=mode@entry=1) at ../../../alsa-lib-1.2.5.1/src/pcm/pcm.c:2609
#12 0x748a9730 in snd1_pcm_open_named_slave (pcmp=pcmp@entry=0x75138fb8, name=name@entry=0x0, root=root@entry=0xd35520, conf=0x75b6cfc8, stream=stream@entry=SND_PCM_STREAM_PLAYBACK, mode=mode@entry=1, parent_conf=parent_conf@entry=0x75b6d208) at ../../../alsa-lib-1.2.5.1/src/pcm/pcm.c:2823
#13 0x748c4316 in snd_pcm_open_slave (parent_conf=0x75b6d208, mode=1, stream=SND_PCM_STREAM_PLAYBACK, conf=<optimized out>, root=0xd35520, pcmp=0x75138fb8) at ../../../alsa-lib-1.2.5.1/src/pcm/pcm_local.h:1008
#14 _snd_pcm_plug_open (pcmp=0x75b01eec, name=0x75b6b530 "default", root=0xd35520, conf=0x75b6d208, stream=SND_PCM_STREAM_PLAYBACK, mode=1) at ../../../alsa-lib-1.2.5.1/src/pcm/pcm_plug.c:1324
#15 0x748a6b38 in snd_pcm_open_conf (pcmp=pcmp@entry=0x75b01eec, name=name@entry=0x75b6b530 "default", pcm_root=pcm_root@entry=0xd35520, pcm_conf=0x75b6d208, stream=stream@entry=SND_PCM_STREAM_PLAYBACK, mode=mode@entry=1) at ../../../alsa-lib-1.2.5.1/src/pcm/pcm.c:2609
#16 0x748a6fec in snd_pcm_open_noupdate (pcmp=pcmp@entry=0x75b01eec, root=0xd35520, name=name@entry=0x75b6b530 "default", stream=stream@entry=SND_PCM_STREAM_PLAYBACK, mode=mode@entry=1, hop=hop@entry=0) at ../../../alsa-lib-1.2.5.1/src/pcm/pcm.c:2668
#17 0x748a93ae in snd_pcm_open (pcmp=pcmp@entry=0x75b01eec, name=0x75b6b530 "default", stream=stream@entry=SND_PCM_STREAM_PLAYBACK, mode=mode@entry=1) at ../../../alsa-lib-1.2.5.1/src/pcm/pcm.c:2698
#18 0x74924cae in gst_alsasink_open (asink=0x75b01cc0) at ../gst-plugins-base-1.18.3/ext/alsa/gstalsasink.c:859
#19 0x75a9d90a in gst_audio_ring_buffer_open_device (buf=0x75b6cbc0) at ../gst-plugins-base-1.18.3/gst-libs/gst/audio/gstaudioringbuffer.c:469
#20 0x75a930ba in gst_audio_base_sink_change_state (element=0x75b01cc0, transition=GST_STATE_CHANGE_NULL_TO_READY) at ../gst-plugins-base-1.18.3/gst-libs/gst/audio/gstaudiobasesink.c:2412
#21 0x76c9a2c4 in gst_element_change_state (element=0x75b01cc0, transition=<optimized out>) at ../gstreamer-1.18.3/gst/gstelement.c:3076
#22 0x76c9a3d4 in gst_element_set_state_func (element=0x75b01cc0, state=<optimized out>) at ../gstreamer-1.18.3/gst/gstelement.c:3030
#23 0x7366406a in gst_auto_detect_find_best (self=0x75b1f0c8) at ../gst-plugins-good-1.18.3/gst/autodetect/gstautodetect.c:313
#24 gst_auto_detect_detect (self=0x75b1f0c8) at ../gst-plugins-good-1.18.3/gst/autodetect/gstautodetect.c:374
#25 gst_auto_detect_change_state (element=0x75b1f0c8, transition=GST_STATE_CHANGE_NULL_TO_READY) at ../gst-plugins-good-1.18.3/gst/autodetect/gstautodetect.c:426
#26 0x76c9a2c4 in gst_element_change_state (element=0x75b1f0c8, transition=<optimized out>) at ../gstreamer-1.18.3/gst/gstelement.c:3076
#27 0x76c9a3d4 in gst_element_set_state_func (element=0x75b1f0c8, state=<optimized out>) at ../gstreamer-1.18.3/gst/gstelement.c:3030
#28 0x75ae2ed0 in try_element (playsink=0xd12d30, unref=1, element=0x75b1f0c8) at ../gst-plugins-base-1.18.3/gst/playback/gstplaysink.c:1466
#29 gen_audio_chain (raw=1, playsink=0xd12d30) at ../gst-plugins-base-1.18.3/gst/playback/gstplaysink.c:2703
#30 gst_play_sink_do_reconfigure (playsink=0xd12d30) at ../gst-plugins-base-1.18.3/gst/playback/gstplaysink.c:3557
#31 sinkpad_blocked_cb (blockedpad=<optimized out>, info=<optimized out>, user_data=0xd12d30) at ../gst-plugins-base-1.18.3/gst/playback/gstplaysink.c:4386
#32 0x76ca667c in probe_hook_marshal (hook=0x75b24468, data=0x751392b8) at ../gstreamer-1.18.3/gst/gstpad.c:3637
#33 0x76b591a6 in g_hook_list_marshal (hook_list=hook_list@entry=0x75b1e628, may_recurse=may_recurse@entry=1, marshaller=marshaller@entry=0x76ca6509 <probe_hook_marshal>, data=data@entry=0x751392b8) at ../glib-2.68.4/glib/ghook.c:672
#34 0x76ca63c6 in do_probe_callbacks (pad=pad@entry=0x75b1e5c0, info=info@entry=0x75139350, defaultval=defaultval@entry=GST_FLOW_OK) at ../gstreamer-1.18.3/gst/gstpad.c:3800
#35 0x76ca771e in gst_pad_push_event_unchecked (pad=pad@entry=0x75b1e5c0, event=0x75b1c2b0, type=type@entry=GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) at ../gstreamer-1.18.3/gst/gstpad.c:5435
#36 0x76ca7980 in push_sticky (pad=0x75b1e5c0, ev=0x751393d0, user_data=0x75139414) at ../gstreamer-1.18.3/gst/gstevent.h:412
#37 0x76ca6a16 in events_foreach (pad=pad@entry=0x75b1e5c0, func=0x76ca7945 <push_sticky>, user_data=user_data@entry=0x75139414) at ../gstreamer-1.18.3/gst/gstpad.c:608
#38 0x76cab60e in check_sticky (event=0x75b1c2b0, pad=0x75b1e5c0) at ../gstreamer-1.18.3/gst/gstpad.c:4058
#39 gst_pad_push_event (pad=pad@entry=0x75b1e5c0, event=0x75b1c2b0) at ../gstreamer-1.18.3/gst/gstpad.c:5619
#40 0x76cab674 in event_forward_func (pad=0x75b1e5c0, data=0x7513948c) at ../gstreamer-1.18.3/gst/gstevent.h:412
#41 0x76ca9e54 in gst_pad_forward (pad=pad@entry=0x75b1e380, forward=0x76cab661 <event_forward_func>, user_data=user_data@entry=0x7513948c) at ../gstreamer-1.18.3/gst/gstpad.c:3074
#42 0x76ca9eca in gst_pad_event_default (pad=0x75b1e380, parent=<optimized out>, event=0x75b1c2b0) at ../gstreamer-1.18.3/gst/gstpad.c:3171
#43 0x76ca7196 in gst_pad_send_event_unchecked (pad=pad@entry=0x75b1e380, event=event@entry=0x75b1c2b0, type=<optimized out>, type@entry=GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) at ../gstreamer-1.18.3/gst/gstpad.c:5844
#44 0x76ca77fe in gst_pad_push_event_unchecked (pad=pad@entry=0x75b6b910, event=0x75b1c2b0, type=<optimized out>, type@entry=GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) at ../gstreamer-1.18.3/gst/gstpad.c:5488
#45 0x76ca7980 in push_sticky (pad=0x75b6b910, ev=0x751395a8, user_data=0x751395ec) at ../gstreamer-1.18.3/gst/gstevent.h:412
#46 0x76ca6a16 in events_foreach (pad=pad@entry=0x75b6b910, func=0x76ca7945 <push_sticky>, user_data=user_data@entry=0x751395ec) at ../gstreamer-1.18.3/gst/gstpad.c:608
#47 0x76cab60e in check_sticky (event=0x75b1c2b0, pad=0x75b6b910) at ../gstreamer-1.18.3/gst/gstpad.c:4058
#48 gst_pad_push_event (pad=0x75b6b910, event=0x75b1c2b0) at ../gstreamer-1.18.3/gst/gstpad.c:5619
#49 0x76ca7196 in gst_pad_send_event_unchecked (pad=pad@entry=0x75b526b8, event=event@entry=0x75b1c2b0, type=<optimized out>, type@entry=GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) at ../gstreamer-1.18.3/gst/gstpad.c:5844
#50 0x76ca77fe in gst_pad_push_event_unchecked (pad=pad@entry=0x75b20bd8, event=0x75b1c2b0, type=<optimized out>, type@entry=GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) at ../gstreamer-1.18.3/gst/gstpad.c:5488
#51 0x76ca7980 in push_sticky (pad=0x75b20bd8, ev=0x75139718, user_data=0x7513975c) at ../gstreamer-1.18.3/gst/gstevent.h:412
#52 0x76ca6a16 in events_foreach (pad=pad@entry=0x75b20bd8, func=0x76ca7945 <push_sticky>, user_data=user_data@entry=0x7513975c) at ../gstreamer-1.18.3/gst/gstpad.c:608
#53 0x76cab60e in check_sticky (event=0x75b1c2b0, pad=0x75b20bd8) at ../gstreamer-1.18.3/gst/gstpad.c:4058
#54 gst_pad_push_event (pad=pad@entry=0x75b20bd8, event=0x75b1c2b0) at ../gstreamer-1.18.3/gst/gstpad.c:5619
#55 0x76cab674 in event_forward_func (pad=0x75b20bd8, data=0x751397d4) at ../gstreamer-1.18.3/gst/gstevent.h:412
#56 0x76ca9e54 in gst_pad_forward (pad=pad@entry=0x75b69b20, forward=0x76cab661 <event_forward_func>, user_data=user_data@entry=0x751397d4) at ../gstreamer-1.18.3/gst/gstpad.c:3074
#57 0x76ca9eca in gst_pad_event_default (pad=0x75b69b20, parent=<optimized out>, event=0x75b1c2b0) at ../gstreamer-1.18.3/gst/gstpad.c:3171
#58 0x76ca7196 in gst_pad_send_event_unchecked (pad=pad@entry=0x75b69b20, event=event@entry=0x75b1c2b0, type=<optimized out>, type@entry=GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) at ../gstreamer-1.18.3/gst/gstpad.c:5844
#59 0x76ca77fe in gst_pad_push_event_unchecked (pad=pad@entry=0x75b004b0, event=0x75b1c2b0, type=<optimized out>, type@entry=GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) at ../gstreamer-1.18.3/gst/gstpad.c:5488
#60 0x76ca7980 in push_sticky (pad=0x75b004b0, ev=0x751398f0, user_data=0x75139934) at ../gstreamer-1.18.3/gst/gstevent.h:412
#61 0x76ca6a16 in events_foreach (pad=pad@entry=0x75b004b0, func=0x76ca7945 <push_sticky>, user_data=user_data@entry=0x75139934) at ../gstreamer-1.18.3/gst/gstpad.c:608
#62 0x76cab60e in check_sticky (event=0x75b1c2b0, pad=0x75b004b0) at ../gstreamer-1.18.3/gst/gstpad.c:4058
#63 gst_pad_push_event (pad=pad@entry=0x75b004b0, event=0x75b1c2b0) at ../gstreamer-1.18.3/gst/gstpad.c:5619
#64 0x76cab674 in event_forward_func (pad=0x75b004b0, data=0x751399ac) at ../gstreamer-1.18.3/gst/gstevent.h:412
#65 0x76ca9e54 in gst_pad_forward (pad=pad@entry=0x75b222f0, forward=0x76cab661 <event_forward_func>, user_data=user_data@entry=0x751399ac) at ../gstreamer-1.18.3/gst/gstpad.c:3074
#66 0x76ca9eca in gst_pad_event_default (pad=0x75b222f0, parent=<optimized out>, event=0x75b1c2b0) at ../gstreamer-1.18.3/gst/gstpad.c:3171
#67 0x76ca7196 in gst_pad_send_event_unchecked (pad=pad@entry=0x75b222f0, event=event@entry=0x75b1c2b0, type=<optimized out>, type@entry=GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) at ../gstreamer-1.18.3/gst/gstpad.c:5844
#68 0x76ca77fe in gst_pad_push_event_unchecked (pad=pad@entry=0x75b22080, event=0x75b1c2b0, type=<optimized out>, type@entry=GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) at ../gstreamer-1.18.3/gst/gstpad.c:5488
#69 0x76ca7980 in push_sticky (pad=0x75b22080, ev=0x75139ac8, user_data=0x75139b0c) at ../gstreamer-1.18.3/gst/gstevent.h:412
#70 0x76ca6a16 in events_foreach (pad=pad@entry=0x75b22080, func=0x76ca7945 <push_sticky>, user_data=user_data@entry=0x75139b0c) at ../gstreamer-1.18.3/gst/gstpad.c:608
#71 0x76cab60e in check_sticky (event=0x75b20758, pad=0x75b22080) at ../gstreamer-1.18.3/gst/gstpad.c:4058
#72 gst_pad_push_event (pad=pad@entry=0x75b22080, event=0x75b20758) at ../gstreamer-1.18.3/gst/gstpad.c:5619
#73 0x7470883c in gst_pad_set_caps (caps=0x75b5ca30, pad=0x75b22080) at /usr/include/gstreamer-1.0/gst/gstcompat.h:59
#74 gst_wavparse_add_src_pad (wav=wav@entry=0x75b21c48, buf=buf@entry=0x75b37e40) at ../gst-plugins-good-1.18.3/gst/wavparse/gstwavparse.c:1943
#75 0x74708b4a in gst_wavparse_stream_data (wav=wav@entry=0x75b21c48, flushing=flushing@entry=0) at ../gst-plugins-good-1.18.3/gst/wavparse/gstwavparse.c:2110
#76 0x7470aa7e in gst_wavparse_loop (pad=0x75b22f88) at ../gst-plugins-good-1.18.3/gst/wavparse/gstwavparse.c:2251
#77 0x76cc39bc in gst_task_func (task=0x75b22480) at ../gstreamer-1.18.3/gst/gsttask.c:328
#78 0x76b80c16 in g_thread_pool_thread_proxy (data=<optimized out>) at ../glib-2.68.4/glib/gthreadpool.c:354
#79 0x76b80512 in g_thread_proxy (data=0xced720) at ../glib-2.68.4/glib/gthread.c:826
#80 0x76a3cf3e in start_thread (arg=0x974a97c5) at pthread_create.c:434