After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 754661 - harness: Fix race for gst_harness_element_ref
harness: Fix race for gst_harness_element_ref
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other All
: Normal normal
: 1.5.91
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-09-07 09:35 UTC by Stian Selnes (stianse)
Modified: 2015-09-07 10:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
harness: Allow-none for custom stress init func (1.42 KB, patch)
2015-09-07 09:36 UTC, Stian Selnes (stianse)
committed Details | Review
harness: Fix race for gst_harness_element_ref (3.06 KB, patch)
2015-09-07 09:36 UTC, Stian Selnes (stianse)
committed Details | Review

Description Stian Selnes (stianse) 2015-09-07 09:35:58 UTC
In order for gst_harness_new_full to be MT-safe the increase and
decrease of HARNESS_REF must be MT-safe. This allows for creating
multiple harnesses from different threads wrapping the same element.

Also, the test uncovered another bug where it was not allowed to set
the init function for user_data used in the stress test to NULL.
Comment 1 Stian Selnes (stianse) 2015-09-07 09:36:02 UTC
Created attachment 310785 [details] [review]
harness: Allow-none for custom stress init func

It should be allowed to not have a function to initialize the user data
since it's often not necessary; it may already be initialized.
Comment 2 Stian Selnes (stianse) 2015-09-07 09:36:07 UTC
Created attachment 310786 [details] [review]
harness: Fix race for gst_harness_element_ref

In order for gst_harness_new_full to be MT-safe the increase and
decrease of HARNESS_REF must be MT-safe. This allows for creating
multiple harnesses from different threads wrapping the same element.
Comment 3 Tim-Philipp Müller 2015-09-07 10:35:00 UTC
commit ff9a78196c032588d75b99f6dfb74817bde196c2
Author: Stian Selnes <stian@pexip.com>
Date:   Wed Aug 5 10:07:50 2015 +0200

    harness: Fix race for gst_harness_element_ref
    
    In order for gst_harness_new_full to be MT-safe the increase and
    decrease of HARNESS_REF must be MT-safe. This allows for creating
    multiple harnesses from different threads wrapping the same element.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=754661

commit 615e5b01c6426e3e8cdb09bb56c962f3893bda6f
Author: Stian Selnes <stian@pexip.com>
Date:   Wed Aug 5 09:59:39 2015 +0200

    harness: Allow-none for custom stress init func
    
    It should be allowed to not have a function to initialize the user data
    since it's often not necessary; it may already be initialized.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=754661