Checksum verification crash (SIGBUS)
- Dominant language
- C++
- Stars
- 32.1k
- Forks
- 6.9k
- Avg merge
- 32m
- Merged PRs (30d)
- 1
Description
### Expected behavior
A RocksException
### Actual behavior
The app crashes every few hours with "SIGBUS fatal error"
### Steps to reproduce the behavior
Not reproducible, I can send the sst file, if there's a way to identify which one causes the crash.
[hs_err_pid1125488.log](https://github.com/facebook/rocksdb/files/12623888/hs_err_pid1125488.log)
```java
Stack: [0x000078c24cc79000,0x000078c24cd79000], sp=0x000078c24cd75220, free space=1008k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [librocksdbjni8977305571557520989.so+0x6df111] rocksdb::VerifyBlockChecksum(rocksdb::ChecksumType, char const*, unsigned long, std::string const&, unsigned long)+0x71
C [librocksdbjni8977305571557520989.so+0x6e2e02] rocksdb::BlockFetcher::ReadBlockContents()+0x23c2
C [librocksdbjni8977305571557520989.so+0x6af416] std::enable_if<(rocksdb::Block_kData::kCacheEntryRole==((rocksdb::CacheEntryRole)13))||(true), rocksdb::Status>::type rocksdb::BlockBasedTable::MaybeReadBlockAndLoadToCache(rocksdb::FilePrefetchBuffer*, rocksdb::ReadOptions const&, rocksdb::BlockHandle const&, rocksdb::UncompressionDict const&, bool, rocksdb::CachableEntry*, rocksdb::GetContext*, rocksdb::BlockCacheLookupContext*, rocksdb::BlockContents*, bool) const+0x646
C [librocksdbjni8977305571557520989.so+0x6af743] std::enable_if<(rocksdb::Block_kData::kCacheEntryRole==((rocksdb::CacheEntryRole)13))||(true), rocksdb::Status>::type rocksdb::BlockBasedTable::RetrieveBlock(rocksdb::FilePrefetchBuffer*, rocksdb::ReadOptions const&, rocksdb::BlockHandle const&, rocksdb::UncompressionDict const&, rocksdb::CachableEntry*, rocksdb::GetContext*, rocksdb::BlockCacheLookupContext*, bool, bool, bool) const+0x273
C [librocksdbjni8977305571557520989.so+0x68df8c] rocksdb::DataBlockIter* rocksdb::BlockBasedTable::NewDataBlockIterator(rocksdb::ReadOptions const&, rocksdb::BlockHandle const&, rocksdb::DataBlockIter*, rocksdb::BlockType, rocksdb::GetContext*, rocksdb::BlockCacheLookupContext*, rocksdb::FilePrefetchBuffer*, bool, bool, rocksdb::Status&) const+0x26c
C [librocksdbjni8977305571557520989.so+0x688634] rocksdb::BlockBasedTableIterator::InitDataBlock()+0x124
C [librocksdbjni8977305571557520989.so+0x68c6b8] rocksdb::BlockBasedTableIterator::SeekImpl(rocksdb::Slice const*, bool)+0x238
C [librocksdbjni8977305571557520989.so+0x5351b1]
C [librocksdbjni8977305571557520989.so+0x6fbd1a] rocksdb::MergingIterator::SeekImpl(rocksdb::Slice const&, unsigned long, bool)+0x4ea
C [librocksdbjni8977305571557520989.so+0x701047] rocksdb::MergingIterator::Seek(rocksdb::Slice const&)+0x77
C [librocksdbjni8977305571557520989.so+0x47a58e] rocksdb::DBIter::Seek(rocksdb::Slice const&)+0x49e
C [librocksdbjni8977305571557520989.so+0x2af708] Java_org_rocksdb_RocksIterator_seek0+0x88
```
Contributor guide
Research direction
Start with the attached hs_err_pid1125488.log and the native stack through VerifyBlockChecksum, BlockFetcher::ReadBlockContents, BlockBasedTableIterator::SeekImpl, and Java_org_rocksdb_RocksIterator_seek0. Determine why checksum verification reaches SIGBUS instead of producing the expected RocksException; done means the failure is reproducible or explained and the behavior is covered by an appropriate test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, java
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100