-
-
Notifications
You must be signed in to change notification settings - Fork 115
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
Random assertions failing in test.py #31
Comments
The test for the SoftFileLock fails only because of the FileLockTest. This is a bug in the test.py module. So the SoftFileLock is fine. The bug in the FileLock is probably caused by the race conditions described in this stackoverflow question. Because the lock file is meant as a simple synchronization mechanism, I think the best solution would be to revert cb1d83d, although not very satisfying. Side note: Do you know if this bug exists under windows too? |
OK. I've added this patch to the package for now.
No idea, unfortunately I don't have a Windows system around at the moment to test. |
I think I can close this issue. If the bug still occurs, feel free to reopen it. |
We used to have own code to handle this as other lock implementations either were not reentrant or did not support Windows, but py-lockfile now supports both of that. This way also we get tested locking implementation and we can avoid problems somebody else has already discovered, see tox-dev/filelock#31 Fixes #1787 Signed-off-by: Michal Čihař <[email protected]>
* Fix race condition From filelock.py in UnixFileLock # Do not remove the lockfile:^M #^M # https://github.com/benediktschmitt/py-filelock/issues/31^M # https://stackoverflow.com/questions/17708885/flock-removing-locked-file-without-race-condition^M * Encode (){} in label: query
See tox-dev/filelock#31 And https://stackoverflow.com/a/51070775 Without this change the `cache/symbol_lists` directory ends up full of many lock files that might never get cleaned up.
See tox-dev/filelock#31 And https://stackoverflow.com/a/51070775 Without this change the `cache/symbol_lists` directory ends up full of many lock files that might never get cleaned up (At least since emscripten-core#24029 landed).
See tox-dev/filelock#31 And https://stackoverflow.com/a/51070775 Without this change the `cache/symbol_lists` directory ends up full of many lock files that might never get cleaned up (At least since emscripten-core#24029 landed).
This avoids leaving orphan locks files around after we are done when them. See emscripten-core/emscripten#24035 Fixes: tox-dev#31
This avoids leaving orphan locks files around after we are done when them. See emscripten-core/emscripten#24035 Fixes: tox-dev#31
See tox-dev/filelock#31 and https://stackoverflow.com/a/51070775. Without this change the `cache/symbol_lists` directory ends up full of many lock files that might never get cleaned up (At least since #24029 landed). I'm also sending this change upstream: tox-dev/filelock#408
I'm maintaining py-filelock for Debian (https://packages.qa.debian.org/p/python-filelock.html). We are running
test.py
in a clean chroot during the package build to verify that all tests pass in the version to be packaged. However, we recently noticed that current versions of the library fail theirtest.py
runs with random assertions being hit:Patching the source to revert cb1d83d seems to reliably fix the issue but I'm not sure stray lock files are left lying around. Any comments?
The text was updated successfully, but these errors were encountered: