Project

General

Profile

Actions

Bug #48896

open
NO AA

osd/OSDMap.cc: FAILED ceph_assert(osd_weight.count(i.first))

Bug #48896: osd/OSDMap.cc: FAILED ceph_assert(osd_weight.count(i.first))

Added by Neha Ojha almost 6 years ago. Updated 23 days ago.

Status:
Fix Under Review
Priority:
Low
Assignee:
Category:
-
Target version:
Due date:
% Done:

0%

Source:
Q/A
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(RADOS):
Pull request ID:
Tags (freeform):
Merge Commit:
Fixed In:
Released In:
Upkeep Timestamp:

Description

2021-01-15T02:47:33.304 INFO:tasks.ceph.mgr.x.smithi104.stderr:/home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/16.0.0-9032-ga83a843c/rpm/el8/BUILD/ceph-16.0.0-9032-ga83a843c/src/osd/OSDMap.cc: In function 'int OSDMap::calc_pg_upmaps(ceph::common::CephContext*, uint32_t, int, const std::set<long int>&, OSDMap::Incremental*)' thread 7ff80fa55700 time 2021-01-15T02:47:33.304700+0000
2021-01-15T02:47:33.304 INFO:tasks.ceph.mgr.x.smithi104.stderr:/home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/16.0.0-9032-ga83a843c/rpm/el8/BUILD/ceph-16.0.0-9032-ga83a843c/src/osd/OSDMap.cc: 4712: FAILED ceph_assert(osd_weight.count(i.first))
2021-01-15T02:47:33.305 INFO:tasks.ceph.mgr.x.smithi104.stderr: ceph version 16.0.0-9032-ga83a843c (a83a843c46a3fed51788b9b4ff9b5613bb5a855e) pacific (dev)
2021-01-15T02:47:33.305 INFO:tasks.ceph.mgr.x.smithi104.stderr: 1: (ceph::__ceph_assert_fail(char const*, char const*, int, char const*)+0x158) [0x7ff83682c3ca]
2021-01-15T02:47:33.305 INFO:tasks.ceph.mgr.x.smithi104.stderr: 2: /usr/lib64/ceph/libceph-common.so.2(+0x2765e4) [0x7ff83682c5e4]
2021-01-15T02:47:33.305 INFO:tasks.ceph.mgr.x.smithi104.stderr: 3: (OSDMap::calc_pg_upmaps(ceph::common::CephContext*, unsigned int, int, std::set<long, std::less<long>, std::allocator<long> > const&, OSDMap::Incremental*)+0x1216) [0x7ff836c79846]
2021-01-15T02:47:33.306 INFO:tasks.ceph.mgr.x.smithi104.stderr: 4: ceph-mgr(+0x2561ac) [0x564b276141ac]
2021-01-15T02:47:33.306 INFO:tasks.ceph.mgr.x.smithi104.stderr: 5: /lib64/libpython3.6m.so.1.0(+0x19cde7) [0x7ff83f821de7]
2021-01-15T02:47:33.306 INFO:tasks.ceph.mgr.x.smithi104.stderr: 6: _PyEval_EvalFrameDefault()
2021-01-15T02:47:33.306 INFO:tasks.ceph.mgr.x.smithi104.stderr: 7: /lib64/libpython3.6m.so.1.0(+0xf9754) [0x7ff83f77e754]
2021-01-15T02:47:33.307 INFO:tasks.ceph.mgr.x.smithi104.stderr: 8: /lib64/libpython3.6m.so.1.0(+0x179de0) [0x7ff83f7fede0]
2021-01-15T02:47:33.307 INFO:tasks.ceph.mgr.x.smithi104.stderr: 9: /lib64/libpython3.6m.so.1.0(+0x19d087) [0x7ff83f822087]
2021-01-15T02:47:33.307 INFO:tasks.ceph.mgr.x.smithi104.stderr: 10: _PyEval_EvalFrameDefault()
2021-01-15T02:47:33.307 INFO:tasks.ceph.mgr.x.smithi104.stderr: 11: /lib64/libpython3.6m.so.1.0(+0x179bf8) [0x7ff83f7febf8]
2021-01-15T02:47:33.307 INFO:tasks.ceph.mgr.x.smithi104.stderr: 12: /lib64/libpython3.6m.so.1.0(+0x19d087) [0x7ff83f822087]
2021-01-15T02:47:33.308 INFO:tasks.ceph.mgr.x.smithi104.stderr: 13: _PyEval_EvalFrameDefault()
2021-01-15T02:47:33.308 INFO:tasks.ceph.mgr.x.smithi104.stderr: 14: /lib64/libpython3.6m.so.1.0(+0x179bf8) [0x7ff83f7febf8]
2021-01-15T02:47:33.308 INFO:tasks.ceph.mgr.x.smithi104.stderr: 15: /lib64/libpython3.6m.so.1.0(+0x19d087) [0x7ff83f822087]
2021-01-15T02:47:33.308 INFO:tasks.ceph.mgr.x.smithi104.stderr: 16: _PyEval_EvalFrameDefault()
2021-01-15T02:47:33.308 INFO:tasks.ceph.mgr.x.smithi104.stderr: 17: /lib64/libpython3.6m.so.1.0(+0xfa0c6) [0x7ff83f77f0c6]
2021-01-15T02:47:33.309 INFO:tasks.ceph.mgr.x.smithi104.stderr: 18: _PyFunction_FastCallDict()
2021-01-15T02:47:33.309 INFO:tasks.ceph.mgr.x.smithi104.stderr: 19: _PyObject_FastCallDict()
2021-01-15T02:47:33.309 INFO:tasks.ceph.mgr.x.smithi104.stderr: 20: /lib64/libpython3.6m.so.1.0(+0x10d8f0) [0x7ff83f7928f0]
2021-01-15T02:47:33.309 INFO:tasks.ceph.mgr.x.smithi104.stderr: 21: _PyObject_FastCallDict()
2021-01-15T02:47:33.309 INFO:tasks.ceph.mgr.x.smithi104.stderr: 22: PyObject_CallMethod()
2021-01-15T02:47:33.310 INFO:tasks.ceph.mgr.x.smithi104.stderr: 23: (PyModuleRunner::serve()+0x66) [0x564b27610e86]
2021-01-15T02:47:33.310 INFO:tasks.ceph.mgr.x.smithi104.stderr: 24: (PyModuleRunner::PyModuleRunnerThread::entry()+0x1e5) [0x564b27611765]
2021-01-15T02:47:33.310 INFO:tasks.ceph.mgr.x.smithi104.stderr: 25: /lib64/libpthread.so.0(+0x814a) [0x7ff83540d14a]
2021-01-15T02:47:33.310 INFO:tasks.ceph.mgr.x.smithi104.stderr: 26: clone()

