Bug 3159 - Anaconda crash - db type could not be determined
: Anaconda crash - db type could not be determined
Status: RESOLVED FIXED
Product: Sabayon
Classification: Unclassified
Component: Live
: Daily KDE
: i686 Sabayon Mainline
: P5 critical
: Next Stable
Assigned To: Fabio Erculiani
:
Depends on:
Blocks: 3133
  Show dependency treegraph
 
Reported: 2012-03-28 07:17 UTC by Vitovt
Modified: 2012-07-04 20:12 UTC (History)
2 users (show)

See Also:


Attachments
crash log (499.21 KB, text/x-log)
2012-03-28 07:17 UTC, Vitovt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vitovt 2012-03-28 07:17:45 UTC
Created attachment 587 [details]
crash log

On my custom ISOs  I've fully updated system and anaconda stops working.
The reason is switching to python 2.7 probably.
I've tried to recompile anaconda, but it didn't help.

The error is 
  File "/usr/lib/python2.7/anydbm.py", line 82, in open
    raise error, "db type could not be determined"

I've found the explanation: 

dbm.whichdb (python 3) and whichdb.whichdb (python 2) only check for "magic == 0x13579ace" to recognize gdbm databases. The recently released gdbm 1.9 series adds 0x13579acd (for "32bit") and 0x13579acf (for "64bit") magics (see src/gdbmconst.h in the gdbm-1.9 or gdbm-1.9.1 source tree). Python's gdbm linked to gdbm 1.9 creates databases with the new magic, which causes the whichdb tests to fail. To reproduce this just build python against the new libgdbm and run test/test_dbm.py.

here http://bugs.python.org/issue13007

I've checked the file 
/tmp/storage.state
It begins with:
9acf 1357 - exactly, as described above.
Comment 1 Vitovt 2012-03-28 07:38:08 UTC
this patch solves the issue:
http://hg.python.org/cpython/rev/14cafb8d1480

/usr/lib/python2.7/whichdb.py
line 98
-    if magic == 0x13579ace:
+    if magic in (0x13579ace, 0x13579acd, 0x13579acf):
Comment 2 Joost Ruis Staff 2012-04-05 19:01:02 UTC
Did you report this to upstream Gentoo yet?
Comment 3 Sabayon Git Staff 2012-04-10 13:07:37 UTC
Repository  overlays/for-gentoo.git
Author      Fabio Erculiani (lxnay AT sabayon.org)
Date        Tue, 10 Apr 2012 13:07:18 +0200
Commit      4bb3dae245a814e75220464e75d7f494d703b94c
Parents     3d147cb86ad050346715931f47ef6bfcd0981c47

[dev-lang/python] add gdbm-1.9 patch, fixes bug 3159
Comment 4 Joost Ruis Staff 2012-05-03 15:38:00 UTC
This is fixed now.
Comment 5 SN (Enlik) Staff 2012-07-04 20:12:07 UTC
*** Bug 3145 has been marked as a duplicate of this bug. ***