okay assume you have downloaded this module as inspectZodbUtils.py in your var directory.
$ ./bin/zopectl debug
from inspectZodbUtils import *
from ZODB.FileStorage import FileStorage
fs = FileStorage(path, read_only=1)
fsi = fs.iterator()
# assume you want to look at the last transaction
for txn in fsi:
pass
recs = list(txn)
print max([(len(rec.data), rec.oid) for rec in recs])
#
# This will print the largest record oid
# (54341, '\x00\x00\x00\x00\x00\x07\x84\xe9')
#
# take a look at that object
oid = '\x00\x00\x00\x00\x00\x07\x84\xe9'
print app._p_jar[oid] # take a look at that object
# IOBucket([(-1920550923, ((), u.....
# ... screenfuls of text ...
# but where is that object?
refmap = buildRefmap(fs) # can take a while
path, additionals = doSearch(oid, refmap)
# take a look at that path (skipping the first oid as we get
# screenfuls of text in its repr
for o in path[1:]:
print app._p_jar[o]
# <IOBTree object at 0xee6abf0>
# <Catalog instance at f0aad70>
# <CatalogTool instance at f0aa170>
# <TextIndex at Description>
# Now you'll notice that there's a CatalogTool in the path of back
# references, with luck that's enough of a clue as to where the
# problem . Inspect the objects and look at the reference paths
# starting at the alternatives if not |