out of memory when calling ObjManager.collapse_instance_dicts

Bug #581918 reported by Gary Poster
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Meliae
Fix Released
Medium
Gary Poster

Bug Description

When trying to debug bug 531071, the two good meliae dumps I got caused out of memory errors in meliae. At least one of them happened within ObjManager.collapse_instance_dicts. Looking at the code, I guessed that the attached patch might help. It did.

Related branches

Revision history for this message
Gary Poster (gary) wrote :
Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 581918] Re: out of memory when calling ObjManager.collapse_instance_dicts

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Gary Poster wrote:
> ** Patch added: "meliae_oom.diff"
> http://launchpadlibrarian.net/48622280/meliae_oom.diff
>

I think you missed the part later on where we call:

            del self.objs[dict_obj.address]

Which means that we are mutating the self.objs dict. And you aren't
allow to mutate a dict while you iterate it.

It might be possible to build up a list of things to remove, and then
remove them at the end. But the current patch won't work.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkvxvywACgkQJdeBCYSNAAPOxACgk+d0Lqgwi0pt9XBmbtzNrV2w
hEgAnj5a7RP5iY5IhQ+M5Lzx9Z/cnix6
=btk/
-----END PGP SIGNATURE-----

Revision history for this message
Gary Poster (gary) wrote :

Mm, I saw the code, but didn't make the connection. OK, I'll retry the patch in a bit.

Thanks

Revision history for this message
Gary Poster (gary) wrote :

This seems like an obvious approach. It seems unlikely that a set is necessary in context, but...eh. It's defensive coding of some sort, I suppose.

Revision history for this message
John A Meinel (jameinel) wrote :

I landed your patch in trunk@142

Changed in meliae:
assignee: nobody → Gary Poster (gary)
status: New → Fix Released
John A Meinel (jameinel)
Changed in meliae:
importance: Undecided → High
importance: High → Medium
milestone: none → 0.2.1rc1
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.