gstreamer/subprojects
Alicia Boya García 9ca194d8cc harness: Fix race condition when torn down during the handling of a non-serialized query or event
It's possible and normal to tear down a harness while the pipeline is
running. At the same time, it's desired for the
`gst_harness_pad_link_tear_down()` function to be synchronous.

This has created the conflict where the main thread may request a
harness to be torn down while it's in use or about to be used by a pad
in the streaming thread.

The previous implementation of `gst_harness_pad_link_tear_down()` tried
to handle this by taking the stream lock of the harnessed pad and
resetting all the pad functions while holding it. That approach was
however insufficient to handle the case where a non-serialized event
or query is being handled or about to be handled in a different thread.

This edge case was one race condition behind the flakes in the flvmux
check tests -- the rest being covered by https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2803.

This patch fixes the problem by adding an intermediate ref-counted
object, GstHarnessLink, which replaces the usage of the HARNESS_KEY
association. GstHarnessLink allows the pad functions such as event,
query and chain to borrow a reference to GstHarness and more
importantly, to lock the GstHarnessLink during their usage to block
(delay) its destruction until no users are left, and guarantee that any
future user will not receive an invalid GstHarness handle past its
destruction.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5017>
2023-07-12 13:18:00 +00:00
..
gst-devtools validate: disable plugins in static build 2023-05-31 15:17:11 +00:00
gst-docs dsd: Add code for DSD audio support 2023-06-23 01:27:03 +00:00
gst-editing-services ges: validate: Use correct types when getting structure values 2023-07-10 09:40:27 +01:00
gst-examples gst-examples: prepare for removal of kate plugin from cerbero 2023-06-05 06:45:54 +00:00
gst-integration-testsuites uridecodebin: Handle non dynamic sources with several source pads 2023-06-30 01:00:34 +00:00
gst-libav libav: Integrate FFmpeg's DSD support with GstDsd caps 2023-06-23 01:27:04 +00:00
gst-omx tools: add bad/ges/omx tools to gst_tools 2023-05-31 15:17:11 +00:00
gst-plugins-bad gl: Take into account viv-fb vs. viv_fb naming in meson scripts 2023-07-12 21:35:57 +10:00
gst-plugins-base gl: provide a pkg-config/gir file for the viv-fb backend 2023-07-12 21:35:55 +10:00
gst-plugins-good gl: Take into account viv-fb vs. viv_fb naming in meson scripts 2023-07-12 21:35:57 +10:00
gst-plugins-ugly gstreamer-full: add full static support 2023-05-31 15:17:11 +00:00
gst-python python: Fix variable name for gst_element_factory_make 2023-07-11 14:39:30 +00:00
gst-rtsp-server rtspclientsink: add RTSP address pool for unicast UDP 2023-06-29 11:33:58 +00:00
gstreamer harness: Fix race condition when torn down during the handling of a non-serialized query or event 2023-07-12 13:18:00 +00:00
gstreamer-sharp sharp: Mark _reserved fields as padding 2023-04-29 21:52:19 -04:00
gstreamer-vaapi vaapidecodebin: don't load vaapipostproc if not available 2023-06-08 12:50:41 +00:00
macos-bison-binary macos-bison-binary: Remove warning when running on arm64 2022-12-16 23:58:07 +00:00
packagefiles wrap: add libpsl patch to fix win build 2023-06-22 08:38:22 +00:00
win-flex-bison-binaries meson: Use run_command check: true for windows binary subprojects 2022-10-19 04:05:05 +00:00
win-nasm meson: Use run_command check: true for windows binary subprojects 2022-10-19 04:05:05 +00:00
avtp.wrap
bindinator.wrap
cairo.wrap subprojects: cairo: bump to 1.17.6 2022-09-17 22:41:40 +00:00
dav1d.wrap meson: add missing source_filename in the dav1d wrap 2023-04-03 14:29:36 +00:00
dssim.wrap
dv.wrap
expat.wrap meson: Update some more wraps 2022-12-10 15:13:09 +00:00
fdk-aac.wrap
FFmpeg.wrap
fontconfig.wrap subprojects: fontconfig: bump to 2.14.0 2022-09-17 22:41:40 +00:00
freetype2.wrap Update all wraps from WrapDB 2022-09-23 11:08:06 -04:00
fribidi.wrap subprojects: fribidi: bump to 1.0.12 2022-09-17 22:41:40 +00:00
gl-headers.wrap
glib-networking.wrap subprojects: update glib-networking to 2.74.0 and switch to file wrap 2022-11-18 00:51:48 +00:00
glib.wrap subprojects: update glib to 2.74.1 2022-11-18 00:50:56 +00:00
graphene.wrap
gst-plugins-rs.wrap gst-plugins-rs: Track main branch again 2023-01-24 19:08:50 +00:00
gtk-sharp.wrap
gtk.wrap meson: Use gtk tarball for the subproject wrap 2023-02-01 06:29:11 +00:00
harfbuzz.wrap subprojects: harfbuzz: bump to 5.2.0 2022-09-17 22:41:40 +00:00
json-glib.wrap Update all wraps from WrapDB 2022-09-23 11:08:06 -04:00
lame.wrap meson: Update lame to -7 which contains the def file fix 2022-12-19 01:43:08 +05:30
libdrm.wrap Update all wraps from WrapDB 2022-09-23 11:08:06 -04:00
libffi.wrap subprojects: libffi: pin to meson-3.2.9999.4 tag 2022-12-31 13:49:17 +00:00
libgudev.wrap meson: Add a wrap file for libgudev 2023-04-19 22:47:19 +00:00
libjpeg-turbo.wrap Update all wraps from WrapDB 2022-09-23 11:08:06 -04:00
liblc3.wrap lc3: plugin for LC3 audio codec 2023-07-05 03:00:43 +00:00
libmicrodns.wrap subprojects: libmicrodns: bump to 0.2.0 + meson fixes 2022-09-17 22:41:40 +00:00
libnice.wrap libnice: disable gst tests in static mode 2023-05-31 15:17:11 +00:00
libopenjp2.wrap meson: Update some more wraps 2022-12-10 15:13:09 +00:00
libpng.wrap
libpsl.wrap wrap: add libpsl patch to fix win build 2023-06-22 08:38:22 +00:00
libsoup.wrap subprojects: switch libsoup to a file wrap 2022-11-18 00:56:25 +00:00
libsrtp2.wrap subprojects: Update libsrtp2 wrap to v2.5.0 2023-02-01 10:34:35 +00:00
libva.wrap subprojects: libva: Pin to 2.19.0.pre1 (1c58941) 2023-06-15 21:14:29 +00:00
libwpe.wrap
libxml2.wrap libxml2: update to 2.10.3-4 2023-06-22 08:38:22 +00:00
ogg.wrap Update all wraps from WrapDB 2022-09-23 11:08:06 -04:00
openh264.wrap Update all wraps from WrapDB 2022-09-23 11:08:06 -04:00
opus.wrap
orc.wrap orc: update subproject wrap to 0.4.34 2023-05-30 01:21:20 +00:00
pango.wrap meson: Add a patch that fixes pangocairo usage in gst-plugins-rs 2022-12-17 07:37:03 +05:30
pixman.wrap meson: Update some more wraps 2022-12-10 15:13:09 +00:00
proxy-libintl.wrap
pycairo.wrap
pygobject.wrap meson: Allow sysdeps to be forced as fallback subprojects 2023-02-06 09:26:02 +00:00
sqlite3.wrap meson: Update some more wraps 2022-12-10 15:13:09 +00:00
vorbis.wrap meson: Update some wraps, remove unused wraps 2022-07-16 06:16:17 +00:00
webrtc-audio-processing.wrap meson: Update webrtc-audio-processing wrap to 1.1 2023-06-01 09:34:37 +00:00
wpebackend-fdo.wrap
x264.wrap
zlib.wrap meson: Update some more wraps 2022-12-10 15:13:09 +00:00