GithubHelp home page GithubHelp logo

Comments (9)

GoogleCodeExporter avatar GoogleCodeExporter commented on September 26, 2024

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.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 26, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 26, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 26, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 26, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 26, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 26, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 26, 2024
Yes, that worked well. DIffs attached.

Original comment by [email protected] on 21 Sep 2012 at 12:37

Attachments:

from py-leveldb.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 26, 2024
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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.