Bug #35971
closedbloom filter num entry miscalculation in bluestore repairer
0%
Description
This could cause an assertion due to an access to uninitialized bloom
filter. This happened when detected errors involving physical extents were
close to the end of a large partition.
E.g. it was observed in http://tracker.ceph.com/issues/25001 while trying to repair an OSD.
2018-07-27 21:31:34.163 7f261bea7a00 20 bluestore(/var/lib/ceph/osd/ceph-18) fsck referenced 0x1 for Blob(0x55f47044a850 blob([0x3223b190000~10000] csum+has_unused crc32c/0x1000 unused=0xfffe) use_tracker(0x10000 0x1000) SharedBlob(0x55f47044a9a0 sbid 0x0))
2018-07-27 21:31:34.164 7f261bea7a00 -1 /home/jenkins-build/build/workspace/ceph-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos7/DIST/centos7/MACHINE_SIZE/huge/release/13.2.1/rpm/el7/BUILD/ceph-13.2.1/src/common/bloom_filter.hpp: In function 'void bloom_filter::insert(uint32_t)' thread 7f261bea7a00 time 2018-07-27 21:31:34.163644
/home/jenkins-build/build/workspace/ceph-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos7/DIST/centos7/MACHINE_SIZE/huge/release/13.2.1/rpm/el7/BUILD/ceph-13.2.1/src/common/bloom_filter.hpp: 159: FAILED assert(bit_table)
ceph version 13.2.1 (5533ecdc0fda920179d7ad84e0aa65a127b20d77) mimic (stable)
1: (ceph::__ceph_assert_fail(char const*, char const*, int, char const*)+0xff) [0x7f2612239e1f]
2: (()+0x284fe7) [0x7f2612239fe7]
3: (BlueStore::_fsck_check_extents(coll_t const&, ghobject_t const&, std::vector<bluestore_pextent_t, mempool::pool_allocator<(mempool::pool_index_t)4, bluestore_pextent_t> > const&, bool, boost::dynamic_bitset<unsigned long, mempool::pool_allocator<(mempool::pool_index_t)5, unsigned long> >&, unsigned long, BlueStoreRepairer*, store_statfs_t&)+0x4aa) [0x55f43ab265fa]
4: (BlueStore::_fsck(bool, bool)+0x36b6) [0x55f43ab91f66]
5: (main()+0xea6) [0x55f43aa184f6]
6: (__libc_start_main()+0xf5) [0x7f260ee51445]
7: (()+0x2365ff) [0x55f43aaea5ff]
NOTE: a copy of the executable, or `objdump -rdS <executable>` is needed to interpret this.