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 163234 - [PATCH] plugin loading isn't thread-safe
[PATCH] plugin loading isn't thread-safe
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.8.7
Other Linux
: Normal major
: 0.8.9
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-01-07 14:33 UTC by Sebastien Cote
Modified: 2005-01-09 01:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Protects plugin loading by a mutex (1.24 KB, patch)
2005-01-07 14:36 UTC, Sebastien Cote
none Details | Review

Description Sebastien Cote 2005-01-07 14:33:54 UTC
Run the following pipeline (notice the 2 typefind):

  gst-launch-0.8 { filesrc location="test1.mpg" ! typefind ! fakesink } {
  filesrc location="test2.mpg" ! typefind ! fakesink }
  EXECUTION du tube en cours ...

  GStreamer-ERROR **: file gstplugin.c: line 184 (gst_plugin_register_func):
  assertion failed: (plugin->module == NULL)
  aborting...

If I replace one typefind by mpegdemux, everything works correctly. "Company"
told me that plugin loading might not be thread-safe, which would lead to this
problem.
Comment 1 Sebastien Cote 2005-01-07 14:36:32 UTC
Created attachment 35613 [details] [review]
Protects plugin loading by a mutex

This patch adds a mutex in gst_plugin_feature_ensure_loaded(). I cannot
reprocduce the problem with this patch. 

It could probably be cleaned up a little bit since I guess we don't need a
mutex if GST_DISABLE_REGISTRY is defined.
Comment 2 Ronald Bultje 2005-01-09 01:35:01 UTC
applied, thanks.