[ZODB-Dev] Re: Database Corruption.
Jim Fulton
jim at zope.com
Wed Jun 30 14:53:06 EDT 2004
Tim Peters wrote:
> [Ramon Aseniero]
>
>>2004-06-28T18:02:30 ERROR(200) ZODB Couldn't load state for
>>'\x00\x00\x00\x00\x00\x02y\x89' Traceback (innermost last):
>> File /usr/lib/zope/lib/python/ZODB/Connection.py, line 551, in
>
> setstate
>
>> File /usr/lib/zope/lib/python/ZODB/FileStorage.py, line 645, in load
>> (Object: /village/zope/default/var/Data.fs)
>> File /usr/lib/zope/lib/python/ZODB/FileStorage.py, line 623, in _load
>> (Object: /village/zope/default/var/Data.fs)
>>error: unpack str size does not match format
>
>
> This is certainly peculiar. The failing unpack is the last line here:
>
> def _load(self, oid, version, _index, file):
> try:
> pos = _index[oid]
> except KeyError:
> raise POSKeyError(oid)
> file.seek(pos)
> read = file.read
> h = read(DATA_HDR_LEN)
> doid, serial, prev, tloc, vlen, plen = unpack(DATA_HDR, h)
>
> The only ways I see that we *could* get a "str size does not match format"
> error are: (a) I/O on this box is plain broken; or, (b) the object is at
> the very end of a "truncated" .fs file, so that fewer than DATA_HDR_LEN
> bytes remain to be read.
or c) it's index is screwed up. I wanted to see the files to
verify this. Then the question would be, how did the index get
out of sync with the data.
Jim
--
Jim Fulton mailto:jim at zope.com Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
More information about the ZODB-Dev
mailing list