[gstreamer-bugs] [Bug 503675] broken registry files written to disk
bugzilla-daemon at bugzilla.gnome.org
Sun Dec 16 12:08:12 PST 2007
If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
GStreamer | gstreamer (core) | Ver: 0.10.14
Tim-Philipp Müller changed:
What |Removed |Added
Summary|kill the gstreamer registry |broken registry files
|file |written to disk
Target Milestone|HEAD |0.10.16
------- Comment #8 from Tim-Philipp Müller 2007-12-16 20:08 UTC -------
Rest assured that we wouldn't bother with the registry if there wasn't a reason
for having it. It's good of you to enquire about or investigate the purpose of
it all though before declaring it useless.
Yes, earlier versions of GStreamer-0.10 indeed had a bunch of issues related to
registry reading and writing (mind you, at least one of those reports refers to
ubuntu dapper, which is ancient). Those should be fixed these days though, and
neither our build bots nor any users have reported any
mysterious-possibly-registry-related-failures for a long time.
However, I did have a look at the code and spotted a problem that may cause
partial/broken registry files: we don't check the return value of close() when
writing the file, yet sometimes write problems such as out-of-diskspace are
only reported when the file is closed rather than during the write. I've fixed
this in CVS:
2007-12-16 Tim-Philipp Müller <tim at centricular dot net>
* gst/gstregistrybinary.c: (gst_registry_binary_write_cache):
Use g_remove() and g_rename(). Check result of g_rename(), and
don't leak the open file descriptor if we error out when writing.
* gst/gstregistryxml.c: (load_plugin), (gst_registry_xml_write_cache):
Must check the return value of close() after writing out the new
registry file. Sometimes write problems such as out-of-diskspace
are only reported when the file is closed and not already during
the write. This may have caused partial/broken registry files in
some rare circumstances. Should fix #503675.
I hope this will fix it for you. If not, we probably need more information to
If you ever do run into this problem again, please do keep the registry file so
we can have a look a it. Thanks!
Lastly, there is one known problem with the registry and that is plugins
wrapping other plugins (such as pitfdll [don't use that btw, it's highly
unstable] or our libvisual plugin). If wrapped plugins are added or removed
(e.g win32codecs changes), GStreamer doesn't know about this and doesn't update
the registry. This should in the worst case result in error messages at
run-time though, but not in 'codecs disappearing' without a reason. Bug
#350477 is about this, and it should be harmless if things are packaged
correctly. And of course the registry is updated in the normal case of codecs
being updated, added or removed (e.g. files in /usr/lib/gstreamer-0.10
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.
You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=503675.
More information about the Gstreamer-bugs