liuis / leveldb

Automatically exported from code.google.com/p/leveldb
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

corruption_test fails #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi. I have some problems installing leveldb. 

I run make check and corruption_test test fails. Running it under gdb i get

(gdb) run
Starting program: /home/spyros/src/leveldb/corruption_test 
[Thread debugging using libthread_db enabled]
==== Test CorruptionTest.Recovery

Program received signal SIGSEGV, Segmentation fault.
0x0805d4b2 in leveldb::SkipList<char const*, 
leveldb::MemTable::KeyComparator>::FindGreaterOrEqual(char const* const&, 
leveldb::SkipList<char const*, leveldb::MemTable::KeyComparator>::Node**) const 
()
(gdb) bt
#0  0x0805d4b2 in leveldb::SkipList<char const*, 
leveldb::MemTable::KeyComparator>::FindGreaterOrEqual(char const* const&, 
leveldb::SkipList<char const*, leveldb::MemTable::KeyComparator>::Node**) const 
()
#1  0x0805d5bc in leveldb::SkipList<char const*, 
leveldb::MemTable::KeyComparator>::Insert(char const* const&) ()
#2  0x0805cf2a in leveldb::MemTable::Add(unsigned long long, 
leveldb::ValueType, leveldb::Slice const&, leveldb::Slice const&) ()
#3  0x08069779 in leveldb::(anonymous 
namespace)::MemTableInserter::Put(leveldb::Slice const&, leveldb::Slice const&) 
()
#4  0x08069a9d in leveldb::WriteBatch::Iterate(leveldb::WriteBatch::Handler*) 
const ()
#5  0x08069b40 in leveldb::WriteBatchInternal::InsertInto(leveldb::WriteBatch 
const*, leveldb::MemTable*) ()
#6  0x0805685e in leveldb::DBImpl::Write(leveldb::WriteOptions const&, 
leveldb::WriteBatch*) ()
#7  0x0804f090 in leveldb::CorruptionTest::Build(int) ()
#8  0x0804cd6a in leveldb::_Test_Recovery::_Run() ()
#9  0x0805053a in leveldb::_Test_Recovery::_RunIt() ()
#10 0x08074b4e in leveldb::test::RunAllTests() ()
#11 0x0804a84b in main ()

I get an analogous error if i run this minimal snippet

int
main(int argc, char* argv[])
{
    leveldb::DB* db;
    leveldb::Options options;
    options.create_if_missing = true;
    leveldb::Status s = leveldb::DB::Open(options, "/home/spyros/src/async/leveldb/keystore", &db);
    leveldb::WriteOptions wopts;
    wopts.sync = true;
    if (s.ok()) s = db->Put(wopts, "Hello", "World");
    std::string val;
    if (s.ok()) s = db->Get(leveldb::ReadOptions(), "Hello", &val);
    if (s.ok())
        std::cerr << "Value of 'Hello' is " << val << std::endl;
    else
        std::cerr << "DB error: " << s.ToString() << std::endl;
    delete db;
}

the gdb output in this case is
(gdb) run
Starting program: /home/spyros/src/async/minimal 
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0x08056cd2 in leveldb::SkipList<char const*, 
leveldb::MemTable::KeyComparator>::FindGreaterOrEqual(char const* const&, 
leveldb::SkipList<char const*, leveldb::MemTable::KeyComparator>::Node**) const 
()
(gdb) bt
#0  0x08056cd2 in leveldb::SkipList<char const*, 
leveldb::MemTable::KeyComparator>::FindGreaterOrEqual(char const* const&, 
leveldb::SkipList<char const*, leveldb::MemTable::KeyComparator>::Node**) const 
()
#1  0x08056d9e in leveldb::MemTableIterator::Seek(leveldb::Slice const&) ()
#2  0x08053da1 in leveldb::(anonymous namespace)::DBIter::Seek(leveldb::Slice 
const&) ()
#3  0x0804df82 in leveldb::DBImpl::Get(leveldb::ReadOptions const&, 
leveldb::Slice const&, std::string*) ()
#4  0x0804a4d3 in main ()

I use ubuntu 10.04 LTS 32-bit gcc 4.4.3 and gdb 7.1, leveldb revision 31

Any suggestions for this setup?

Thank you
Spyros

Original issue reported on code.google.com by winwas...@gmail.com on 19 Jun 2011 at 9:56

GoogleCodeExporter commented 9 years ago
Confirmed on a similar setup Ubuntu 10.04 / 32-bit with r35.

Original comment by diz...@gmail.com on 30 Jun 2011 at 12:34

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r36.

Original comment by ga...@google.com on 30 Jun 2011 at 11:17

GoogleCodeExporter commented 9 years ago
This issue was closed by revision ed154f6dc4f5.

Original comment by ga...@google.com on 1 Sep 2011 at 8:12