This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: crash in shelve module
Type: Stage:
Components: Library (Lib) Versions:
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: barry Nosy List: anthonybaxter, barry, drbits, gtk, tim.peters
Priority: low Keywords:

Created on 2001-03-13 18:14 by anonymous, last changed 2022-04-10 16:03 by admin. This issue is now closed.

Messages (12)
msg3852 - (view) Author: Nobody/Anonymous (nobody) Date: 2001-03-13 18:14
While using shelve module on SGI
sloth 271> uname -a
IRIX64 sloth 6.5 04191225 IP27

my python program crashes and
I am getting following error message:

  File "/usr/local/lib/python1.5/shelve.py", line 71,
in __setitem__
    self.dict[key] = f.getvalue()
bsddb.error: (0, 'Error')

At the time the size of the "shelve" file was quite big
(maybe this is a problem ?)
sloth 267> ls -lt *shelve
-rw-r--r--    1 ryszard  cdiApps   85778432 Mar 13
12:27 recap_mddr.shelve
msg3853 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2001-03-18 06:03
Logged In: YES 
user_id=31435

Assigned to Barry because there's not enough info here to 
do anything about it <wink>.
msg3854 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2001-03-18 16:10
Logged In: YES 
user_id=12800

Besides, this was submitted by "anonymous" and the only clue
to the identity of the original poster is in the ls output. 
Unfortunately, I'm not prepared to spam all the Ryszard's in
my name database. :)

I'm closing this report until/unless we get more
information.
msg3855 - (view) Author: Garth T Kidd (gtk) Date: 2002-05-06 07:55
Logged In: YES 
user_id=59803

You might want to re-open this one, Barry. The problem 
seems to be with any large number of bsddb inserts, which 
can also be triggered by shelve. See: 

http://www.deadlybloodyserious.com/Python/2002/05/06.html

http://bugs.activestate.com/show_bug.cgi?id=10242 
msg3856 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2002-05-06 15:13
Logged In: YES 
user_id=12800

I'd highly suggest that any serious work with BerkeleyDB be
done with pybsddb and a more modern version of Berkeley. 
The bsddb module that comes with Python 2.2 has serious
problems, including not being able to link on some *nix
distros.  Also BDB 1.85 is way way old and has many known
problems. 

I ran the deadlybloddyserious example using BDB 3.11 and
pybsddb 3.0 and it passed with flying colors.  See
www.sleepycat.com for the latest BDB's and pybsddb.sf.net
for the latest Python wrappers.
msg3857 - (view) Author: Garth T Kidd (gtk) Date: 2002-05-07 02:35
Logged In: YES 
user_id=59803

If bssdb is broken, shelve should use anydbm and bsddb 
should be deprecated. Precedence: regexp.

ActivePython 2.2.0 Build 221 (ActiveState Corp.) based on
Python 2.2 (#28, Mar 28 2002, 12:10:20) [MSC 32 bit 
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more 
information.
>>> import shelve
>>> s = shelve.open('temp.db', 'c')
>>> s.dict
<bsddb.bsddb object at 0x008A2D48>

Python 2.2.1 (#1, Apr 30 2002, 17:02:05)
[GCC 2.95.3 20010315 (SuSE)] on linux2
Type "help", "copyright", "credits" or "license" for more 
information.
>>> import shelve
>>> s = shelve.open('temp.db', 'c')
>>> s.dict
<bsddb.bsddb object at 0x815a388>
>>>

msg3858 - (view) Author: Garth T Kidd (gtk) Date: 2002-05-07 03:49
Logged In: YES 
user_id=59803

Submitted patch #553108.
msg3859 - (view) Author: Anthony Baxter (anthonybaxter) (Python triager) Date: 2002-05-07 03:56
Logged In: YES 
user_id=29957

Barry, if it's known to be stuffed, why is it
still there?
Is there an open bug report for how it's busted?
A bunch of stuff that depends on getting "a db
storage" is going to use bsddb...
msg3860 - (view) Author: Martin D Katz, Ph.D. (drbits) Date: 2002-05-16 01:02
Logged In: YES 
user_id=276840

Apparently, this problem only occurs when the hash table 
form of bsddb is used. The b-bree version (btopen) does not 
have this problem.
msg3861 - (view) Author: Martin D Katz, Ph.D. (drbits) Date: 2002-05-16 01:09
Logged In: YES 
user_id=276840

Apparently, this problem only occurs when the hash table 
form of bsddb is used. The b-bree version (btopen) does not 
have this problem.
msg3862 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2002-05-16 04:32
Logged In: YES 
user_id=12800

I'll re-open this one as a reminder to myself to deal with
this somehow.  All I know is that distutils build of
bsddbmodule fails for all the Linux flavors I've tested it
on.  I think the autodetection of the library to link
against is busted in Py2.2 & 2.3.  I don't have time to
think more about this now, but I will make sure I do
/something/ about it for Py2.3.
msg3863 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2003-05-19 20:04
Logged In: YES 
user_id=12800

I think the fact that pybsddb is now the default bsddb
module makes this bug report out of date.  Closing.
History
Date User Action Args
2022-04-10 16:03:51adminsetgithub: 34144
2001-03-13 18:14:49anonymouscreate