[Bug 1425164] [NEW] Memory leaks in librados.py

Billy Olsen billy.olsen at canonical.com
Tue Feb 24 16:29:43 UTC 2015


Public bug reported:

[Impact]

Using Ceph with Cinder causes memory to grow due to memory leaks in
librados.py which holds on to native C callback function references.
These references cause a circular dependency which prevents the python
garbage collector from freeing the memory used by the Ioctx object. Over
time with repeated volume and snapshot creation/deletion, this can cause
the memory used by the Cinder process to grow continuously without
retraction.

The fix is to not store a reference to the native c callback functions
in the Ioctx object and instead pass the references around so they can
live only as long as necessary to fulfill the request. This avoids the
circular dependency issue.

[Test Case]

1. Deploy OpenStack using Ceph as a block storage for Cinder.
2. Repeatedly create and delete volumes.
3. Observe memory usage by the cinder-volume backend services.

[Regression Potential]

>From a regression standpoint, there exists the possibility of a small
performance regression due to creating multiple C native callback
references and passing those around rather than keeping a single class
level reference to a native C callback function. This may be more
noticeable when using the librados library to actually perform I/O to a
volume rather than using it to manage objects, which is done within the
Cinder library.

[Other Info]
 
This has been filed and fix in upstream bug http://tracker.ceph.com/issues/10723, and merged into the hammer release stream. This should include commits 60b019f69aa0e39d276c669698c92fc890599f50 and 36d37aadbbbece28d70e827511f1a473d851463d.

** Affects: ceph (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: cts

** Tags added: cts

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to ceph in Ubuntu.
https://bugs.launchpad.net/bugs/1425164

Title:
  Memory leaks in librados.py

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ceph/+bug/1425164/+subscriptions



More information about the Ubuntu-server-bugs mailing list