[ZCM] [ZC] 1961/ 5 Comment "NameError while packing ZODB"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Fri Dec 2 18:39:59 EST 2005


Issue #1961 Update (Comment) "NameError while packing ZODB"
 Status Pending, Zope/bug medium
To followup, visit:
  http://www.zope.org/Collectors/Zope/1961

==============================================================
= Comment - Entry #5 by raph666 on Dec 2, 2005 6:39 pm

Thanks for the info!
I used fsrecover.py to repair my Data.fs then I could get my ZODB packed.
________________________________________
= Comment - Entry #4 by tim_one on Dec 2, 2005 3:54 pm

Thanks! That helps. It shows that there's a bug in fspack.py's _data_find: it's trying to call 

    error("Mismatch between data and backpointer at %d", pos) 

but no function named error() exists.  That should be fixed (although offhand I'm not sure how). 

However, that won't help you with your real problem: error() is trying to tell you that it can't makes sense of the Data.fs file. The database may be corrupted. You should read the info at 

    http://zope.org/Wikis/ZODB/FileStorageBackup 

and try running fstest.py and fsrefs.py on your Data.fs. 

Nobody noticed this bug in _data_find() before because _data_find() doesn't _try_ to call error() if Data.fs is in good shape.
________________________________________
= Comment - Entry #3 by raph666 on Dec 2, 2005 3:37 pm

All right, here the traceback produced by the zeo server, thanks for helping!:

2005-12-02T20:47:32 ERROR(200) zrpc:7713 Error raised in delayed method
Traceback (most recent call last):
  File "/u/opt/zope/Zope-2.7.8-final/lib/python/ZEO/StorageServer.py", line 991, in run
    result = self._method(*self._args)
  File "/u/opt/zope/Zope-2.7.8-final/lib/python/ZEO/StorageServer.py", line 315, in _pack_impl
    self.storage.pack(time, referencesf)
  File "/u/opt/zope/Zope-2.7.8-final/lib/python/ZODB/FileStorage.py", line 1582, in pack
    opos = p.pack()
  File "/u/opt/zope/Zope-2.7.8-final/lib/python/ZODB/fspack.py", line 727, in pack
    self.copyRest(ipos)
  File "/u/opt/zope/Zope-2.7.8-final/lib/python/ZODB/fspack.py", line 854, in copyRest
    ipos = self.copyOne(ipos)
  File "/u/opt/zope/Zope-2.7.8-final/lib/python/ZODB/fspack.py", line 889, in copyOne
    prev_txn, pos, self._tfile.tell())
  File "/u/opt/zope/Zope-2.7.8-final/lib/python/ZODB/fspack.py", line 376, in copy
    prev_pos = self._resolve_backpointer(prev_txn, oid, data)
  File "/u/opt/zope/Zope-2.7.8-final/lib/python/ZODB/fspack.py", line 634, in _resolve_backpointer
    return DataCopier._resolve_backpointer(self, prev_txn, oid, data)
  File "/u/opt/zope/Zope-2.7.8-final/lib/python/ZODB/fspack.py", line 371, in _resolve_backpointer
    prev_pos = self._data_find(prev_txn_pos, oid, data)
  File "/u/opt/zope/Zope-2.7.8-final/lib/python/ZODB/fspack.py", line 330, in _data_find
    error("Mismatch between data and backpointer at %d", pos)
NameError: global name 'error' is not defined

________________________________________
= Comment - Entry #2 by tim_one on Dec 2, 2005 3:15 pm

Alas, the traceback doesn't really help.  You're showing a traceback from the ZEO client, but zrpc is just (re)raising an exception passed _back_ to it by the ZEO server.  You may be able to find a useful traceback in your ZEO server log file.
________________________________________
= Request - Entry #1 by raph666 on Dec 2, 2005 2:51 pm

My production site works with 2 ZEO-clients.
Following error occurs while attempting to pack the 
ZODB (same error with zope-2.7.7):

Traceback (innermost last):
  Module ZPublisher.Publish, line 101, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 39, in call_object
  Module App.ApplicationManager, line 428, in manage_pack
  Module ZODB.DB, line 555, in pack
  Module ZEO.ClientStorage, line 823, in pack
  Module ZEO.ServerStub, line 79, in pack
  Module ZEO.zrpc.connection, line 489, in call
NameError: global name 'error' is not defined
==============================================================



More information about the Zope-Collector-Monitor mailing list