Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 179549 - portage-2.1.2.7 - emerge --sync fails with MemoryError
Summary: portage-2.1.2.7 - emerge --sync fails with MemoryError
Status: RESOLVED INVALID
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
: 191319 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-05-23 17:15 UTC by a_tevelev
Modified: 2007-09-05 02:16 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge.info,2.86 KB, text/plain)
2007-05-23 17:15 UTC, a_tevelev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description a_tevelev 2007-05-23 17:15:04 UTC
emerge --sync fails with MemoryError (please see below).

The same command successfully ran on this machine for almost a year until today.

The machine has 2 GB of RAM and no memory or CPU-intensive processes run concurrently with the emerge.

Ran eclean-dist, eclean-pkg and revdep-rebuild (just in case). Then re-ran 'emerge --sync' - with the same results.

Tried to run 'emerge --sync' total 3 times today (after having removed /usr/portage/metadata/timestamp.chk). It consistently gets stuck at the same place:


Number of files: 124897
Number of files transferred: 27
Total file size: 162756298 bytes
Total transferred file size: 65862 bytes
Literal data: 65862 bytes
Matched data: 0 bytes
File list size: 3026247
File list generation time: 2.051 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 2835
Total bytes received: 3053233

sent 2835 bytes  received 3053233 bytes  142142.70 bytes/sec
total size is 162756298  speedup is 53.26

>>> Updating Portage cache:   73%Traceback (most recent call last):
  File "/usr/bin/emerge", line 5530, in ?
    retval = emerge_main()
  File "/usr/bin/emerge", line 5487, in emerge_main
    action_sync(settings, trees, mtimedb, myopts, myaction)
  File "/usr/bin/emerge", line 4205, in action_sync
    action_metadata(settings, portdb, myopts)
  File "/usr/bin/emerge", line 4300, in action_metadata
    eclass_cache=ec, verbose_instance=noise_maker)
  File "/usr/lib64/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
Comment 1 a_tevelev 2007-05-23 17:15:43 UTC
Created attachment 120107 [details]
emerge --info
Comment 2 Zac Medico gentoo-dev 2007-05-23 19:58:05 UTC
There must be something specific about your system that's causing it, possibly kernel related.  Do you see anything abnormal in the output of dmesg?

The error message indicates that it successfully synced, but the MemoryError occurred before the --metadata run completed.  If you run `emerge --metadata` then it will complete what it was trying to do (if it doesn't hit another MemoryError).
Comment 3 a_tevelev 2007-05-25 04:08:05 UTC
Yes, it was my fault - sorry.

Some of the files in the filesystem got corrupted (presumably in '/var/cache/edb/dep/usr/portage/' directory). Solution is described in http://forums.gentoo.org/viewtopic-t-561308-highlight-.html

It would be nice of course if '-v' switch in 'emerge --metadata' actually did anything, maybe even outputting the name of the ebuild being processed? But I suppose it is not a part of this but but should be a separate feature request.
Comment 4 Zac Medico gentoo-dev 2007-05-25 04:44:53 UTC
The length of the file must have been quite large in order to trigger the MemoryError.  That type of corruption must be quite rare considering that I've never seen this error reported before.  If that ever happens again, I recommend the following:

rm -rf /var/cache/edb/dep && emerge --metadata
Comment 5 Zac Medico gentoo-dev 2007-09-05 02:16:03 UTC
*** Bug 191319 has been marked as a duplicate of this bug. ***