-
-
Notifications
You must be signed in to change notification settings - Fork 367
sessions lock race condition deleting expired session #1193
Copy link
Copy link
Open
Description
Originally reported by: deecodameeko (Bitbucket: deecodameeko, GitHub: @deecodameeko)
I found an issue last night with sessions where it tries to release a lock on a session that isn't locked.
Here's a dump of the logs:
#!python
File "/root/.virtualenvs/web_api/lib/python2.7/site-packages/cherrypy/_cprequest.py", line 102, in run
hook()
File "/root/.virtualenvs/web_api/lib/python2.7/site-packages/cherrypy/_cprequest.py", line 62, in __call__
return self.callback(**self.kwargs)
File "/root/.virtualenvs/web_api/lib/python2.7/site-packages/cherrypy/lib/sessions.py", line 706, in close
sess.release_lock()
File "/root/.virtualenvs/web_api/lib/python2.7/site-packages/cherrypy/lib/sessions.py", line 479, in release_lock
os.unlink(path + self.LOCK_SUFFIX)
OSError: [Errno 2] No such file or directory: '/san/in/api-sessions/session-b93639d62bec1e4a766e244d1a22d0bf7ebdc32c.lock'
It seems it doesn't check if the file exists before unlinking it. Perhaps it should? I'm not sure what could cause this issue in the first place.
Reactions are currently unavailable