Skip to content

mgr: avoid explicit dropping of ref - #62445

Merged
SrinivasaBharath merged 1 commit into
ceph:mainfrom
mchangir:mgr-bump-up-ref-count-for-MgrOpRequest
Jun 21, 2025
Merged

SrinivasaBharath merged 1 commit into
ceph:mainfrom
mchangir:mgr-bump-up-ref-count-for-MgrOpRequest

Conversation

@mchangir

@mchangir mchangir commented Mar 22, 2025 •

Copy link
Copy Markdown
Contributor

Fix use-after-free issue with MgrOpRequest.

Fixes: https://tracker.ceph.com/issues/70618
Signed-off-by: Milind Changire [email protected]

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

@mchangir
mchangir requested a review from a team as a code owner March 22, 2025 04:20
@mchangir
mchangir force-pushed the mgr-bump-up-ref-count-for-MgrOpRequest branch from f825f3d to 38efb82 Compare March 22, 2025 04:22
Comment thread src/mgr/MgrOpRequest.cc Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This doens't look right. MgrOpRequest::request is a smart pointer?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yeah ... I realized that too.
this change does quench the use-after-free error thrown by the AddressSanitizer though
I'll get a better explanation for this change a while later.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@batrick The dtor had an explicit dropping of ref of the request object.
I've done away with that statement and things look fine in QA runs.
We need more widespread testing for this though.

@mchangir
mchangir force-pushed the mgr-bump-up-ref-count-for-MgrOpRequest branch from 38efb82 to baba1cf Compare April 2, 2025 05:06
@github-actions github-actions Bot added the common label Apr 2, 2025
@mchangir
mchangir marked this pull request as draft April 2, 2025 08:19
@mchangir
mchangir force-pushed the mgr-bump-up-ref-count-for-MgrOpRequest branch from baba1cf to 0417180 Compare April 5, 2025 02:09
@mchangir mchangir changed the title mgr: add ref to request object mgr: avoid explicit dropping of ref Apr 5, 2025
@mchangir
mchangir marked this pull request as ready for review April 5, 2025 02:14
@github-actions github-actions Bot added the stale label Jun 6, 2025
@mchangir mchangir removed the stale label Jun 6, 2025
@mchangir

mchangir commented Jun 6, 2025

Copy link
Copy Markdown
Contributor Author

jenkins test api

@mchangir

mchangir commented Jun 6, 2025

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@ceph ceph deleted a comment from github-actions Bot Jun 6, 2025

@batrick batrick left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please note this Fixes: 66efcaae7a05abaefb12758239b0e1ad5cbd85c9.

Add tracker to commit message too.

Good job tracking this down.

@mchangir
mchangir force-pushed the mgr-bump-up-ref-count-for-MgrOpRequest branch from 0417180 to 941c5ed Compare June 6, 2025 17:09
@mchangir

mchangir commented Jun 6, 2025

Copy link
Copy Markdown
Contributor Author

Please note this Fixes: 66efcaae7a05abaefb12758239b0e1ad5cbd85c9.

Add tracker to commit message too.

Good job tracking this down.

Fixed these issues.
Thanks.

@mchangir

mchangir commented Jun 9, 2025

Copy link
Copy Markdown
Contributor Author

jenkins test make check arm64

@sseshasa

Copy link
Copy Markdown
Contributor

@sseshasa

Copy link
Copy Markdown
Contributor

jenkins test make check arm64

1 similar comment
@SrinivasaBharath

Copy link
Copy Markdown
Contributor

jenkins test make check arm64

@SrinivasaBharath

Copy link
Copy Markdown
Contributor

jenkins test make check

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.

4 participants