If the CherryPy process does not have access to the file-based session
dir you're using, or for whatever reason it gets an OSError when
trying to write a lockfile, this code deadlocks:
http://www.cherrypy.org/browser/trunk/cherrypy/lib/sessions.py#L354
In particular, the "except OSError: time.sleep()" thing. At a minimum,
you should warn the developer about why CherryPy is deadlocking:
--- sessions.py.orig 2008-10-02 17:32:10.118396339 -0500
+++ sessions.py 2008-10-02 17:33:49.257876225 -0500
@@ -349,7 +349,8 @@
while True:
try:
lockfd = os.open(path, os.O_CREAT|os.O_WRONLY|
os.O_EXCL)
- except OSError:
+ except OSError, error:
+ warn('Unable to acquire filesystem session lock (%r):
%s' % (path, error))
time.sleep(0.1)
else:
os.close(lockfd)