Project

General

Profile

Bug #14364

librados, objecter: op_submit() returns after request completion, AioCompletion related race

Added by Yehuda Sadeh about 3 years ago. Updated almost 3 years ago.

Status:
Resolved
Priority:
Urgent
Assignee:
Category:
-
Target version:
-
Start date:
01/14/2016
Due date:
% Done:

0%

Source:
other
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

Description

The following line is problematic:

  c->tid = objecter->op_submit(objecter_op);

because the assignment might happen after the completion has been dropped. This can happen if we release the completion at the ack callback, and everything finishes before op_submit() returns. The fix should be by having op_submit() itself setting c->tid under a lock (or dropping c->tid altogether if not needed).

Associated revisions

Revision b7eb86fe (diff)
Added by Sage Weil almost 3 years ago

osdc/Objecter: fix narrow race with tid assignment

The operation completion could finish and be freed before we
do the info->register_tid assignment. Avoid this by doing the
assignment in _op_submit itself.

Fixes: #14364
Signed-off-by: Sage Weil <>

History

#1 Updated by Samuel Just about 3 years ago

  • Priority changed from Normal to Urgent

#2 Updated by Sage Weil about 3 years ago

  • Status changed from New to Need Review

#3 Updated by Kefu Chai almost 3 years ago

  • Assignee set to Sage Weil

#4 Updated by Sage Weil almost 3 years ago

  • Status changed from Need Review to In Progress

#5 Updated by Sage Weil almost 3 years ago

  • Status changed from In Progress to Resolved

#6 Updated by Haomai Wang almost 3 years ago

do we need to backport this fix to hammer?

Also available in: Atom PDF