-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
RocksDB loads a new librocksdbjni*.so
file into the /tmp
directory each time, causing a "No space left on device" error.
#13185
Comments
@liang636600 those files are created as temporary files, and as we call |
Hi, @adamretter. Thank you very much for your response and the valuable insights. However, I was wondering if there might be an opportunity for improvement of the
The primary goal of this function is to create a temporary file to copy the library to. It might be beneficial to first check whether a related library file already exists in the /tmp/ directory. If such a file exists, reusing it could potentially avoid creating a new temporary file. This adjustment could help prevent issues like the one I encountered, where repeatedly creating new files caused the /tmp/ directory to run out of disk space. Thank you for considering this suggestion, and I look forward to your thoughts! |
This could lead to a race condition. As the user could have more than one JVM running RocksJava - it is impossible to know whether an existing file is in-use or will be deleted when a different JVM exits.
I am wondering how you were able to end up in this situation considering that the JVM is meant to delete the file when it stops. Any ideas? |
My project is a pseudo-distributed system, and every time I run it, I start 30 nodes, each of which uses RocksDB for storage. As a result, each run creates a librocksdbjni*.so file in the /tmp directory for each node, totaling 30 such files. The system is shut down by killing the processes using kill -9 with the process IDs. I believe the main issue is that the JVM does not exit properly, which causes the librocksdbjni*.so files in my /tmp directory to accumulate with each run. Thank you for your response, you’re very kind! |
When running unit tests for my project, I also found many so file in /tmp. /tmp/librocksdbjni13154662332689126021.so |
Hi, @adamretter
I’m running a RaftJava project that uses RocksDB as its underlying storage. After running the project more than 1000 times, I encountered an error from RocksDB:
I then checked the /tmp directory, and part of its contents are shown in the attached image. I believe that RocksDB is loading a new librocksdbjni*.so file every time, which eventually leads to running out of space in the /tmp directory.
I think this is an issue with RocksDB, and a potential fix would be to check whether a librocksdbjni*.so file already exists in the /tmp directory before attempting to load it, and if it does, skip the loading process.
Steps to reproduce the behavior
The version of RocksDB I’m using is as follows:
I'm looking forward to your response. Thank you!
The text was updated successfully, but these errors were encountered: