segmentation fault
See original GitHub issueSomething went wrong when i delete the db pointer 😃 For me it is not a critical, because i never close the database without ending my program.
(fsPython) root@srv:/own/services/back/src/database/new# python
Python 3.5.3 (default, Sep 27 2018, 17:25:39)
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import rocksdb
>>> opt = rocksdb.Options()
>>> db = rocksdb.DB("/tmp/2323", rocksdb.Options(create_if_missing=True))
>>> db.close()
>>> del db
Segmentation fault
(fsPython) root@srv:/own/services/back/src/database/new#
Maybe it is not good when i got this during exit:
(fsPython) root@srv:/own/services/back/src/database/new# python
Python 3.5.3 (default, Sep 27 2018, 17:25:39)
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import rocksdb
>>> opt = rocksdb.Options()
>>> db = rocksdb.DB("/tmp/2323", rocksdb.Options(create_if_missing=True))
>>> db.close()
>>> exit()
Segmentation fault
(fsPython) root@srv:/own/services/back/src/database/new#
Linux srv 4.9.0-8-amd64 #1 SMP Debian 4.9.144-3.1 (2019-02-19) x86_64 GNU/Linux
Update
Debug: https://gist.github.com/iFA88/1e688ea42a2e58d0f8ca88f16657acfa
Issue Analytics
- State:
- Created 4 years ago
- Comments:5
Top Results From Across the Web
Segmentation fault - Wikipedia
Segmentation faults are a common class of error in programs written in languages like C that provide low-level memory access and few to...
Read more >c++ - What is a segmentation fault? - Stack Overflow
A segmentation fault occurs when a program attempts to access a memory location that it is not allowed to access, or attempts to...
Read more >Identify what's causing segmentation faults (segfaults)
A segmentation fault (aka segfault) is a common condition that causes programs to crash; they are often associated with a file named core...
Read more >Core Dump (Segmentation fault) in C/C++ - GeeksforGeeks
Core Dump/Segmentation fault is a specific kind of error caused by accessing memory that “does not belong to you.”.
Read more >What Is a Segmentation Fault in Linux?
A segmentation fault, or segfault, is a memory error in which a program tries to access a memory address that does not exist...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have the same issue when I close and reopen the db again. If I use the
db.close()
function I get segmentation fault. If I only rundel db; gc.collect()
then I get “No Locks available” like @itboyljm.UPDATE:
I found that @iFA88 created a fork (https://github.com/iFA88/python-rocksdb) that fixed this issue. I put it out here in case anyone encounter the same problem. Thanks @iFA88
thank you so much for your fast reply. I try your version and it does solve the double free problem. But I still will meet the problem–“No Locks available” if I open, close and reopen, close same db object. Have you ever met this problem when you try to open after close same db?