question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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.


Issue Analytics

  • State:open
  • Created 11 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
webknjazcommented, Mar 19, 2021

It seems like zc.lockfile still has this problem. While researching another issue I’ve noticed a mention of another lib at https://stackoverflow.com/a/9993103/595220: https://pypi.org/project/portalocker/ (https://github.com/WoLpH/portalocker). I’d like to try using it instead.

0reactions
webknjazcommented, Mar 21, 2021

Agreed. For now, I just wanted to document the possibility.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Finding and killing locked sessions in Oracle
Because of Oracles internal locking, there are times when it is useful to be able to locate and kill Oracle sessions that are...
Read more >
Locked Sessions
The Locked Sessions utility is located at Utilities>Session Statistics>Locks button and displays both the Blocking and Current Locked sessions.
Read more >
Session locks - MoodleDocs
1 Debugging session lock issues · 2 Session unlocking · 3 Read only session in pages · 4 Read only sessions in web...
Read more >
Session lock - ArchWiki
There are numerous utilities to lock the screen of a session. ... There are many ways to lock the session under Xorg, so...
Read more >
What is the difference between lock and disconnect session?
For Windows 7 users, "Lock" keeps the last user connected. "Disconnect Session" means a different user can log on (shared computer). Locking the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found