Project

General

Profile

Actions

Bug #57573

open

intrusive_lru leaking memory when

Added by Ali Maredia over 1 year ago. Updated 5 months ago.

Status:
Pending Backport
Priority:
High
Assignee:
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
backport_processed
Backport:
pacific quincy
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(RADOS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Values allocated during inserts in the lru defined in
src/common/intrusive_lru.h that are
unreferenced are sometimes not freed because evict()
does not delete values unless set.size() > lru_target_size.

For example, this condition is not met if the number
of entries in the intrusive_lru are less than or
equal to lru_target_size at the time of the
intrusive_lru's destruction.

Memory leaks due to the above scenario can be
reproduced if this commit is removed and
unittest_intrusive_lru is run under valgrind.

ex:

valgrind --tool=memcheck --leak-check=yes ./bin/unittest_intrusive_lru


Related issues 2 (1 open1 closed)

Copied to RADOS - Backport #57794: pacific: intrusive_lru leaking memory when ResolvedKonstantin ShalyginActions
Copied to RADOS - Backport #57795: quincy: intrusive_lru leaking memory when In ProgressKonstantin ShalyginActions
Actions #1

Updated by Radoslaw Zarzynski over 1 year ago

  • Status changed from New to In Progress

As I understood:

1. evit() intends to not free too much (which makes sense).
2. The dtor reuses evict() for cleaning (which doesn't make sense).

Actions #2

Updated by Casey Bodley over 1 year ago

  • Status changed from In Progress to Pending Backport
  • Assignee deleted (Radoslaw Zarzynski)
  • Backport set to pacific quincy
Actions #3

Updated by Backport Bot over 1 year ago

  • Copied to Backport #57794: pacific: intrusive_lru leaking memory when added
Actions #4

Updated by Backport Bot over 1 year ago

  • Copied to Backport #57795: quincy: intrusive_lru leaking memory when added
Actions #5

Updated by Backport Bot over 1 year ago

  • Tags set to backport_processed
Actions #6

Updated by Konstantin Shalygin 5 months ago

  • Assignee set to Ali Maredia
Actions

Also available in: Atom PDF