Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > shelve, segfault and bsddb.db.DBPageNotFoundError: (-30987,

Thread Tools

shelve, segfault and bsddb.db.DBPageNotFoundError: (-30987,

Gabriel Rossetti
Posts: n/a
Hello everyone, I get the following error with the shelve module (python
2.5.2) sometimes :

>>> s ="save.dat", writeback=True)
>>> s

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.5/", line 167, in __repr__
return repr(dict(self.iteritems()))
File "/usr/lib/python2.5/", line 105, in iteritems
for k in self:
File "/usr/lib/python2.5/", line 92, in __iter__
for k in self.keys():
File "/usr/lib/python2.5/", line 92, in keys
return self.dict.keys()
File "/usr/lib/python2.5/bsddb/", line 252, in keys
return _DeadlockWrap(self.db.keys)
File "/usr/lib/python2.5/bsddb/", line 62, in DeadlockWrap
return function(*_args, **_kwargs)
bsddb.db.DBPageNotFoundError: (-30987, 'DB_PAGE_NOTFOUND: Requested page
not found')

This must mean that my file is currupt, correct? If I do the following I
get a segfault :

>>> len(s)

Segmentation fault

Is this a bug? So as a workaround I must do something like this :

s ="save.dat", writeback=True)
except bsddb.db.DBPageNotFoundError, e:
s ="save.dat", writeback=True)

Any other ideas/comments? Does anyone else have this problem?


Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
invoking a segfault within a segfault handler - is this undefinedbehavior? Andrey Vul C Programming 8 07-30-2010 02:14 PM
Why segfault and no NULL match in for loop? somebody C Programming 7 05-03-2007 09:13 PM
strlen() and segfault? Zach C Programming 5 02-14-2007 09:33 PM
Tk and raw_input segfault dale Python 0 05-24-2005 04:38 PM
Segfault with win32ole, WMI and structs Daniel Berger Ruby 4 05-24-2004 12:53 AM