/a/nojha-2021-01-15_01:03:38-rados-wip-38730-2021-01-14-distro-basic-smithi/5786839

previous occurrence https://tracker.ceph.com/issues/42052


Related issues 2 (0 open — 2 closed)

Related to mgr - Bug #55656: mgr crash on "The path '/prometheus_receiver' was not found."Closed

Actions
Has duplicate RADOS - Bug #77785: qa/standalone/mon-stretch/mon-stretch-uneven-crush-weights.sh: ceph-mgr crashes with ceph_assert(osd_weight.count(oid))DuplicateLaura Flores

Actions

LF Updated by Laura Flores over 4 years ago Actions #1

  • Related to Bug #55656: mgr crash on "The path '/prometheus_receiver' was not found." added

LF Updated by Laura Flores almost 4 years ago Actions #2

/a/yuriw-2022-12-02_14:50:43-rados-wip-yuri8-testing-2022-12-01-0905-pacific-distro-default-smithi/7101371

LF Updated by Laura Flores almost 4 years ago Actions #3

  • Tags set to test-failure
  • Backport set to pacific

RZ Updated by Radoslaw Zarzynski almost 4 years ago Actions #4

  • Priority changed from Normal to Low

Low due to the low occurrence frequency.

MG Updated by Mykola Golub about 3 years ago Actions #6

  • Status changed from New to Fix Under Review
  • Pull request ID set to 53736

MG Updated by Mykola Golub almost 3 years ago Actions #7

  • Status changed from Fix Under Review to New
  • Pull request ID deleted (53736)

KS Updated by Konstantin Shalygin over 2 years ago Actions #8

  • Backport deleted (pacific)

AA Updated by Alex Ainscow about 2 months ago Actions #9

  • Status changed from New to Fix Under Review
  • Assignee set to Alex Ainscow
  • Pull request ID set to 72503

The assert fires when CRUSH maps a PG to an OSD with CRUSH weight 0. straw2 returns the first item of a bucket whose items all have weight 0, and the leaf is only checked against the OSD reweight (in/out). With a rule that takes several subtrees (for example `take site1 ... emit; take site2 ... emit`), crush-reweighting every OSD of one site to 0 while it is still in puts the first OSD of that site into every up set. `get_osds_weight()` drops OSDs with zero adjusted weight, so `calc_deviations()` finds that OSD in `pgs_by_osd` but not in `osd_weight`. The rest of the rule keeps the total weight positive, so the `osd_weight_total == 0` early return does not help. With one OSD per take the PGs stay full size and active+clean, so the active mgr aborts on every balancer run. Seen intermittently in qa/standalone/mon-stretch/mon-stretch-uneven-crush-weights.sh, which sets both OSDs of one zone to CRUSH weight 0.

Fix with a unit test that reproduces it: https://github.com/ceph/ceph/pull/72503

AA Updated by Alex Ainscow about 2 months ago Actions #10

To be precise about the conditions: zero CRUSH weight alone does not trigger this. It also needs a manually created CRUSH rule whose take reaches only zero-weight OSDs, for example a rule with one take per site (as used for stretch clusters) while one whole site is crush-reweighted to 0 but still in. A device-class rule whose class has only zero-weight OSDs should behave the same (from reading straw2, not tested). With the default rules (take default, then chooseleaf over hosts) straw2 never picks a zero-weight item while any sibling has weight, so adding OSDs at weight 0 or draining single OSDs or hosts is safe.

KS Updated by Konstantin Shalygin about 2 months ago Actions #11

  • Target version set to v22.0.0
  • Source set to Q/A

LF Updated by Laura Flores 23 days ago Actions #12

  • Has duplicate Bug #77785: qa/standalone/mon-stretch/mon-stretch-uneven-crush-weights.sh: ceph-mgr crashes with ceph_assert(osd_weight.count(oid)) added

LF Updated by Laura Flores 23 days ago Actions #13

Actions

Also available in: PDF Atom