Project

General

Profile

Bug #55145

Updated by Vikhyat Umrao almost 2 years ago

The boundary check in SimpleBitmap is off by one causing an assert to trigger

<pre>


2022-03-31T02:30:03.282076Z_1752ad21-6733-4266-8389-b70fb8d94408
{
"assert_condition": "offset + length < m_num_bits",
"assert_file":
"/home/jenkins-build/build/workspace/ceph-dev-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/17.1.0-138-g723fda64/rpm/el8/BUILD/ceph-17.1.0-138-g723fda64/src/os/bluestore/simple_bitmap.cc",
"assert_func": "bool SimpleBitmap::set(uint64_t, uint64_t)",
"assert_line": 54,
"assert_msg":
"/home/jenkins-build/build/workspace/ceph-dev-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/17.1.0-138-g723fda64/rpm/el8/BUILD/ceph-17.1.0-138-g723fda64/src/os/bluestore/simple_bitmap.cc:
In function 'bool SimpleBitmap::set(uint64_t, uint64_t)' thread
7f077a8913c0 time
2022-03-31T02:30:03.274438+0000\n/home/jenkins-build/build/workspace/ceph-dev-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/17.1.0-138-g723fda64/rpm/el8/BUILD/ceph-17.1.0-138-g723fda64/src/os/bluestore/simple_bitmap.cc:
54: FAILED ceph_assert(offset + length < m_num_bits)\n",
"assert_thread_name": "ceph-osd",
"backtrace": [
"/lib64/libpthread.so.0(+0x12ce0) [0x7f0778a96ce0]",
"gsignal()",
"abort()",
"(ceph::__ceph_assert_fail(char const*, char const*, int, char
const*)+0x1b0) [0x56200752f4c2]",
"/usr/bin/ceph-osd(+0x5d7685) [0x56200752f685]",
"(SimpleBitmap::set(unsigned long, unsigned long)+0x1221)
[0x562007c26b41]",
"(BlueStore::read_allocation_from_single_onode(SimpleBitmap*,
boost::intrusive_ptr<BlueStore::Onode>&,
BlueStore::read_alloc_stats_t&)+0x294) [0x562007b4d334]",
"(BlueStore::read_allocation_from_onodes(SimpleBitmap*,
BlueStore::read_alloc_stats_t&)+0x8f7) [0x562007b9adb7]",
"(BlueStore::reconstruct_allocations(SimpleBitmap*,
BlueStore::read_alloc_stats_t&)+0x5d) [0x562007b9be8d]",
"(BlueStore::read_allocation_from_drive_on_startup()+0x99)
[0x562007baeec9]",
"(BlueStore::_init_alloc(std::map<unsigned long, unsigned
long, std::less<unsigned long>,
std::allocator<std::pair<unsigned long const, unsigned long>
> >*)+0xaeb) [0x562007bafc2b]",
"(BlueStore::_open_db_and_around(bool, bool)+0x321)
[0x562007be82a1]",
"(BlueStore::_mount()+0x1ae) [0x562007beb41e]",
"(OSD::init()+0x403) [0x56200766d523]",
"main()",
"__libc_start_main()",
"_start()"
],
</pre>

Back