Project

General

Profile

Actions

Bug #4803

closed

krbd: memory leaks while testing layered images

Added by Alex Elder about 11 years ago. Updated almost 11 years ago.

Status:
Resolved
Priority:
High
Assignee:
Target version:
% Done:

0%

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

Description

I have a series of small tests I run to test rbd functionality.
I occasionally run them in a loop in my UML environment (which
is somewhat constrained for memory) to make sure memory doesn't
get exhausted.

I just tried it and find that there must be a leak somewhere.
I hope to catch this as part of a careful review of the code
that I'm undertaking.


Related issues 1 (0 open1 closed)

Related to rbd - Bug #4802: krbd: walk through error paths and fix themResolvedAlex Elder04/24/2013

Actions
Actions #1

Updated by Sage Weil about 11 years ago

  • Priority changed from Normal to High
Actions #2

Updated by Alex Elder almost 11 years ago

I've been reviewing the rbd code with an eye toward finding
leaks. I have two small ones that I'll fix, but I have more
to do. I'm just going to keep a running log of them as I
find them here.
rbd: fix leak of snapshots during initial probe
rbd: fix leak of format 2 snapshot names

Actions #3

Updated by Alex Elder almost 11 years ago

  • Status changed from In Progress to Fix Under Review

OK, I have some patches ready for review but I think this will
be an ongoing process so I'll probably be bouncing this back
and forth between "in progress" and "need review".

Or I could create a new issue for each set of patches I post.
Whatever is preferred. I'm updating these things so much for
me as to keep others in the loop.

The following have been posted for review. Two of them
fix memory leaks, the others are simple improvements and
very minor (possible) bug fixes.

[PATCH 1/6] rbd: fix leak of snapshots during initial probe
[PATCH 2/6] rbd: make snap_size order parameter optional
[PATCH 3/6] rbd: only update values on snap_info success
[PATCH 4/6] rbd: rename __rbd_add_snap_dev()
[PATCH 5/6] rbd: fix leak of format 2 snapshot names
[PATCH 6/6] rbd: use rbd_obj_method_sync() return value

It is available (along with some others) in the branch
"review/wip-rbd-cleanup" of the ceph-client git repository.

Actions #4

Updated by Alex Elder almost 11 years ago

The following additional set of patches has been posted for
review. They're available in the "review/wip-rbd-cleanup-1"
branch of the ceph-client git repository. That branch is
based on the branch "review/wip-rbd-cleanup".

Cleanup related to spec ids. This one fixes a small leak
of the version 2 image id.

-Alex

[PATCH 1/4] rbd: have rbd_dev_image_id() set format 1 image id
[PATCH 2/4] rbd: fix image id leak in initial probe
[PATCH 3/4] rbd: have snap_by_name() return a snapshot
[PATCH 4/4] rbd: set snapshot id in rbd_dev_probe_update_spec()

Actions #5

Updated by Alex Elder almost 11 years ago

  • Status changed from Fix Under Review to In Progress

The following have been committed to the ceph-client
"testing" branch. I am not closing this issue though,
there is more work to do (and the original leak has
not yet been eliminated).

eb6b6af rbd: fix leak of snapshots during initial probe
dbb2e82 rbd: make snap_size order parameter optional
b28f437 rbd: only update values on snap_info success
4dbee87 rbd: rename __rbd_add_snap_dev()
1a24f4a rbd: fix leak of format 2 snapshot names
3757d72 rbd: use rbd_obj_method_sync() return value
b1557a5 rbd: avoid dropping extra reference in rbd_free_disk()
94cbb08 rbd: have rbd_dev_image_id() set format 1 image id
f9f5c6f rbd: fix image id leak in initial probe
3e26517 rbd: have snap_by_name() return a snapshot

Actions #6

Updated by Alex Elder almost 11 years ago

I believe I have found the leak. I have done UML testing
and am about to initiate teuthology testing. I'll post
the fix for review before I go to bed, but I will run
some tests overnight. They won't stress the particular
layering functionality but they will verify nothing is
broken in preparation for a pull request.

Actions #7

Updated by Alex Elder almost 11 years ago

  • Status changed from In Progress to Fix Under Review

The following has been posted for review:

[PATCH] rbd: fix image request leak on parent read

It is available on in the branch "review/wip-slabs-1"
on the ceph-client git repository. (That is based
on branch "testing-rebase-3.9".)

Actions #8

Updated by Alex Elder almost 11 years ago

  • Status changed from Fix Under Review to Resolved

The following has been committed to the ceph-client
"testing" branch:

b5b09be rbd: fix image request leak on parent read

Actions

Also available in: Atom PDF