[gstreamer-bugs] [Bug 342777] New: rebuilding the registry leaves all plugins in memory

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Wed May 24 02:09:24 PDT 2006


Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=342777
 GStreamer | gstreamer (core) | Ver: HEAD CVS

           Summary: rebuilding the registry leaves all plugins in memory
           Product: GStreamer
           Version: HEAD CVS
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gstreamer (core)
        AssignedTo: gstreamer-bugs at lists.sourceforge.net
        ReportedBy: thomas at apestaart.org
         QAContact: gstreamer-bugs at lists.sourceforge.net
     GNOME version: Unspecified
   GNOME milestone: Unspecified


When the registry cache is stale, gst rebuilds it completely.  In the process
of doing so, it loads all .so files that it finds, and they cannot be unloaded.
 If this is a long-running process (like, say, mixer applet or
gnome-settings-daemon), this is a problem.

We already discussed possible solutions, like forking to rebuild the registry.

The attached patch is a first attempt at doing so.  To test it, remove your
registry and run gst-launch-0.10 fakesrc ! fakesink

Attaching with gdb should show that none of the plugins not needed are loaded. 
Without the patch, all of them are loaded.

Drawbacks:
- windows doesn't have fork.  we could ifdef out that part on windows, and
still have the benefit on unix.  Or maybe there are alternatives.
- right now the code always forks.  This is because rebuilding the registry is
intertwined with adding paths to the registry; ie, the loading happens
automatically behind our back.  It would be great if we could make the registry
not do so, and instead just "prime" it with paths then query it somehow if it
will need rebuilding.
- We still have a race condition in that multiple processes could be trying to
rebuild the registry.  It's fairly minimal at the moment, but it'd be nice if
we could eliminate it.  Not sure if file locking is the way to go - anyone know
if there are guaranteed ways of cleaning up ?


-- 
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.




More information about the Gstreamer-bugs mailing list