Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1185869

Summary: Errata unit copy with recursive copy and dep solve causes worker to balloon memory usage and never free
Product: Red Hat Satellite Reporter: Justin Sherrill <jsherril>
Component: Content ManagementAssignee: Jason Montleon <jmontleo>
Status: CLOSED CURRENTRELEASE QA Contact: sthirugn <sthirugn>
Severity: high Docs Contact:
Priority: unspecified    
Version: NightlyCC: bbuckingham, bkearney, jsherril, mhrivnak, pulp-bugs, pulp-qe-list, sthirugn, walden
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1185868 Environment:
Last Closed: 2015-08-12 14:01:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1185868    
Bug Blocks:    

Description Justin Sherrill 2015-01-26 13:55:32 UTC
+++ This bug was initially created as a clone of Bug #1185868 +++

Description of problem:

When doing a unit copy of a single errata with a large source repo if recursive and resolve_dependencies are set to true the pulp worker doing the copy will balloon to a very large memory size and never free that memory even when the unit copy is completed.

post "https://localhost/pulp/api/v2/repositories/new_repo/actions/associate/"

{"source_repo_id":"bigrepo","criteria":{"type_ids":["erratum"],"filters":{"association":{"unit_id":{"$in":["26b996e9-ab64-4f09-ba94-7b846c71573b"]}}}},"override_config":{"recursive":true,"resolve_dependencies":true}}


The source repo in this case was rhel 6 x86_64, containing ~14400 packages and ~2800 errata.


USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
apache   28498  0.0 25.3 1843224 1483900 ?     S    Jan23   0:28 /usr/bin/python -m celery.__main__ worker -c 1 -n reserved_resource_worker-2.redhat.com --events --app=


Version-Release number of selected component (if applicable):
2.5.1

How reproducible:
always

Steps to Reproduce:
1. Perform a recursive errata unit copy with dep resolution turned on 
2. Watch memory usage for processes "watch 'ps aux | sort -nk +4 | tail'"  will show the top processes by memory usage.


Actual results:
pulp worker will quickly creep up in memory usage and never go back down.

Expected results:
Memory usage goes back down after unit copy

Additional info:

Comment 3 Michael Hrivnak 2015-02-20 20:51:35 UTC
We have the in the pipeline for our 2.6.1 release, which should follow our 2.6.0 release fairly quickly. In the mean time, if you need the fix in sat 6.1 sooner, I suggest cherry-picking. PRs are linked in the upstream bug as usual.

Comment 6 sthirugn@redhat.com 2015-05-04 15:09:41 UTC
Justin: Can you please add some verification steps for QE?

Comment 7 Justin Sherrill 2015-05-04 15:48:06 UTC
1.  run:

ps aux | grep worker | awk '{print $6}'

this will print all the of memory output the pulp workers are using:


40016
48940
48816
92716
65312
174476
50820
50864
95932
50808


2.  Now perform an incremental update of an errata via the Errata web UI. 
3.  Once that incremental update is done, check the memory usage again:

ps aux | grep worker | awk '{print $6}'

All number should at most 300,000, if you see any line much much over that such as:

1,483,900

then there is still a problem

Comment 8 sthirugn@redhat.com 2015-05-05 19:44:56 UTC
Verified.

Version Tested: 
Satellite-6.1.0-RHEL-7-20150429.2

Before Incremental update:
# ps aux | grep worker | awk '{print $6}'
732
840
62148
56696
52756
62460
123860
52716
301036
52660
44736
216292


After Incremental update:
# ps aux | grep worker | awk '{print $6}'
732
840
62148
56696
52756
62460
123860
52716
241100
52660
44736
216292

I do not see abnormal usage of memory here ^

Comment 9 Bryan Kearney 2015-08-11 13:36:30 UTC
This bug is slated to be released with Satellite 6.1.

Comment 10 Bryan Kearney 2015-08-12 14:01:54 UTC
This bug was fixed in version 6.1.1 of Satellite which was released on 12 August, 2015.