Skip to content

cephfs_mirror: fix crash in update_fs_mirrors() - #56148

Merged
vshankar merged 1 commit into
ceph:mainfrom
joscollin:wip-B64751-crash-acquiring-mutex-lock
May 13, 2024
Merged

vshankar merged 1 commit into
ceph:mainfrom
joscollin:wip-B64751-crash-acquiring-mutex-lock

Conversation

@joscollin

@joscollin joscollin commented Mar 13, 2024 •

Copy link
Copy Markdown
Member

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
Comment thread src/tools/cephfs_mirror/Mirror.cc Resolved
…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 <[email protected]>
@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
Copy Markdown
Member Author

jenkins test api

@joscollin

Copy link
Copy Markdown
Member Author

jenkins test make check arm64

@joscollin

Copy link
Copy Markdown
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
Comment thread src/tools/cephfs_mirror/FSMirror.h Resolved
Comment thread src/tools/cephfs_mirror/Mirror.cc Resolved
@joscollin
joscollin force-pushed the wip-B64751-crash-acquiring-mutex-lock branch from c89aa17 to ba488fd Compare March 29, 2024 05:57
@github-actions

github-actions Bot commented Apr 4, 2024

Copy link
Copy Markdown

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

@vshankar

vshankar commented Apr 4, 2024

Copy link
Copy Markdown
Contributor

@vshankar

vshankar commented Apr 4, 2024

Copy link
Copy Markdown
Contributor

@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
Copy Markdown
Member Author

@joscollin please rebase

@vshankar rebased

@joscollin

Copy link
Copy Markdown
Member Author

jenkins test make check arm64

Comment thread src/tools/cephfs_mirror/FSMirror.h Resolved
@joscollin
joscollin force-pushed the wip-B64751-crash-acquiring-mutex-lock branch from bf1c482 to 5b8b9c2 Compare April 10, 2024 14:19
@joscollin
joscollin requested a review from vshankar April 10, 2024 14:28
@joscollin

Copy link
Copy Markdown
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 <[email protected]>
@joscollin

Copy link
Copy Markdown
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 <[email protected]>
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 <[email protected]>

@vshankar vshankar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@vshankar

Copy link
Copy Markdown
Contributor

jenkins test api

@vshankar
vshankar merged commit 5acc361 into ceph:main May 13, 2024
@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

Development

Successfully merging this pull request may close these issues.

2 participants