Project

General

Profile

Actions

Bug #26866

closed

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

Added by Sage Weil over 5 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
Urgent
Assignee:
Category:
-
Target version:
-
% 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.

Related issues 2 (0 open2 closed)

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

Updated by Sage Weil over 5 years ago

  • Status changed from 12 to Fix Under Review
  • Backport set to mimic,luminous
Actions #2

Updated by Sage Weil over 5 years ago

  • Status changed from Fix Under Review to Pending Backport

daf53f42

Actions #3

Updated by Nathan Cutler over 5 years ago

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

Updated by Nathan Cutler over 5 years ago

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

Updated by Nathan Cutler over 5 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF