Hard crash on DB.close()
See original GitHub issueI experience a hard crash when closing a DB.
I have experimented with a number of diverse settings. No matter the load or the contents of the database it always seems to happen.
This is the case both in master with Python 3 and in Python 2 with the fix from #40. I also tested with both librocksdb-dev 5.17 (from Debian stretch-backports) and the facebook/rocksdb master (>6.1.2).
At one point I got a detailed stack trace and memory map but I can’t seem to recover them. I will edit this post if I can produce them later on. I do know that the error was “double free or corruption”.
Closing a DB is a critical feature for my use case. I need to be able to reliably populate DBs in subprocesses and transfer the control to the master process afterwards. This is not possible unless the database is properly closed before the transfer. I have tried the del db; gc.collect()
strategy from #10 and the unit tests, but, as expected, del
is not deterministic and the file lock is not freed in most cases. In any case, if del
run it would likely also crash in the close()
method.
I believe #46 might be experiencing the same issue.
Please, let me know if this is the case for everyone or if it is an environment issue.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (3 by maintainers)
Top GitHub Comments
@maxibor I found that @iFA88 created a fork (https://github.com/iFA88/python-rocksdb) that fixed this issue. Original thread: #46. I repost it here to increase visibility.
Any update on this @twmht @oersted ? Being able to close the database would be lovely 😃