Skip to content

CephContext: acquire _fork_watchers_lock in notify_post_fork()#54433

Merged
vshankar merged 1 commit intoceph:mainfrom
vshankar:cct-lock-fix
May 7, 2024
Merged

CephContext: acquire _fork_watchers_lock in notify_post_fork()#54433
vshankar merged 1 commit intoceph:mainfrom
vshankar:cct-lock-fix

Conversation

@vshankar
Copy link
Contributor

@vshankar vshankar commented Nov 9, 2023

https://tracker.ceph.com/issues/63494

The ceph::spin_unlock() seems incorrect here.

Was debugging a ceph-fuse crash reported downstream which has the following backtrace:

#0  0x00007f66b42a2a4f raise (libc.so.6)
#1  0x00007f66b4275db5 abort (libc.so.6)
#2  0x00007f66b4275c89 __assert_fail_base.cold.0 (libc.so.6)
#3  0x00007f66b429b3a6 __assert_fail (libc.so.6)
#4  0x00007f66b583ccb1 __pthread_mutex_lock (libpthread.so.0)
#5  0x0000563393237387 _Z15global_pre_initPKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEERSt6vectorIPKcSaISH_EEj18code_environment_ti (ceph-fuse)
#6  0x0000563393239576 _Z11global_initPKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEERSt6vectorIPKcSaISH_EEj18code_environment_tib (ceph-fuse)
#7  0x000056339314a01e main (ceph-fuse)
#8  0x00007f66b428eca3 __libc_start_main (libc.so.6)
#9  0x000056339315173e _start (ceph-fuse)  

No debug logs were available. Although the backtrace shows global_pre_init() leading into a call that involves pthread mutex (lock), I found this via code reading and might just be related to the issue.

@rzarzynski

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 common label Nov 9, 2023
@rzarzynski
Copy link
Contributor

Ouch, one thing: do we have a tracker for this? Looks worth backporting, so Fixes and would be needed.

@vshankar
Copy link
Contributor Author

vshankar commented Nov 9, 2023

Ouch, one thing: do we have a tracker for this? Looks worth backporting, so Fixes and would be needed.

yeh - left a comment regarding that. On it now.

The ceph::spin_unlock() seems incorrect here.

Fixes: http://tracker.ceph.com/issues/63494
Signed-off-by: Venky Shankar <vshankar@redhat.com>
@vshankar
Copy link
Contributor Author

Tagging @yuriw for qa runs.

@vshankar vshankar requested a review from a team February 8, 2024 05:03
@vshankar
Copy link
Contributor Author

vshankar commented Feb 8, 2024

Tagging @yuriw for qa runs.

@yuriw pinging for qa run.

@batrick
Copy link
Member

batrick commented May 2, 2024

jenkins test make check arm64

@batrick
Copy link
Member

batrick commented May 3, 2024

This PR is under test in https://tracker.ceph.com/issues/65771.

@batrick
Copy link
Member

batrick commented May 3, 2024

jenkins test make check arm64

@yuriw
Copy link
Contributor

yuriw commented May 6, 2024

@batrick @vshankar this PR was part of this https://tracker.ceph.com/issues/65349 and as approved by the core
Leaving it alone for you to merge as I see it's been tested by @batrick

batrick added a commit to batrick/ceph that referenced this pull request May 7, 2024
* refs/pull/54433/head:
	CephContext: acquire _fork_watchers_lock in notify_post_fork()
@vshankar vshankar merged commit d5744c1 into ceph:main May 7, 2024
@batrick
Copy link
Member

batrick commented May 7, 2024

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.

5 participants