[gst-devel] On the plugin cache

Sebastian Dröge slomo at circular-chaos.org
Tue Nov 11 19:03:11 CET 2008


Am Dienstag, den 11.11.2008, 16:13 +0100 schrieb Simon Holm Thøgersen:

> > >> The value of doing the crc check seems pretty dubious to me btw; if
> > >> you've got disk corruptions there are plenty of other ways your system
> > >> could malfunction. It should be pretty easy to make it optional at load
> > >> time though.
> > > 
> > > I'm not sure what the rationale was for adding a CRC to the binary
> > > registry format originally. It might have been done as a sanity check to
> > > detect partially-written registry files, so they can be rebuilt without
> > > crashing every GStreamer app.
> > 
> > Yeah, the CRC check is totally bogus.  The cache must be built in a temp file
> > first, then moved to it's final place.  Assuming a journaling filesystem,
> > there's no way you end up with a partially-written file.  The only way the CRC
> > can fail is disk failure or manual modification of the file.  Neither one is
> > particularly interesting.  Imagine what would happen if we did the same to
> > shared objects, fonts, icons, and any other kind of binary data :).
> > 
> Sebastian, can you tell us the rationale for the crc check or should we just
> file a bug report for the removal? I'm volunteering for this as well.

The original rationale for the CRC check was, to ensure that the
registry was a) completely written and b) wasn't corrupted by something
(memory failure, ....). I agree that a) could be done much simpler,
either just a single value that is written when the registry is finished
or the temp file & move thing which was written in this thread. b) is
still valid but you're right that, if this has happened, there are much
larger problems anyway.

Best would be to file a bug for removal of the CRC but I'm probably
going to do that tomorrow already...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20081111/be78fb60/attachment.pgp>


More information about the gstreamer-devel mailing list