Comments (9)
Original comment by [email protected]
on 20 Sep 2012 at 4:03
- Changed state: Accepted
- Added labels: Priority-Critical
- Removed labels: Priority-Medium
from py-leveldb.
Just fired up a simple test, and it seemed work alright. Could you provide me
with the exact leveldb version, and even better, a stacktrace?
#!/usr/bin/python
import leveldb
if False:
db = leveldb.LevelDB('./db')
db.Put('hello', 'world')
else:
leveldb.RepairDB('./db')
print 'DONE'
Original comment by [email protected]
on 20 Sep 2012 at 4:09
from py-leveldb.
I'm using py-leveldb with leveldb-1.5.0, snappy support enabled. (I tried it
without snappy support, no difference).
Here's the backtrace:
(gdb) bt
#0 0x00000008021497f9 in leveldb::RepairDB ()
from /usr/local/lib/libleveldb.so.1
#1 0x00000008021331ae in leveldb_repair_db ()
from /usr/local/lib/libleveldb.so.1
#2 0x0000000000539ad9 in PyCFunction_Call ()
#3 0x00000000004ba81e in PyEval_GetFuncDesc ()
#4 0x00000000004b68d7 in PyEval_EvalFrameEx ()
#5 0x00000000004b88a2 in PyEval_EvalCodeEx ()
#6 0x00000000004afe97 in PyEval_EvalCode ()
#7 0x00000000004e5d0b in PyRun_FileExFlags ()
#8 0x00000000004e5c89 in PyRun_FileExFlags ()
#9 0x00000000004e4b49 in PyRun_SimpleFileExFlags ()
Original comment by [email protected]
on 20 Sep 2012 at 7:24
from py-leveldb.
Note that the trace goes from PyCFunction_Call directly to leveldb_repair_db in
libleveldb, skipping leveldb_repair_db in py-leveldb. Stranger still, this does
not happen with leveldb_destroy_db.
'nm' shows leveldb_repair_db as an unbound ( "U" ) symbol in the generated .so
file, leveldb_destroy_db shows up as a text ("T") symbol.
$ nm build/lib.freebsd-9.0-RELEASE-p3-amd64-2.7/leveldb.so | egrep 'leveldb_(repair|destroy)_db'
0000000000003af0 T _Z17leveldb_repair_dbP9PyLevelDBP7_object
0000000000003670 T leveldb_destroy_db
00000000000073a0 R leveldb_destroy_db_doc
U leveldb_repair_db
0000000000007340 R leveldb_repair_db_doc
Original comment by [email protected]
on 20 Sep 2012 at 8:20
from py-leveldb.
I don´t see the same think on my side.
0000000000017470 T _Z19pyleveldb_repair_dbP9PyLevelDBP7_object
00000000000176c0 T _Z20pyleveldb_destroy_dbP7_objectS0_
0000000000043e40 R pyleveldb_destroy_db_doc
0000000000043ec0 R pyleveldb_repair_db_doc
0000000000017470 T _Z19pyleveldb_repair_dbP9PyLevelDBP7_object
00000000000176c0 T _Z20pyleveldb_destroy_dbP7_objectS0_
0000000000043e40 R pyleveldb_destroy_db_doc
0000000000043ec0 R pyleveldb_repair_db_doc
Does this perhaps have something to do with the functions having the "extern"
modifier. It seems like a mistake.
Original comment by [email protected]
on 20 Sep 2012 at 8:57
from py-leveldb.
Yes, that is my thought. It's as if my compilation environment (gcc/g++ 4.2.1)
is doing something wonky with the extern "C" bits. Since the functions are not
shared between source modules, but are rather in a data structure which is,
perhaps the extern-ing is unnecessary?
Original comment by [email protected]
on 21 Sep 2012 at 3:20
from py-leveldb.
Since I´m unable to reproduce this, could you try this?
Original comment by [email protected]
on 21 Sep 2012 at 8:57
from py-leveldb.
Yes, that worked well. DIffs attached.
Original comment by [email protected]
on 21 Sep 2012 at 12:37
Attachments:
from py-leveldb.
This issue was closed by revision r63.
Original comment by [email protected]
on 21 Sep 2012 at 1:55
- Changed state: Fixed
from py-leveldb.
Related Issues (20)
- add setuptools support HOT 3
- Return None from LevelDB.Get rather than raising KeyError (performance) HOT 5
- build fails due to __init__.py not found HOT 3
- Allow comparator name to be specified HOT 18
- RangeIter doesn't accept None for key_from or key_to HOT 2
- RepairDB does not accept comparators HOT 1
- Support for CompactRange() HOT 1
- 求增加连接python-leveldb 32位 for windows
- Does not build due to missing snappy header HOT 2
- Build fails with latest version of snappy and pyleveldb HOT 2
- Segmentation fault ? It was py-leveldb bug ? or levelDB bug? HOT 2
- Need a method to close/unlock the database HOT 3
- Memory leak when using WriteBatch HOT 1
- Request to update setup.py/pypi HOT 4
- Installation requires ez_setup HOT 3
- leveldb cannot be installed HOT 4
- ..
- can't iterate over the db keys & values
- Fails to build on OS X 10.9.5 with Xcode 6.1.1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from py-leveldb.