Project

General

Profile

Bug #38842

copy_from callback may cause ObjectContextRef leak

Added by Zengran Zhang 5 months ago. Updated 4 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
OSD
Target version:
-
Start date:
03/21/2019
Due date:
% Done:

0%

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

Description

thread 1
step 1: C_Copyfrom.finishi() call pg.lock()
step 2: process_copy_chunk erase the cop from copy_ops at the end
step 3: C_Copyfrom.finishi() call pg.lock()
step 4: before deconstruct the C_Copyfrom(and the cop).

thread 2
step 1: pg.on_change.
step 2: cancel_copy_ops is not effective because cop had erased
step 3: object_contexts.clear() will leaks

thread 3
setp 1: on flushed, assert false on object_contexts.empty()

it is really rare but possible..

pr: https://github.com/ceph/ceph/pull/27084


Related issues

Copied to Ceph - Backport #38972: mimic: copy_from callback may cause ObjectContextRef leak Resolved
Copied to Ceph - Backport #38973: nautilus: copy_from callback may cause ObjectContextRef leak Resolved

History

#1 Updated by Kefu Chai 5 months ago

  • Status changed from New to Need Review
  • Pull request ID set to 27084

#2 Updated by Sage Weil 5 months ago

  • Status changed from Need Review to Pending Backport
  • Backport set to nautilus, mimic, luminous

#4 Updated by Nathan Cutler 5 months ago

  • Copied to Backport #38972: mimic: copy_from callback may cause ObjectContextRef leak added

#5 Updated by Nathan Cutler 5 months ago

  • Copied to Backport #38973: nautilus: copy_from callback may cause ObjectContextRef leak added

#6 Updated by Nathan Cutler 4 months ago

  • Backport changed from nautilus, mimic, luminous to nautilus, mimic

#7 Updated by Nathan Cutler 4 months ago

  • Status changed from Pending Backport to Resolved

The code this is changing (struct C_CopyChunk) does not exist in luminous, so I removed the luminous backport.

Also available in: Atom PDF