Bus error on leveldb open after recovery #42

Closed
chardan opened this Issue Aug 10, 2012 · 0 comments

Projects

None yet

2 participants

@chardan
Contributor
chardan commented Aug 10, 2012

A full disk followed by repair leads to SIGBUS on Open():

  • One Riak instance with eleveldb enabled. Data directory is in devrel node
    on the same disk as Riak and it's logs.

* basho_bench configured with:

%%
%% Prepopulate database to ~1Gb using 1k objects - requires 750k
%%

%% Make sure this is max/infinity so the populate completes
{mode, max}.
{duration, infinity}.
%% Make this a multiple of final key size - partitioned_sequential_int keygen is fussy
{concurrent, 10}.

%% Set up bucket to use - configure with n_val=1
%% using riak_core_bucket:set_bucket(<<"b1">>,[{n_val,1}]).
%% from riak console
{riakc_pb_bucket, <<"b1">>}.
{key_generator, {int_to_bin, {partitioned_sequential_int, 0, 75000000}}}.
{value_generator, {fixed_bin, 1000}}.
{operations, [{put, 1}]}.

%% Riak connection info
{riakc_pb_ips, [ "127.0.0.1" ]}.
{riakc_pb_replies, default}.

%% Setup cruft
{driver, basho_bench_driver_riakc_pb}.
{code_paths, ["deps/riakc",

"deps/protobuffs"]}.

  • This is allowed to exhaust disk space during the benchmark. The benchmark halts,
    as riak stops. No message is logged (presumably because disk space is exhausted).
  • leveldb::RepairDB() called on leveldb/0
  • leveldb::DB::Open() called with option create_if_missing=true on leveldb/0
  • See: "Bus error" from SIGBUS and program abort with stack trace:
    #0 0x00007ffff712c5b8 in memcpy_ssse3 () from /lib64/libc.so.6
    #1 0x000000000042c165 in leveldb::(anonymous namespace)::PosixMmapFile::Append(leveldb::Slice const&) ()
    #2 0x0000000000423f78 in leveldb::TableBuilder::WriteRawBlock(leveldb::Slice const&, leveldb::CompressionType, leveldb::BlockHandle
    ) ()
    #3 0x0000000000424174 in leveldb::TableBuilder::WriteBlock(leveldb::BlockBuilder
    , leveldb::BlockHandle_) ()
    #4 0x0000000000424314 in leveldb::TableBuilder::Flush() ()
    #5 0x00000000004244bb in leveldb::TableBuilder::Add(leveldb::Slice const&, leveldb::Slice const&) ()
    #6 0x000000000042d667 in leveldb::BuildTable(std::string const&, leveldb::Env_, leveldb::Options const&, leveldb::TableCache_, leveldb::Iterator_, leveldb::FileMetaData_) ()
    #7 0x000000000040919b in leveldb::DBImpl::WriteLevel0Table(leveldb::MemTable_, leveldb::VersionEdit_, leveldb::Version_) ()
    #8 0x0000000000409d4d in leveldb::DBImpl::RecoverLogFile(unsigned long, leveldb::VersionEdit_, unsigned long_) ()
    #9 0x000000000040ccf5 in leveldb::DBImpl::Recover(leveldb::VersionEdit_) ()
    #10 0x000000000040d076 in leveldb::DB::Open(leveldb::Options const&, std::string const&, leveldb::DB_*) ()
    #11 0x0000000000404260 in main ()
@matthewvon matthewvon closed this Mar 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment