[ZODB-Dev] ZEO under Py 2.4: Cache verification hangs in Python os.path.abspath()

Gfeller Martin Martin.Gfeller at comit.ch
Thu Apr 20 13:15:11 EDT 2006


Dear all,

I have one more upgrade problem (the last one I found so far), and this
one puzzles me most. I'm using ZEO 3.6 / Zope 2.9.2, with Py 2.4.2,
under Windows 2000 and XP. 

I can open ClientStorage for the Zope (data.fs) storage just fine.
However, when I open one of my own storages over ZEO, I can open a
connection, but when I get its root(), it hangs (forever) after logging:

	2006-04-19T11:27:34 INFO ZEO.ClientStorage (3172) Verifying
cache

I determined that it hangs in ZEO.ClientStorage, line 597:

     log2("Verifying cache")
     # setup tempfile to hold zeoVerify results
-->  self._tfile = tempfile.TemporaryFile(suffix=".inv")

Digging in TemporaryFile, I found that it hangs in abspath, imported
from Python 
module ntpath, on the import statement on line 488:

     # Return an absolute path.
     def abspath(path):
         """Return the absolute version of a path"""
         try:
-->          from nt import _getfullpathname

If I replace this by:

    # Return an absolute path.
    def abspath(path):
        """Return the absolute version of a path"""
        try:
            if sys.modules.has_key('nt'): 
                _getfullpathname = sys.modules['nt']._getfullpathname
            else:
                from nt import _getfullpathname

...everything works just fine.

I've noticed that abspath() was introduced in tempfile._mkstemp_inner()
in Python 2.4
(http://sourceforge.net/tracker/index.php?func=detail&aid=810914&group_i
d=5470&atid=305470).

When I apply that patch to Py 2.3 and run it with Zope 2.7.3 / ZEO 3.2,
it hangs there as well!

So it seems to be a problem with Py import - but I cannot reproduce it
outside of the ZEO environment. 

I've already tried python -v, but there are no imports at that point (-v
presumably only logs completed imports).

My code uses no threads, apart from those created by ZEO itself. 

I would appreciate any hints on where to investigate further.

Thank you, and best regards, 
Martin Gfeller


More information about the ZODB-Dev mailing list