[pybsddb] "pgin failed" errors at seemingly arbitrary intervals

5m0pjkx02 at sneakemail.com 5m0pjkx02 at sneakemail.com
Thu Sep 17 20:01:45 CEST 2009


Hi,

I am getting fairly regular errors when writing to a bsddb3 hash table. The errors I get are always of the form:

DBRunRecoveryError: (-30974, 'DB_RUNRECOVERY: Fatal error, run database recovery -- test.db: pgin failed for page 312')

The page listed varies, and the error occurs only occasionally. It seems to happen only when overwriting an existing value, though I'm not sure of that.

The following code reproduces the error for me every few times I run it:
<code>
import random
import bsddb3

db=bsddb3.hashopen('test.db','n')
niter=1000000
keyrange=5000
for i in xrange(niter):
    if (i%5000)==0:
        print i
    k=str(random.choice(xrange(keyrange)))
    v=db.setdefault(k,'')
    v += str(random.choice(xrange(10)))
    db[k]=v
</code>

I'm running:
Fedora 11, Kernel Linux 2.6.30.5-43.fc11.x86_64
Python 2.5.4 |EPD 5.0.0| (r254:67916, Aug 21 2009, 16:48:27)
IPython 0.9.1
bsddb3-4.7.6-py2.5-linux-x86-64

Everything but bsddb3 was installed from the Enthought Python Distribution 64-bit stack. bsddb3 was installed via easy_install.

More possibly relevant information: Trying to run "import bsddb" (as opposed to "import bsddb3") throws this error:"ImportError: libdb-4.3.so: cannot open shared object file: No such file or directory"

Any help or advice the list could offer would be very much appreciated.

Many thanks,
Peter McMahan



More information about the pybsddb mailing list