Description
Running db_bench with fillseq benchmark and large number of keys (4.5 billion) caused segmentation error after more than 1.959 billion keys were generated but well before device was filled. Using code as of yesterday afternoon.
Command was:
bpl=1048576;overlap=10;mcz=2;del=300000000;levels=6;ctrig=4; delay=8; stop=12; wbn=3; mbc=6; mb=67108864;wbs=134217728; dds=0; sync=0; r=4500000000; t=1; vs=800; bs=65536; cs=1048576; of=500000; si=1000000; ./db_bench --benchmarks=fillseq --disable_seek_compaction=1 --mmap_read=0 --statistics=1 --histogram=1 --num=$r --threads=$t --value_size=$vs --block_size=$bs --cache_size=$cs --bloom_bits=10 --cache_numshardbits=4 --open_files=$of --verify_checksum=1 --db=/media/stephen/f4098456-97de-4569-852d-d3eceb1e7a82/database --sync=$sync --disable_wal=1 --compression_type=zlib --stats_interval=$si --compression_ratio=0.50 --disable_data_sync=$dds --write_buffer_size=$wbs --target_file_size_base=$mb --max_write_buffer_number=$wbn --max_background_compactions=$mbc --level0_file_num_compaction_trigger=$ctrig --level0_slowdown_writes_trigger=$delay --level0_stop_writes_trigger=$stop --num_levels=$levels --delete_obsolete_files_period_micros=$del --min_level_to_compress=$mcz --max_grandparent_overlap_factor=$overlap --stats_per_interval=1 --max_bytes_for_level_base=$bpl --use_existing_db=0
Crash resulted in:
Received signal 11 (Segmentation fault)
#0 ./db_bench() [0x47b039] GetVarint32Ptr /home/stephen/Downloads/rocksdb/rocksdb-master/./util/coding.h:109
#1 ./db_bench() [0x41e7e9] rocksdb::BuildTable(std::string const&, rocksdb::Env_, rocksdb::ImmutableCFOptions const&, rocksdb::EnvOptions const&, rocksdb::TableCache_, rocksdb::Iterator_, rocksdb::FileMetaData_, rocksdb::InternalKeyComparator const&, unsigned long, unsigned long, ocksdb::CompressionType, rocksdb::CompressionOptions const&, rocksdb::Env::IOPriority) /home/stephen/Downloads/rocksdb/rocksdb-master/db/builder.cc:100
#2 ./db_bench() [0x444637] rocksdb::Status::operator=(rocksdb::Status const&) /home/stephen/Downloads/rocksdb/rocksdb-master/./include/rocksdb/status.h:145 (discriminator 1)
#3 ./db_bench() [0x444bed] rocksdb::Status::ok() const /home/stephen/Downloads/rocksdb/rocksdb-master/db/db_impl.cc:4899
#4 ./db_bench() [0x44576e] rocksdb::Status::operator=(rocksdb::Status const&) /home/stephen/Downloads/rocksdb/rocksdb-master/./include/rocksdb/status.h:145 (discriminator 1)
#5 ./db_bench() [0x4532fb] rocksdb::DBImpl::BackgroundCallFlush() /home/stephen/Downloads/rocksdb/rocksdb-master/db/db_impl.cc:2101 (discriminator 1)
#6 ./db_bench() [0x4e2024] BGThread /home/stephen/Downloads/rocksdb/rocksdb-master/util/env_posix.cc:1616
#7 /lib/x86_64-linux-gnu/libpthread.so.0(+0x7e9a) [0x7f9b6b48ee9a] ?? ??:0
#8 /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7f9b69f543fd] ?? ??:0
./Test2: line 2: 6723 Segmentation fault (core dumped) ./db_bench --benchmarks=fillseq --disable_seek_compaction=1 --mmap_read=0 --statistics=1 --histogram=1 --num=$r --threads=$t --value_size=$vs --block_size=$bs --cache_size=$cs --bloom_bits=10 --cache_numshardbits=4 --open_files=$of --verify_checksum=1 --db=/media/stephen/f4098456-97de-4569-852d-d3eceb1e7a82/database --sync=$sync --disable_wal=1 --compression_type=zlib --stats_interval=$si --compression_ratio=0.50 --disable_data_sync=$dds --write_buffer_size=$wbs --target_file_size_base=$mb --max_write_buffer_number=$wbn --max_background_compactions=$mbc --level0_file_num_compaction_trigger=$ctrig --level0_slowdown_writes_trigger=$delay --level0_stop_writes_trigger=$stop --num_levels=$levels --delete_obsolete_files_period_micros=$del --min_level_to_compress=$mcz --max_grandparent_overlap_factor=$overlap --stats_per_interval=1 --max_bytes_for_level_base=$bpl --use_existing_db=0
Command exited with non-zero status 139
Last few lines of trace files were:
** Compaction Stats [default] **
Level Files Size(MB) Score Read(GB) Rn(GB) Rnp1(GB) Write(GB) Wnew(GB) RW-Amp W-Amp Rd(MB/s) Wr(MB/s) Rn(cnt) Rnp1(cnt) Wnp1(cnt) Wnew(cnt) Comp(sec) Comp(cnt) Avg(sec) Stall(sec) Stall(cnt) Avg(ms) RecordIn RecordDrop
L0 5/1 608 1.0 0.0 0.0 0.0 1502.4 1502.4 0.0 0.0 0.0 38.5 0 0 0 0 39992 12657 3.160 0.04 37297 0.00 0 0
L2 1/1 122 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 0 0 0 0.000 0.00 0 0.00 0 0
L4 8/0 972 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 0 0 0 0.000 0.00 0 0.00 0 0
L5 12643/0 1536767 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 0 0 0 0.000 0.00 0 0.00 0 0
Sum 12657/2 1538468 0.0 0.0 0.0 0.0 1502.4 1502.4 1.0 1.0 0.0 38.5 0 0 0 0 39992 12657 3.160 0.04 37297 0.00 0 0
Int 0/0 0 0.0 0.0 0.0 0.0 0.7 0.7 1.0 1.0 0.0 33.5 0 0 0 0 22 6 3.632 0.00 13 0.00 0 0
Flush(GB): accumulative 1502.410, interval 0.712
Stalls(secs): 0.000 level0_slowdown, 0.000 level0_numfiles, 0.037 memtable_compaction, 0.000 leveln_slowdown_soft, 0.000 leveln_slowdown_hard
Stalls(count): 0 level0_slowdown, 0 level0_numfiles, 37297 memtable_compaction, 0 leveln_slowdown_soft, 0 leveln_slowdown_hard
** DB Stats **
Uptime(secs): 14513.4 total, 7.9 interval
Cumulative writes: 1959000000 writes, 1959000000 batches, 1.0 writes per batch, 1517.95 GB user ingest
Cumulative WAL: 0 writes, 0 syncs, 0.00 writes per sync, 0.00 GB written
Interval writes: 1000000 writes, 1000000 batches, 1.0 writes per batch, 793.5 MB user ingest
Interval WAL: 0 writes, 0 syncs, 0.00 writes per sync, 0.00 MB written
df ouput showed:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 476770320 250691264 201860484 56% /
udev 8062516 4 8062512 1% /dev
tmpfs 3251452 840 3250612 1% /run
none 5120 0 5120 0% /run/lock
none 8128624 156 8128468 1% /run/shm
none 102400 44 102356 1% /run/user
cgroup 8128624 0 8128624 0% /sys/fs/cgroup
/dev/sdb 3845710688 1576027268 2074332492 44% /media/stephen/f4098456-97de-4569-852d-d3eceb1e7a82