Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Portage file corruption -- but which file?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
dwnoon
n00b
n00b


Joined: 28 Aug 2003
Posts: 21
Location: Luton, England

PostPosted: Fri Sep 28, 2012 9:43 pm    Post subject: Portage file corruption -- but which file? Reply with quote

One of my systems has had a dodgy cable to its hard drives, which seems to have corrupted some sector(s) when Portage was writing one of its files. This manifests itself with the following error:

Code:

dwn@karnak ~ % emerge -pvuDN @world

These are the packages that would be merged, in order:

Calculating dependencies... done!
Traceback (most recent call last):
  File "/usr/bin/emerge", line 50, in <module>
    retval = emerge_main()
  File "/usr/lib/portage/pym/_emerge/main.py", line 2071, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/usr/lib/portage/pym/_emerge/actions.py", line 302, in action_build
    settings, trees, myopts, myparams, myaction, myfiles, spinner)
  File "/usr/lib/portage/pym/_emerge/depgraph.py", line 7319, in backtrack_depgraph
    myaction, myfiles, spinner)
  File "/usr/lib/portage/pym/_emerge/depgraph.py", line 7351, in _backtrack_depgraph
    success, favorites = mydepgraph.select_files(myfiles)
  File "/usr/lib/portage/pym/_emerge/depgraph.py", line 2249, in select_files
    self._load_vdb()
  File "/usr/lib/portage/pym/_emerge/depgraph.py", line 546, in _load_vdb
    fake_vartree.sync()
  File "/usr/lib/portage/pym/_emerge/FakeVartree.py", line 179, in sync
    self._sync()
  File "/usr/lib/portage/pym/_emerge/FakeVartree.py", line 228, in _sync
    pkg = self._pkg(cpv)
  File "/usr/lib/portage/pym/_emerge/FakeVartree.py", line 250, in _pkg
    self._real_vardb.aux_get(cpv, self._db_keys)),
  File "/usr/lib/portage/pym/portage/dbapi/vartree.py", line 662, in aux_get
    pkg_data = self._aux_cache["packages"].get(mycpv)
  File "/usr/lib/portage/pym/portage/dbapi/vartree.py", line 563, in _aux_cache
    self._aux_cache_init()
  File "/usr/lib/portage/pym/portage/dbapi/vartree.py", line 585, in _aux_cache_init
    aux_cache = mypickle.load()
KeyError: 1898881161


The contents of a .pickle file are clearly invalid. But the .pickle file is a transient thing, used during the emerge command but built from soemthing else. Does anybody with inner knowledge of emerge processing have any idea which file(s) could be corrupt?
_________________
Regards,

Dave [RLU #314465]
Back to top
View user's profile Send private message
dol-sen
Developer
Developer


Joined: 30 Jun 2002
Posts: 2527
Location: Richmond, BC, Canada

PostPosted: Sat Sep 29, 2012 2:06 am    Post subject: Reply with quote

Code:
rm /var/cache/edb/vdb_metadata.pickle
should fix that issue.

You'll have to do that one and see what else may need fixing.
_________________
Brian
Porthole, the Portage GUI frontend irc@freenode: #gentoo-guis, #porthole, Blog
layman, gentoolkit, CoreBuilder, esearch...
Back to top
View user's profile Send private message
dol-sen
Developer
Developer


Joined: 30 Jun 2002
Posts: 2527
Location: Richmond, BC, Canada

PostPosted: Sat Sep 29, 2012 3:26 am    Post subject: Reply with quote

Also this type of error is now fixed to handle it automatically without crashing.

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=2377357f4e0164d338c1249c79f479229aa7c0e4
_________________
Brian
Porthole, the Portage GUI frontend irc@freenode: #gentoo-guis, #porthole, Blog
layman, gentoolkit, CoreBuilder, esearch...
Back to top
View user's profile Send private message
dwnoon
n00b
n00b


Joined: 28 Aug 2003
Posts: 21
Location: Luton, England

PostPosted: Sat Sep 29, 2012 3:15 pm    Post subject: Reply with quote

dol-sen wrote:
Code:
rm /var/cache/edb/vdb_metadata.pickle
should fix that issue.

You'll have to do that one and see what else may need fixing.

Yes, that fixed the immediate problem. I just hope not too many other files have been corruptted.

Many thanks.
_________________
Regards,

Dave [RLU #314465]
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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