Skip to content

test/objectstore/TestRocksdbOptionParse.cc: Fix race hazard#58194

Merged
tchaikov merged 1 commit intoceph:mainfrom
bill-scales:fix_unittest_rocksdb_option
Jun 10, 2025
Merged

test/objectstore/TestRocksdbOptionParse.cc: Fix race hazard#58194
tchaikov merged 1 commit intoceph:mainfrom
bill-scales:fix_unittest_rocksdb_option

Conversation

@bill-scales
Copy link
Contributor

Race hazard - rocksdb does not register its threads until they start running, and only guarantees the threads have been created before returning. We need to be prepared to wait for the scheduler to run the threads to avoid false positives from this test case.

Fixes: https://tracker.ceph.com/issues/66575
Signed-off-by: Bill Scales bill_scales@uk.ibm.com

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

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
  • jenkins test rook e2e

Race hazard - rocksdb does not register its threads until they start
running, and only guarantees the threads have been created before
returning. We need to be prepared to wait for the scheduler to
run the threads to avoid false positives.

Fixes: https://tracker.ceph.com/issues/66575
Signed-off-by: Bill Scales <bill_scales@uk.ibm.com>
@github-actions github-actions bot added the tests label Jun 21, 2024
@bill-scales
Copy link
Contributor Author

jenkins retest this please

@bill-scales bill-scales requested a review from aclamk July 30, 2024 12:47
@bill-scales
Copy link
Contributor Author

@aclamk Can I ask you to review this simple fix to race hazard in a test case that generates occasional false positives - not sure who to assign it to, but as its a RocksDB test case I guess its most related to BlueStore.

@ifed01
Copy link
Contributor

ifed01 commented Aug 7, 2024

jenkıns test make check

@github-actions
Copy link

github-actions bot commented Oct 6, 2024

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@github-actions github-actions bot added the stale label Oct 6, 2024
@github-actions
Copy link

github-actions bot commented Nov 5, 2024

This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution!

@github-actions github-actions bot closed this Nov 5, 2024
@bill-scales bill-scales reopened this May 20, 2025
@github-actions github-actions bot removed the stale label May 20, 2025
@bill-scales
Copy link
Contributor Author

jenkins test api

Copy link
Contributor

@tchaikov tchaikov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. it turns out that RockSDB's own test also wait until all threads have been registered: https://github.com/facebook/rocksdb/blob/de376be2ba3c9f20de5eecfdaae2bb028893a17a/db/db_test.cc#L4973-L4994

@tchaikov tchaikov merged commit 58e9d14 into ceph:main Jun 10, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants