(gdb) backtrace
#0 0x00007f73a77d5165 in *__GI_raise (sig=)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1 0x00007f73a77d83e0 in *__GI_abort () at abort.c:92
#2 0x00007f73a77ce311 in *__GI___assert_fail (
assertion=0x7f73abb88fa8 "r->options.comparator->Compare(key, Slice(r->last_key)) > 0", file=, line=97,
function=0x7f73abb89040 "void leveldb::TableBuilder::Add(const leveldb::Slice&, const leveldb::Slice&)") at assert.c:81
#3 0x00007f73ab74ad96 in leveldb::TableBuilder::Add (this=0x7f73acf98200,
key=..., value=...) at table/table_builder.cc:97
#4 0x00007f73ab732fca in leveldb::DBImpl::DoCompactionWork (
this=this@entry=0x7f738091fd10, compact=compact@entry=0x7f73acc3e110)
at db/db_impl.cc:963
#5 0x00007f73ab7337c3 in leveldb::DBImpl::BackgroundCompaction (
this=this@entry=0x7f738091fd10) at db/db_impl.cc:706
#6 0x00007f73ab734222 in leveldb::DBImpl::BackgroundCall (this=0x7f738091fd10)
at db/db_impl.cc:644
#7 0x00007f73ab75078f in BGThread (this=)
at util/env_posix.cc:571
#8 leveldb::(anonymous namespace)::PosixEnv::BGThreadWrapper (
arg=0x7f7380923e80) at util/env_posix.cc:510
#9 0x00007f73a8edab50 in start_thread (arg=)
at pthread_create.c:304
---Type to continue, or q to quit---
#10 0x00007f73a787e95d in clone ()
at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()
(gdb)
OK, not much help from the core dump here. Apparently, the failure happens in a background thread that originates from the levelDB code, not from the Bitcoin core code. So it could be related to any already-loaded LevelDB database.
Now, while I'll do some further debugging, does someone know where to find the database lay-out used in Bitcoin's LevelDB databases? I'd like to know how I can recognize inconsistent states, and recover Bitcoin to a consistent state.
EDIT:
Apparently, .bitcoin/blocks/index/LOG gets rewritten after each attempt to start bitcoin-qt. The most recent contents right now is:
2015/06/20-13:51:31.656165 7f7399b09700 Recovering log #53983
2015/06/20-13:51:31.895293 7f7399b09700 Delete type=2 #53987
2015/06/20-13:51:31.895893 7f7399b09700 Delete type=2 #53989
2015/06/20-13:51:31.896966 7f7399b09700 Delete type=2 #53991
2015/06/20-13:51:31.897791 7f7399b09700 Delete type=2 #53984
2015/06/20-13:51:31.898344 7f7399b09700 Delete type=2 #53992
2015/06/20-13:51:31.898468 7f7399b09700 Delete type=2 #53985
2015/06/20-13:51:31.898998 7f7399b09700 Delete type=2 #53990
2015/06/20-13:51:31.899528 7f7399b09700 Delete type=2 #53986
2015/06/20-13:51:31.900043 7f7399b09700 Delete type=0 #53983
2015/06/20-13:51:31.900074 7f7399b09700 Delete type=3 #53982
2015/06/20-13:51:31.900224 7f7399b09700 Delete type=2 #53988
2015/06/20-13:51:31.901200 7f738654b700 Compacting 5@0 + 6@1 files
2015/06/20-13:51:32.113270 7f738654b700 Generated table #53986: 37886 keys, 2013418 bytes
2015/06/20-13:51:32.324513 7f738654b700 Generated table #53987: 41465 keys, 2169643 bytes
2015/06/20-13:51:32.534105 7f738654b700 Generated table #53988: 41487 keys, 2171790 bytes
2015/06/20-13:51:32.633776 7f738654b700 Generated table #53989: 8389 keys, 439433 bytes
2015/06/20-13:51:32.832583 7f738654b700 Generated table #53990: 41405 keys, 2168859 bytes
2015/06/20-13:51:33.042172 7f738654b700 Generated table #53991: 33492 keys, 1756388 bytes
2015/06/20-13:51:33.251728 7f738654b700 Generated table #53992: 41395 keys, 2172333 bytes
2015/06/20-13:51:33.439531 7f738654b700 Generated table #53993: 31681 keys, 1662583 bytes
Interestingly, there is a 053994.ldb in the directory. So, my current guess is the error is in that file.
EDIT 2: apparently, every time I re-start bitcoin-qt, it creates a couple of new .ldb files in that directory. I don't know yet whether that's a good or a bad thing though.