Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Portage cache error
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
peaceful
Apprentice
Apprentice


Joined: 06 Jun 2003
Posts: 287
Location: Utah

PostPosted: Mon Jan 22, 2007 6:35 pm    Post subject: Portage cache error Reply with quote

Here's a new one for me. What do you do when you get this?

Code:
# emerge --metadata

>>> Updating Portage cache:      Traceback (most recent call last):
  File "/usr/bin/emerge", line 4049, in ?
    emerge_main()
  File "/usr/bin/emerge", line 4008, in emerge_main
    action_metadata(settings, portdb, myopts)
  File "/usr/bin/emerge", line 3019, in action_metadata
    eclass_cache=ec, verbose_instance=noise_maker)
  File "/usr/lib/portage/pym/cache/util.py", line 47, in mirror_cache
    if trg and not write_it:
  File "/usr/lib/python2.4/UserDict.py", line 170, in __len__
    return len(self.keys())
  File "/usr/lib/portage/pym/cache/mappings.py", line 54, in keys
    return list(self.__iter__())
  File "/usr/lib/portage/pym/cache/mappings.py", line 48, in __iter__
    for k in self.orig.iterkeys():
  File "/usr/lib/python2.4/UserDict.py", line 103, in iterkeys
    return self.__iter__()
  File "/usr/lib/portage/pym/cache/mappings.py", line 83, in __iter__
    return iter(self.keys())
  File "/usr/lib/portage/pym/cache/mappings.py", line 87, in keys
    self.d.update(self.pull())
  File "/usr/lib/portage/pym/cache/flat_hash.py", line 29, in callit
    return args[0](*args[1:]+args2)
  File "/usr/lib/portage/pym/cache/flat_hash.py", line 47, in _pull
    raise cache_errors.CacheCorruption(cpv, e)
cache.cache_errors.CacheCorruption: app-accessibility/SphinxTrain-0.9.1-r1 is corrupt: dictionary update sequence element #0 has length 1; 2 is required
Back to top
View user's profile Send private message
Dan
Veteran
Veteran


Joined: 25 Oct 2005
Posts: 1301

PostPosted: Mon Jan 22, 2007 6:44 pm    Post subject: Reply with quote

have you tried
Code:
emerge --sync && emerge portage
?
_________________
- Failure is not an option. It's bundled with your software.
Back to top
View user's profile Send private message
peaceful
Apprentice
Apprentice


Joined: 06 Jun 2003
Posts: 287
Location: Utah

PostPosted: Mon Jan 22, 2007 7:04 pm    Post subject: Reply with quote

dcoats wrote:
have you tried
Code:
emerge --sync && emerge portage
?


Well, ya. I synced and updated portage a couple of days ago. Then I hit this problem after syncing today. I could reproduce the problem over -and-over by running emerge --metadata, so that's what I pasted.

So after your suggestion I synced yet again and hit the problem again. So then I reemerged portage, and the problem is still there.

What should I try next?
Back to top
View user's profile Send private message
angeloio
n00b
n00b


Joined: 20 Nov 2006
Posts: 5

PostPosted: Mon Jan 22, 2007 7:17 pm    Post subject: I've got got exactly the same error Reply with quote

I have got exactly the same error: SphinxTrain-0.9.1-r1 is corrypt.
Must be a central problem
Back to top
View user's profile Send private message
peaceful
Apprentice
Apprentice


Joined: 06 Jun 2003
Posts: 287
Location: Utah

PostPosted: Mon Jan 22, 2007 9:06 pm    Post subject: Re: I've got got exactly the same error Reply with quote

angeloio wrote:
I have got exactly the same error: SphinxTrain-0.9.1-r1 is corrypt.
Must be a central problem


I think that's actually good news. If it happens to everybody, it'll get fixed quicker. :)
Back to top
View user's profile Send private message
Satan Klaus
n00b
n00b


Joined: 11 May 2005
Posts: 19

PostPosted: Mon Jan 22, 2007 9:28 pm    Post subject: Reply with quote

I've got this:

Code:


>>> Updating Portage cache:   57%Traceback (most recent call last):
  File "/usr/bin/emerge", line 4049, in ?
    emerge_main()
  File "/usr/bin/emerge", line 4006, in emerge_main
    action_sync(settings, trees, mtimedb, myopts, myaction)
  File "/usr/bin/emerge", line 2924, in action_sync
    action_metadata(settings, portdb, myopts)
  File "/usr/bin/emerge", line 3019, in action_metadata
    eclass_cache=ec, verbose_instance=noise_maker)
  File "/usr/lib/portage/pym/cache/util.py", line 47, in mirror_cache
    if trg and not write_it:
  File "/usr/lib64/python2.4/UserDict.py", line 170, in __len__
    return len(self.keys())
  File "/usr/lib/portage/pym/cache/mappings.py", line 54, in keys
    return list(self.__iter__())
  File "/usr/lib/portage/pym/cache/mappings.py", line 48, in __iter__
    for k in self.orig.iterkeys():
  File "/usr/lib64/python2.4/UserDict.py", line 103, in iterkeys
    return self.__iter__()
  File "/usr/lib/portage/pym/cache/mappings.py", line 83, in __iter__
    return iter(self.keys())
  File "/usr/lib/portage/pym/cache/mappings.py", line 87, in keys
    self.d.update(self.pull())
  File "/usr/lib/portage/pym/cache/flat_hash.py", line 29, in callit
    return args[0](*args[1:]+args2)
  File "/usr/lib/portage/pym/cache/flat_hash.py", line 47, in _pull
    raise cache_errors.CacheCorruption(cpv, e)
