-
Notifications
You must be signed in to change notification settings - Fork 253
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
This is related to [#132](https://github.com/lz4/lz4-java/commit/08b3bff3491eafd5238c5adf79113e56f6821e82) #161
Comments
Unfortunately, I don't think there is anything lz4-java can do for the leftover .so files caused by JVM crashes. At the loading time, lz4-java deletes any leftover .so files that are not accompanied by a corresponding .so.lck file. This logic is to handle the case #132. However, in case of a crash, both the .so and .so.lck files will be left behind, won't they? lz4-java cannot delete such a .so file, because it might be being used by another lz4-java running in another JVM. Well, strictly speaking, if we assume the UNIX semantics of the file system, we might be able to delete such a .so file without affecting the process using it, but I don't think we can generalize it to all the systems JVM supports. Also, there would be a nasty race condition between the two JVMs using lz4-java. The reason lz4-java uses the system-provided temporary directory to store the .so file is to tolerate cases like this. Even if there are leftover .so files in the temporary directory, they should not affect the other parts of the system. |
Would you need any further clarification or have any suggestion? |
Feel free to reopen this if you need further help. |
We noticed an issue in our linux platform where we are not cleaning up the lib files after jvm crashes. I see that you made a fix to delete the lock files. Do you have plan to add functionality to delete the leftover
*.so
files.The text was updated successfully, but these errors were encountered: