Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Raise lock timeout as actual exception #6777
Conversation
mdboom
added this to the
2.0 (style change major release)
milestone
Jul 17, 2016
mdboom
added the
needs_review
label
Jul 17, 2016
QuLogic
commented on an outdated diff
Jul 17, 2016
lib/matplotlib/cbook.py
| @@ -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 |
|
|
|
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... |
mdboom
closed this
Jul 20, 2016
mdboom
reopened this
Jul 20, 2016
mdboom
added needs_review and removed needs_review
labels
Jul 20, 2016
|
@tacaswell: I think this is ready for a final review. |
tacaswell
merged commit 38a32d9
into matplotlib:master
Jul 25, 2016
tacaswell
removed the
needs_review
label
Jul 25, 2016
tacaswell
added a commit
that referenced
this pull request
Jul 25, 2016
|
|
tacaswell |
e691c28
|
|
So this still needs a backport? |
|
I backportd this to v2.x as e691c28 (but forgot to note it, sorry). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
mdboom commentedJul 17, 2016
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/matplotlibdirectory 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: