Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 191319

Summary: MemoryError when updating portage cache
Product: Portage Development Reporter: Eric Holk <eric.holk>
Component: CoreAssignee: Portage team <dev-portage>
Status: VERIFIED DUPLICATE    
Severity: critical    
Priority: High    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Eric Holk 2007-09-05 02:11:21 UTC
I've been hitting this every time I do 'emerge --sync' lately.  Emerge copies all the files, then goes into the updating portage cache section.  When it gets to 53%, my computer nearly instantly uses all of its memory and starts doing tons of paging.  A few minutes later, emerge crashes.  Below are the relevant lines from the output.




sent 100579 bytes  received 8692819 bytes  81045.14 bytes/sec
total size is 167707932  speedup is 19.07

>>> Updating Portage cache:   53%Traceback (most recent call last):
  File "/usr/bin/emerge", line 5676, in ?
    retval = emerge_main()
  File "/usr/bin/emerge", line 5631, in emerge_main
    action_sync(settings, trees, mtimedb, myopts, myaction)
  File "/usr/bin/emerge", line 4336, in action_sync
    action_metadata(settings, portdb, myopts)
  File "/usr/bin/emerge", line 4430, in action_metadata
    eclass_cache=ec, verbose_instance=noise_maker)
  File "/usr/lib/portage/pym/cache/util.py", line 41, in mirror_cache
    trg = trg_cache[x]
  File "/usr/lib64/portage/pym/cache/flat_hash.py", line 28, in __getitem__
    d = self._parse_data(myf, cpv)
  File "/usr/lib64/portage/pym/cache/flat_hash.py", line 43, in _parse_data
    d = dict(map(lambda x:x.rstrip("\n").split("=", 1), data))
MemoryError



Reproducible: Always

Steps to Reproduce:
1. emerge --sync

Actual Results:  
emerge crashes, giving the traceback in the Description field.

Expected Results:  
emerge successfully updates the portage cache.
Comment 1 Zac Medico gentoo-dev 2007-09-05 02:16:03 UTC
Looks like filesystem corruption. Here is a workaround:

rm -rf /var/cache/edb/dep && emerge --metadata

*** This bug has been marked as a duplicate of bug 179549 ***
Comment 2 Eric Holk 2007-09-05 05:37:24 UTC
Thanks, that fixed the problem.  Sorry I wasn't able to find it with a simple Google search.