Project

General

Profile

Actions

Bug #38842

closed

copy_from callback may cause ObjectContextRef leak

Added by Zengran Zhang about 5 years ago. Updated almost 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
OSD
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
nautilus, mimic
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

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 2 (0 open2 closed)

Copied to Ceph - Backport #38972: mimic: copy_from callback may cause ObjectContextRef leakResolvedPrashant DActions
Copied to Ceph - Backport #38973: nautilus: copy_from callback may cause ObjectContextRef leakResolvedPrashant DActions
Actions #1

Updated by Kefu Chai about 5 years ago

  • Status changed from New to Fix Under Review
  • Pull request ID set to 27084
Actions #2

Updated by Sage Weil about 5 years ago

  • Status changed from Fix Under Review to Pending Backport
  • Backport set to nautilus, mimic, luminous
Actions #4

Updated by Nathan Cutler about 5 years ago

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

Updated by Nathan Cutler about 5 years ago

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

Updated by Nathan Cutler almost 5 years ago

  • Backport changed from nautilus, mimic, luminous to nautilus, mimic
Actions #7

Updated by Nathan Cutler almost 5 years 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.

Actions

Also available in: Atom PDF