Project

General

Profile

Bug #26866

OSDMapMapping does not handle active.size() > pool size

Added by Sage Weil 4 months ago. Updated about 1 month ago.

Status:
Resolved
Priority:
Urgent
Assignee:
Category:
-
Target version:
-
Start date:
08/06/2018
Due date:
% Done:

0%

Source:
Tags:
Backport:
mimic,luminous
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

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.

Related issues

Copied to Ceph - Backport #35935: luminous: OSDMapMapping does not handle active.size() > pool size Resolved
Copied to Ceph - Backport #35936: mimic: OSDMapMapping does not handle active.size() > pool size Resolved

History

#1 Updated by Sage Weil 4 months ago

  • Status changed from Verified to Need Review
  • Backport set to mimic,luminous

#2 Updated by Sage Weil 3 months ago

  • Status changed from Need Review to Pending Backport

daf53f42

#3 Updated by Nathan Cutler 3 months ago

  • Copied to Backport #35935: luminous: OSDMapMapping does not handle active.size() > pool size added

#4 Updated by Nathan Cutler 3 months ago

  • Copied to Backport #35936: mimic: OSDMapMapping does not handle active.size() > pool size added

#5 Updated by Nathan Cutler about 1 month ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF