[Metakit] Investigating a corrupt metakit file.

Jeff Godfrey jeff_godfrey at pobox.com
Thu Jun 9 12:02:40 CEST 2005


Pat,

I had a similar issue (assuming you're using tcl) about 2 years ago.  If you 
search the archives of this mailing list, you'll find a quite lengthy thread 
regarding my problem, my (somewhat disturbing) findings, and an eventual 
work-around.

The original thread is entitled "Mk4tcl - corrupted database over a 
network - WinNT"

Good luck.

Jeff

----- Original Message ----- 
From: "Pat Thoyts" <patthoyts at users.sourceforge.net>
To: <metakit at equi4.com>
Sent: Thursday, June 09, 2005 4:48 AM
Subject: [Metakit] Investigating a corrupt metakit file.


> -----BEGIN PGP SIGNED MESSAGE-----
>
> I appear to have a corrupted metakit file and I'm trying to
> work out how it might have occured. I can read data from the file but
> some of the properties now contain incorrect values.
>
> This is the metakit layout:
>  dirs[name:S,parent:I,ctime:I,atime:I,mtime:I,clsid:S,state:I,
>     files[
>        _B[name:S,size:I,date:I,state:I,contents:B] ] ]
>
> So it's a bit like the starkit virtual filesystem layout with a view
> holding 'directory' entries and subviews holding the 'file' entries.
> The main difference from the standard starkit layout is that the files
> subviews are blocked and ordered.
>
> I've got a file with about 30 000 'files' in one subview. Each of these 
> has
> about the size property set to about 6000 to 7000 and the date
> property set to a time_t value (some time in may).
>
> The problem is that out of 56 _B subviews all but one are as
> expected. However, one block is damaged. The values for the date and
> size columns have got swapped about. This eventually leads to our
> software attempting to allocate over 1116404900 (the time_t value)
> bytes and failing. Only these two columns are wrong and only in one
> block.
>
> The metakit file was created using Windows XP on a local hard drive but 
> has almost
> certainly been modified over an SMB mount. I believe the server was
> Windows 2003 server (but it may have been NT 4 -- they upgraded fairly
> recently).
>
> For additional information, here are two sections of the mkdump output
> from this file. The first part is a good block and the second part the
> damaged block (part of)
>
> corrupt.wxd: 1 properties
> 
> dirs[name:S,parent:I,ctime:I,atime:I,mtime:I,clsid:S,state:I,files[_B[name:S,size:I,date:I,state:I,contents:B]]]
>
> VIEW     1 rows = dirs:V
>    0: subview 'dirs'
>   VIEW     2 rows = name:S parent:I ctime:I atime:I mtime:I clsid:S 
> state:I files:V
>      0: '<root>' -1 1115816556 1869574716 1115816556 
> '{F106E70F-226D-46C2-957F-59A3FEC9D89C}' 0
>      0: subview 'files'
>     VIEW    58 rows = _B:V
>        0: subview '_B'
>       VIEW   500 rows = name:S size:I date:I state:I contents:B
>          0: 'DataList0' 22 1115816556 0 (21b)
>          1: 'DataList1' 5762 1115816556 0 (4049b)
>          2: 'DataSet0' 6370 1115816556 0 (4697b)
>          3: 'DataSet1' 6370 1115816556 0 (4698b)
>          .
>          .
>          .
>       56: subview '_B'
>       VIEW   524 rows = name:S size:I date:I state:I contents:B
>          0: 'DataSet9529' 6370 6370 0 (4846b)
>          1: 'DataSet953' 6370 6370 0 (4824b)
>          .
>          .
>         21: 'DataSet9548' 6370 6370 0 (4839b)
>         22: 'DataSet9549' 2298 6370 0 (4838b)
>         23: 'DataSet955' 852514 6370 0 (4813b)
>         24: 'DataSet9550' 1115821241 6370 0 (4849b)
>         25: 'DataSet9551' 1115821241 6370 0 (4843b)
>
> I would like to know if anyone has seen something similar or has any
> idea how this might be reproduced. If this is a metakit over SMB issue
> it would be good to confirm this. If it's a more general metakit on
> windows issue then I need to work out a fix.
>
> Thanks everyone,
>
> Pat Thoyts.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.3-nr1 (Windows XP)
>
> iQCVAwUBQqgOZmB90JXwhOSJAQFZbwP+LEBlSlxlzQgQToxH9CjUjsOpkXkGGggN
> g9HjvQ0EpzJAEzAJhlvnJIl6LRHSj6vbROOhj/NbjB1BTlttxTbnlQDEt6v2njO/
> RUrrZP/qWGMbHyktc9GdmY3v3jU0OxvcTdIAMhLC+PIPPbiYt4JHcZF0ykh3M3j4
> GYtQS/XxR78=
> =eCTL
> -----END PGP SIGNATURE-----
> _____________________________________________
> Metakit mailing list  -  Metakit at equi4.com
> http://www.equi4.com/mailman/listinfo/metakit
> 



More information about the Metakit mailing list