Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cephfs_mirror: fix crash in update_fs_mirrors() #56148

Merged
merged 1 commit into from May 13, 2024

Conversation

joscollin
Copy link
Member

@joscollin joscollin commented Mar 13, 2024

Fixes: https://tracker.ceph.com/issues/64751

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

@github-actions github-actions bot added the cephfs Ceph File System label Mar 13, 2024
@joscollin joscollin force-pushed the wip-B64751-crash-acquiring-mutex-lock branch from 8666ffb to f471736 Compare March 13, 2024 05:06
@vshankar vshankar requested a review from a team March 14, 2024 01:28
…sing them

Fixes the crash:
```
std::scoped_lock<std::mutex>::scoped_lock (__m=..., this=<optimized out>, this=<optimized out>, __m=...) at /usr/include/c++/11/mutex:655
cephfs::mirror::MirrorWatcher::is_failed (this=0x0) at /usr/src/debug/ceph-19.0.0-1578.g3d482f42.el9.x86_64/src/tools/cephfs_mirror/MirrorWatcher.h:56
cephfs::mirror::FSMirror::is_failed (this=0x557478284340) at /usr/src/debug/ceph-19.0.0-1578.g3d482f42.el9.x86_64/src/tools/cephfs_mirror/FSMirror.h:52
cephfs::mirror::Mirror::update_fs_mirrors (this=0x5574773c3e60) at /usr/src/debug/ceph-19.0.0-1578.g3d482f42.el9.x86_64/src/tools/cephfs_mirror/Mirror.cc:515

```

Fixes: https://tracker.ceph.com/issues/64751
Signed-off-by: Jos Collin <jcollin@redhat.com>
@joscollin joscollin force-pushed the wip-B64751-crash-acquiring-mutex-lock branch from f471736 to 5b8b9c2 Compare March 19, 2024 12:19
@joscollin joscollin requested a review from vshankar March 19, 2024 12:20
@joscollin joscollin changed the title cephfs_mirror: initialize m_timer_lock for scheduled fs mirror updates cephfs_mirror: fix crash in update_fs_mirrors() Mar 19, 2024
@joscollin joscollin force-pushed the wip-B64751-crash-acquiring-mutex-lock branch from 5b8b9c2 to 505a92f Compare March 26, 2024 09:30
@joscollin
Copy link
Member Author

jenkins test api

@joscollin
Copy link
Member Author

jenkins test make check arm64

@joscollin
Copy link
Member Author

jenkins retest this please

@joscollin joscollin force-pushed the wip-B64751-crash-acquiring-mutex-lock branch 3 times, most recently from bf1f12f to c89aa17 Compare March 28, 2024 08:29
src/tools/cephfs_mirror/FSMirror.h Outdated Show resolved Hide resolved
src/tools/cephfs_mirror/Mirror.cc Outdated Show resolved Hide resolved
Copy link

github-actions bot commented Apr 4, 2024

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@vshankar
Copy link
Contributor

vshankar commented Apr 4, 2024

@vshankar
Copy link
Contributor

vshankar commented Apr 4, 2024

@joscollin please rebase

@joscollin joscollin force-pushed the wip-B64751-crash-acquiring-mutex-lock branch from ba488fd to bf1c482 Compare April 4, 2024 13:34
@joscollin
Copy link
Member Author

@joscollin please rebase

@vshankar rebased

@joscollin
Copy link
Member Author

jenkins test make check arm64

@joscollin joscollin requested a review from vshankar April 10, 2024 14:28
@joscollin
Copy link
Member Author

jenkins test make check

vshankar added a commit to vshankar/ceph that referenced this pull request Apr 12, 2024
* refs/pull/56148/head:
	cephfs_mirror: check m_instance_watcher and m_mirror_watcher before using them

Reviewed-by: Venky Shankar <vshankar@redhat.com>
@joscollin
Copy link
Member Author

jenkins retest this please

vshankar added a commit to vshankar/ceph that referenced this pull request Apr 30, 2024
* refs/pull/56148/head:
	cephfs_mirror: check m_instance_watcher and m_mirror_watcher before using them

Reviewed-by: Venky Shankar <vshankar@redhat.com>
vshankar added a commit to vshankar/ceph that referenced this pull request May 6, 2024
* refs/pull/56148/head:
	cephfs_mirror: check m_instance_watcher and m_mirror_watcher before using them

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Copy link
Contributor

@vshankar vshankar left a comment

Choose a reason for hiding this comment

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

@vshankar
Copy link
Contributor

jenkins test api

@vshankar vshankar merged commit 5acc361 into ceph:main May 13, 2024
14 of 15 checks passed
@joscollin joscollin deleted the wip-B64751-crash-acquiring-mutex-lock branch May 13, 2024 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-fix cephfs Ceph File System
Projects
None yet
2 participants