Bug 5291 - rebuild.py leaks memory
Summary: rebuild.py leaks memory
Status: CLOSED WORKSFORME
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Build system (show other bugs)
Version: 4.2.0
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.13.0
Assignee: Pierre Ossman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-13 13:04 CEST by Peter Åstrand
Modified: 2020-10-13 12:43 CEST (History)
1 user (show)

See Also:
Acceptance Criteria:


Attachments

Description Peter Åstrand cendio 2014-10-13 13:04:14 CEST
During testing of bug 5280, I got:

...
Signing cendio-build-pcsc-lite-i386 (1.5.5-1)
Building SRPM for cendio-build-squashfs-tools-i386 (4.2-1)
Building cendio-build-squashfs-tools-i386 (4.2-1)
Cleaning up installed packages
Removing cendio-build-recordproto-i386 (1.14.2-2)
Fatal error: [Errno 12] Cannot allocate memory

It turns out that rebuild.py leaks memory: It only takes minutes before it's using 1 GiB, and then the consumption increases for every package it builds.
Comment 1 Peter Åstrand cendio 2014-10-14 16:14:58 CEST
As per http://stackoverflow.com/questions/4178116/python-memory-usage-statistics-per-object-types-or-source-code-line, I tried using guppy, but no success. I get:

Partition of a set of 33905 objects. Total size = 5449464 bytes.
 Index  Count   %     Size   % Cumulative  % Kind (class / dict of class)
     0   1506   4  1788720  33   1788720  33 dict (no owner)
     1  16587  49  1253344  23   3042064  56 str
     2   6194  18   506960   9   3549024  65 tuple
     3     84   0   359904   7   3908928  72 dict of module
     4    213   1   230136   4   4139064  76 dict of type

...even though the actual process is one GiB. My guess is that this is a memory leak in rpmlib.
Comment 2 Pierre Ossman cendio 2020-10-13 12:43:47 CEST
This has not been a problem in practice, not even when rebuilding the entire environment. So either the bug is gone, or it is too small to matter.

Note You need to log in before you can comment on or make changes to this bug.