Skip to content

librbd: use task finisher thread for image open/close callbacks#36287

Merged
trociny merged 1 commit intoceph:masterfrom
dillaman:wip-librbd-close
Jul 28, 2020
Merged

librbd: use task finisher thread for image open/close callbacks#36287
trociny merged 1 commit intoceph:masterfrom
dillaman:wip-librbd-close

Conversation

@dillaman
Copy link

There was a potential race condition with utilizing the AsioEngine
to deliver asynchronous image open and close callbacks. This left
the potential for the io_context thread to attempt to destroy itself.

This commit changes the behavior of the image open and close callbacks
to always delete the ImageCtx (now matches the synchronous API behavior)
and it always invokes the callback in Finisher thread whose lifetime is
tied to the CephContext.

Signed-off-by: Jason Dillaman dillaman@redhat.com

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

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 backend
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

@dillaman
Copy link
Author

@ceph/api dashboard test failure

Copy link
Contributor

@trociny trociny left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM

There was a potential race condition with utilizing the AsioEngine
to deliver asynchronous image open and close callbacks. This left
the potential for the io_context thread to attempt to destroy itself.

This commit changes the behavior of the image open and close callbacks
to always delete the ImageCtx (now matches the synchronous API behavior)
and it always invokes the callback in Finisher thread whose lifetime is
tied to the CephContext.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
@dillaman
Copy link
Author

Updated

@dillaman
Copy link
Author

jenkins test dashboard backend

@trociny trociny merged commit 4ba83be into ceph:master Jul 28, 2020
@dillaman dillaman deleted the wip-librbd-close branch July 29, 2020 01:02
@sebastian-philipp
Copy link
Contributor

this might fix https://tracker.ceph.com/issues/43274 ?

@dillaman
Copy link
Author

this might fix https://tracker.ceph.com/issues/43274 ?

Negative -- but I haven't seen evidence of that bug appearing in a while.

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