cache.cache_errors.CacheCorruption: media-gfx/gwenview-1.4.1 is corrupt: dictionary update sequence element #0 has length 1; 2 is required
Back to top
View user's profile Send private message
peaceful
Apprentice
Apprentice


Joined: 06 Jun 2003
Posts: 287
Location: Utah

PostPosted: Mon Jan 22, 2007 9:48 pm    Post subject: Reply with quote

Man. Something is seriously weird. Anybody found a fix to these cache errors?
Back to top
View user's profile Send private message
Jorbless
n00b
n00b


Joined: 08 May 2005
Posts: 8

PostPosted: Tue Jan 23, 2007 3:24 am    Post subject: Reply with quote

I'm just here to post me a "me too" on the SphinxTrain CacheCorruption issue. I was beginning to think that I had borked my fresh, new hardened SELinux box.
Back to top
View user's profile Send private message
Satan Klaus
n00b
n00b


Joined: 11 May 2005
Posts: 19

PostPosted: Tue Jan 23, 2007 5:13 am    Post subject: Reply with quote

Code:

rm -fr /var/cache/edb/* && emerge --metadata

should help
Back to top
View user's profile Send private message
angeloio
n00b
n00b


Joined: 20 Nov 2006
Posts: 5

PostPosted: Tue Jan 23, 2007 5:48 am    Post subject: Some interesting news out there Reply with quote

Ok After some searching I found this (I am including the whole conversation):
(From http://www.mail-archive.com/gentoo-user@lists.gentoo.org/msg47397.html)

Hi All,

I am trying to update/upgrade a box that has been standing for the
last year or so and this is what I have up to:
====================================
# emerge --metadata -v
...
app-accessibility/SphinxTrain-0.9.1-r1 is corrupt: dictionary update
sequence element #0 has length 1; 2 is required
====================================

Any idea how to fix it?
---------------------------------------------------------------

Try :
>
> # rm -rf /usr/portage/metadata/cache/* && emerge --sync

------------------------------

This is not the way to fix it.
This only forces portage to retrieve *all* of portage's metadata from the
server *again*. If the corruption is local, a normal rsync will fix this. If
the corruption is on the upstream rsync mirror, you will retrieve the same
corrupt metadata again.

removing the metadata from the portage tree only results in more data
transfers from the rsync mirror.

This error will resolve itself when the corruption is synced out, upstream or
local. To speed that process up, you can switch to a different rsync mirror
and sync against that. That will eliminate both possible corruptions.

--------------------

> If the corruption is local, a normal rsync will fix this.

Not necessarily. See bug #145482.
Synchronization again and again (on several days) didn't resolve this.
I removed the entire cache, as suggested, and it magically worked.
And I discovered later that the filesystem was corrupted.

> If the corruption is on the upstream rsync mirror, you will retrieve
> the same corrupt metadata again.

I've never seen that case.

> removing the metadata from the portage tree only results in more data
> transfers from the rsync mirror.

Yes, but obviously, you must not do it every day.

@Mick : I suggest that you run a fsck on your filesystem.

----------------------

Thanks. I did run fsck and everything seems fine. However, although
emerge --metadata worked, the following emerge --sync failed with the same
old error.

So, this time I did emerge --regen and when it finished the emerge --sync
worked without any more problems.

Thanks for all the suggestions.
--
Regards,
Mick

---------------------------------------------------------------------------------------------------------------------------------------------------------

I will do a little research on the above and add info later. In the meantime if this worked for somebody please report it...
Back to top
View user's profile Send private message
peaceful
Apprentice
Apprentice


Joined: 06 Jun 2003
Posts: 287
Location: Utah

PostPosted: Tue Jan 23, 2007 4:48 pm    Post subject: Reply with quote

I tried syncing today with no luck, but I tried this as mentioned above:

Code:
rm -fr /var/cache/edb/* && emerge --metadata


...and that fixed it!
Back to top
View user's profile Send private message
Jorbless
n00b
n00b


Joined: 08 May 2005
Posts: 8

PostPosted: Wed Jan 24, 2007 2:21 am    Post subject: Reply with quote

What peaceful tried worked for me as well. Into my log book 'o Linux tricks with thee.
Back to top
View user's profile Send private message
kallamej
Administrator
Administrator


Joined: 27 Jun 2003
Posts: 4830
Location: Gothenburg, Sweden

PostPosted: Sat Feb 10, 2007 11:26 am    Post subject: Reply with quote

Moved from Portage & Programming to Duplicate Threads in favour of topic 466613.
_________________
Please read our FAQ Forum, it answers many of your questions.
irc: #gentoo-forums on irc.freenode.net
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum