mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-14 20:36:32 +00:00
b9f7ab6052
This is a fix for a data race leading to: > GLib-CRITICAL: g_hash_table_foreach: > assertion 'version == hash_table->version' failed Identified sequence: * `rtp_session_on_timeout` acquires the lock on `session` and proceeds with its processing. * `rtp_session_process_rtcp` is called (debug log : received RTCP packet) and attempts to acquire the lock on `session`, which is still held by `rtp_session_on_timeout`. * as part of an hash table iterator, `rtp_session_on_timeout` transitively invokes `source_caps` which releases the lock on `session` so as to call `session->callbacks.caps`. * Since `rtp_session_process_rtcp` was waiting for the lock to be released, it succeeds in acquiring it and proceeds with `rtp_session_process_rr` which transitively calls `g_hash_table_insert` via `add_source`. * After `source_caps` re-acquires the lock and gives the control flow back to `rtp_session_on_timeout`, the hash table iterator is changed, resulting in the assertion failure. This commits copies `sess->ssrcs[sess->mask_idx]` and iterates on the copy so the iterator is not affected by a concurrent change due to the lock being released in the `source_caps` callback. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4585> |
||
---|---|---|
.. | ||
gstrtpbin.c | ||
gstrtpbin.h | ||
gstrtpdtmfmux.c | ||
gstrtpdtmfmux.h | ||
gstrtpfunnel.c | ||
gstrtpfunnel.h | ||
gstrtphdrext-clientaudiolevel.c | ||
gstrtphdrext-clientaudiolevel.h | ||
gstrtphdrext-mid.c | ||
gstrtphdrext-mid.h | ||
gstrtphdrext-ntp.c | ||
gstrtphdrext-ntp.h | ||
gstrtphdrext-repairedstreamid.c | ||
gstrtphdrext-repairedstreamid.h | ||
gstrtphdrext-streamid.c | ||
gstrtphdrext-streamid.h | ||
gstrtphdrext-twcc.c | ||
gstrtphdrext-twcc.h | ||
gstrtpjitterbuffer.c | ||
gstrtpjitterbuffer.h | ||
gstrtpmanager.c | ||
gstrtpmux.c | ||
gstrtpmux.h | ||
gstrtpptdemux.c | ||
gstrtpptdemux.h | ||
gstrtprtxqueue.c | ||
gstrtprtxqueue.h | ||
gstrtprtxreceive.c | ||
gstrtprtxreceive.h | ||
gstrtprtxsend.c | ||
gstrtprtxsend.h | ||
gstrtpsession.c | ||
gstrtpsession.h | ||
gstrtpssrcdemux.c | ||
gstrtpssrcdemux.h | ||
gstrtpst2022-1-fecdec.c | ||
gstrtpst2022-1-fecdec.h | ||
gstrtpst2022-1-fecenc.c | ||
gstrtpst2022-1-fecenc.h | ||
gstrtputils.c | ||
gstrtputils.h | ||
meson.build | ||
rtpjitterbuffer.c | ||
rtpjitterbuffer.h | ||
rtpsession.c | ||
rtpsession.h | ||
rtpsource.c | ||
rtpsource.h | ||
rtpstats.c | ||
rtpstats.h | ||
rtptimerqueue.c | ||
rtptimerqueue.h | ||
rtptwcc.c | ||
rtptwcc.h |