Actions
Bug #26866
closedOSDMapMapping does not handle active.size() > pool size
% Done:
0%
Source:
Tags:
Backport:
mimic,luminous
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
In some cases the active vector could be larger than the pool size (e.g., residual pg_temp mapping after pool size is reduced).
In this case, the OSDMapMapping code falls over itself and can crash like so:
0> 2018-08-06 18:20:56.373266 7f9e4b98d700 -1 *** Caught signal (Segmentation fault) ** in thread 7f9e4b98d700 thread_name:cpu_tp ceph version 12.2.5 (cad919881333ac92274171586c827e01f554a70a) luminous (stable) 1: (()+0x8f51b1) [0x560c971ab1b1] 2: (()+0xf6d0) [0x7f9e541106d0] 3: (void std::vector<pg_t, mempool::pool_allocator<(mempool::pool_index_t)16, pg_t> >::_M_emplace_back_aux<pg_t const&>(pg_t const&)+0x69) [0x560c96fb5fd9] 4: (OSDMapMapping::_build_rmap(OSDMap const&)+0x209) [0x560c96fb5389] 5: (OSDMapMapping::_finish(OSDMap const&)+0x11) [0x560c96fb53c1] 6: (ParallelPGMapper::Job::finish_one()+0x82) [0x560c96fb4332] 7: (ParallelPGMapper::WQ::_process(ParallelPGMapper::Item*, ThreadPool::TPHandle&)+0x7f) [0x560c96fb43ff] 8: (ThreadPool::worker(ThreadPool::WorkThread*)+0xa8e) [0x560c96eaf59e] 9: (ThreadPool::WorkThread::entry()+0x10) [0x560c96eb0480] 10: (()+0x7e25) [0x7f9e54108e25] 11: (clone()+0x6d) [0x7f9e512febad] NOTE: a copy of the executable, or `objdump -rdS <executable>` is needed to interpret this.
Actions