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
WriteBatchThreadedTest heap-use-after-free #2384
Comments
@adamretter How can I compile java test with ASAN? I'm trying to reproduce. |
@yiwu-arbug details are here - https://github.com/facebook/rocksdb/wiki/JNI-Debugging#asan |
@adamretter nice wiki! |
@maysamyabandeh did this hack and the error seems go away:
The theory we have is that, in the write function in RocksDB.java:
Since we get the value of updates.nativeHandle_, Java thinks the write batch is not needed anymore, so it is GCed and executed the finalizer containing the C++ write batch, which is still being used in the native function write0(). CC @sagar0 |
@yiwu-arbug and @maysamyabandeh did another test where we explicitly call wb.close() and the test failure seems to go away. |
@siying I am back in the office now after a short visit back to the UK. I can take a look tomorrow... |
Fix : #2482 |
@siying It is hard to believe that this is an issue. However, your explanation is certainly plausible, and from the stack trace given by ASAN:
we see that it is the |
The text was updated successfully, but these errors were encountered: