New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Raise lock timeout as actual exception #6777
Raise lock timeout as actual exception #6777
Conversation
@@ -2577,10 +2577,11 @@ def _putmask(a, mask, values): | |||
return np.copyto(a, values, where=mask) | |||
|
|||
_lockstr = """\ | |||
LOCKERROR: matplotlib is trying to acquire the lock {!r} | |||
LOCKERROR: matplotlib is trying to acquire the lock | |||
{!r} | |||
and has failed. This maybe due to any other process holding this | |||
lock. If you are sure no other matplotlib process in running try |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might as well fix it to say "is running", too.
also closes #6721 |
The 2.x branch still has the pickle code. |
@tacaswell: This still seems to backport cleanly and correctly to 2.x, despite the use of pickle rather than json... |
@tacaswell: I think this is ready for a final review. |
Raise lock timeout as actual exception
So this still needs a backport? |
I backportd this to v2.x as e691c28 (but forgot to note it, sorry). |
Fix #3655.
I haven't been able to directly reproduce #3655, so this is all based on theory, but given the symptoms and what we know about it, I'm reasonably certain about what is happening.
If a lock directory accidentally remains on disk in the
~/.cache/matplotlib
directory from a previous run, it will wait around 90 seconds waiting for the lock to go away, and then timeout. When it times out, it simply tries again (once), and ultimately fails silently to write the file to disk.The solution here is to: