liblz4-java*.so files generated in directory other than the one specified by java.io.tmpdir
hlms opened this issue · 3 comments
We are using redisson-3.11.3 in tomcat webapp which has dependency to lz4-java (version 1.4.0) as following:
https://github.com/redisson/redisson/blob/redisson-3.11.3/redisson/src/main/java/org/redisson/codec/LZ4Codec.java
The tomcat\bin\service.bat has -Djava.io.tmpdir=<full path>\tomcat\temp which seems to be getting cleared when the tomcat is restarted.
We observe that lots of (21k+ files occupying 3.2+ GB) liblz4-java*.so files are getting generated in c:\windows\temp (and in c:\Users\<userName>\AppData\Local\Temp in another machine)
- Is this due to lz4-java version 1.4.0 and due to the code mentioned above?
- Will this be cleaned up if lz4-java version 1.7.1 is used? The commit seems to be clearing files from java.io.tmpdir but in our machine the files are generated in directories other than java.io.tmpdir.
- How to identify which code is generating these files?
- How to reproduce the issue? Merely using the library does NOT seem to leave the residual files.
- What is the ideal way to fix this?
@odaira ,
Request you to take a look.
Posted the question on stackoverflow (https://stackoverflow.com/questions/62588706/liblz4-java-so-files-generated-in-directory-other-than-the-one-specified-by-jav) also as it would be great if someone can quickly guide on this.
Sounds like you observed two issues.
liblz4-java*.so
files remained unremoved on Windows: lz4-java 1.7.0 and above include a fix to remove remainingliblz4-java-*.so
in the tmp directory on Windows. Could you use the latest lz4-java 1.7.1? Note that you need to manually remove the oldliblz4-java*.so
files. The fix will only remove newly generatedliblz4-java-*.so
files.liblz4-java*.so
files were not generated in the directory specified byjava.io.tmpdir
: I am not aware of this issue. Could you use the latest lz4-java 1.7.1 and see if the problem still exists?