Skip to content

test: futex fail if more notification sent after destroy - #51729

Merged
yuriw merged 1 commit into
ceph:mainfrom
NitzanMordhai:wip-nitzan-striper-api-aio-futex-wait
Jun 5, 2023
Merged

yuriw merged 1 commit into
ceph:mainfrom
NitzanMordhai:wip-nitzan-striper-api-aio-futex-wait

Conversation

@NitzanMordhai

@NitzanMordhai NitzanMordhai commented May 24, 2023 •

Copy link
Copy Markdown
Contributor

When testing with more then 1 completion, we may hit an issue with semaphors been notify after destroy.
we should add wait for each completion and not destroy the sem. before all notified.

Fixes: https://tracker.ceph.com/issues/57310
Signed-off-by: Nitzan Mordechai [email protected]

Contribution Guidelines

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows

@github-actions github-actions Bot added the tests label May 24, 2023
@ljflores

Copy link
Copy Markdown
Member

jenkins test make check

When testing with more then 1 completion, we may hit an issue
with semaphors been notify after destroy.
we should add wait for each completion and not destroy the sem.
before all notified.

Fixes: https://tracker.ceph.com/issues/57310
Signed-off-by: Nitzan Mordechai <[email protected]>
@NitzanMordhai
NitzanMordhai force-pushed the wip-nitzan-striper-api-aio-futex-wait branch from 1b237a0 to 06411ce Compare May 28, 2023 04:50
@ljflores

ljflores commented Jun 2, 2023

Copy link
Copy Markdown
Member

@yuriw
yuriw merged commit d146d2b into ceph:main Jun 5, 2023
LeonGao91 added a commit to LeonGao91/ceph that referenced this pull request May 28, 2026
verify_upmap() walks each step of a CRUSH rule and, for each
choose_firstn/choose_indep step at a non-leaf type, asserts that
the number of distinct parents of that type in the candidate up
set does not exceed the step's numrep. This is correct for a
single-level rule, but it ignores the fact that an inner choose
step's numrep is per outer-bucket-result.

For an EC 6+4 pool with the rule

  take <root>
  choose_indep 5 type pod
  choose_indep 2 type rack
  chooseleaf_indep 1 type osd
  emit

a valid up set legitimately contains 10 distinct racks (2 per
pod * 5 pods). The current check evaluates 10 > 2 and returns
-EINVAL, so any pg-upmap-items the operator sets is silently
removed by check_pg_upmaps in the next osdmap epoch.

Track a running product of numrep across prior choose/chooseleaf
steps in the current TAKE..EMIT scope. Compare each inner choose
step's parents_of_type count against numrep * outer_numrep_product
instead of numrep alone. Reset the product on TAKE and EMIT so
multi-rule scripts behave correctly.

Single-level rules behave identically: outer_numrep_product is 1
for the first choose step after TAKE.

Builds on prior unmerged patches in tracker ceph#51729 (Laura Flores's
wip-tracker-51729 branch, comment ceph#22, and Andras Pataki's revision
in comment ceph#24). This revision keeps the running product separate
from type_stack to preserve per-level numrep semantics, resets it
across multiple TAKE..EMIT scopes, and is paired with unit-test
coverage in a follow-up commit.

Fixes: https://tracker.ceph.com/issues/51729
Suggested-by: Laura Flores <[email protected]>
Suggested-by: Andras Pataki <[email protected]>
Signed-off-by: Leon Gao <[email protected]>
LeonGao91 added a commit to LeonGao91/ceph that referenced this pull request May 28, 2026
Add two unit tests to cover the verify_upmap fix:

* verify_upmap_nested_choose -- builds a multi-level CRUSH rule
  (choose pod, choose rack, chooseleaf osd) shaped like the
  multi-level EC rules reported in tracker ceph#51729 (e.g. the
  rack/chassis/host rule in note ceph#9, the pod/rack/osd rule in
  note ceph#24). Asserts natural CRUSH outputs and same-rack upmap
  targets validate, while genuinely invalid up sets (spanning
  more pods than numrep allows) are still rejected.

* verify_upmap_single_level -- regression guard for plain
  single-level chooseleaf rules; ensures the new
  outer_numrep_product accounting does not change behavior
  for the common single-step case.

The first test fails on the unfixed verify_upmap because the
inner choose-rack step counts 4 distinct racks against
numrep=2 and returns -EINVAL.

Related: https://tracker.ceph.com/issues/51729
Signed-off-by: Leon Gao <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants