[Python-bugs-list] [ python-Bugs-445862 ] bsddb fails for larger amount of data

noreply@sourceforge.net noreply@sourceforge.net
Fri, 03 Aug 2001 00:50:08 -0700


Bugs item #445862, was opened at 2001-07-30 00:21
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=445862&group_id=5470

Category: Extension Modules
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: bsddb fails for larger amount of data

Initial Comment:
The attached script fails after approx. 72500 insert 
operations. If you vary the size of the keys and/or 
the values, the bug occurs earlier or later, but even 
with a value size of 1 the bug will occur. Probably, 
this explains also bug #408271 ("crash in shelve 
module").

Platform: W2K



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

Comment By: Nobody/Anonymous (nobody)
Date: 2001-08-03 00:50

Message:
Logged In: NO 

Here it is:

import anydbm
import bsddb
import random

MAX = 1000000
r = random.Random(42)
r.seed(1017)
db = anydbm.open("test.dbm", "n")
#db = bsddb.hashopen("test.dbm", "n")
try:
    for i in xrange(0, MAX):
        if i % 1000 == 0: print i
        key = "abcdef" + str(r.uniform(0, 10 * MAX))
        val = "a" * 80 + str(i)
        db[key] = val
finally:
    db.close()
    print "Last i: %s, last key:%s" % (i,key) 

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

Comment By: Tim Peters (tim_one)
Date: 2001-08-02 12:41

Message:
Logged In: YES 
user_id=31435

Alas, there's no script attached -- please attach one, so 
we have something concrete to investigate.

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

Comment By: Nobody/Anonymous (nobody)
Date: 2001-08-02 03:08

Message:
Logged In: NO 

I was getting crashes in shelve module, Using NT4 (Python 
2.1 (#15, Apr 16 2001, 18:25:49) [MSC 32 bit (Intel)] on 
win32). I've changed my program to re-read previously 
written keys fairly frequently, and I get keyerrors for 
keys that have definitely been written, and that gave no 
error a little earlier in the same program. The program 
doesn't contain any delete statements.

The same program works when using dumbdbm instead of bsddb 
(but produces huge indexes), so there definitely appears to 
be a problem with bsddbm on windows NT.




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

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=445862&group_id=5470