--stepped option consumes memory in large transactions

Bug #244943 reported by Rehan Khan
2
Affects Status Importance Assigned to Milestone
Smart Package Manager
Fix Released
Medium
Rehan Khan

Bug Description

Using smart upgrade --stepped to upgrade a newly installed fedora 9 machine I get the error 'couldn't fork %post: Cannot allocate memory' which starts happening after installing about 60 packages and it happens in numerous packages although not all.

I broke out of that install and tried again using the --stepped option. The same error started repeating after about 30 packages. Checking in System Monitor showed that physical memory was maxing out but swap memory was not even though usage was high.

I broke out again and completed the remaining packages ( ~380) without the --stepped option. Memory usage was quite stable at around 256Mb physical (total) and 100Mb swap (total) and the same error did not repeat (it's at 220 packages and continuing)

Machine: 512Mb Ram, 512Mb swap. The first run was with selinux enforcing and the second run was with selinux permitted mode. The third run was selinux permitted mode.

There seems to be a bug in the stepped code that is leaking memory.

Rehan Khan (rasker)
Changed in smart:
assignee: nobody → rasker
importance: Undecided → Medium
Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

If you believe this is an issue with Smart, we'll need more information
pointing in that direction.

For instance, what's the actual consumption of memory for the Smart process
with and without stepped mode, for the same package set?

In your description, you're indicating that the set of packages was different,
and didn't mention memory usage for Smart, so it's hard to see what's going
on.

Changed in smart:
status: New → Incomplete
Revision history for this message
Rehan Khan (rasker) wrote :

There wasn't time to fully investigate the issue. I posted the bug as a reminder and assigned it to me. I'll come back to it, time allowing, shortly with further details.

Revision history for this message
Rehan Khan (rasker) wrote :

Looks like this issue might have been resolved at least in part by by :

https://bugzilla.redhat.com/show_bug.cgi?id=472507

I have run a test of install Fedora 10 the upgrade using --stepped option (some hundreds of mb of updates, multiple stepped upgrades) and there was no runaway memory usage. Maximum memory usage by smart was about 160 -180 Mb and memory was always returned at the end of each step.

Unless anyone has any further comment this can probably be safely closed.

Revision history for this message
Rehan Khan (rasker) wrote :

Sry I meant max memory usage was 160 to 180 mb, average was probably between 40 and 60Mb

Changed in smart:
status: Incomplete → Confirmed
Revision history for this message
Rehan Khan (rasker) wrote :
Changed in smart:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.