[ python-Bugs-897820 ] db4 4.2 == :-( (test_anydbm and test_bsddb3)

SourceForge.net noreply at sourceforge.net
Sun Jun 27 19:00:21 EDT 2004


Bugs item #897820, was opened at 2004-02-15 22:03
Message generated for change (Comment added) made by greg
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=897820&group_id=5470

Category: Python Library
>Group: Python 2.3
Status: Open
>Resolution: Remind
Priority: 5
Submitted By: Anthony Baxter (anthonybaxter)
Assigned to: Gregory P. Smith (greg)
Summary: db4 4.2 == :-(  (test_anydbm and test_bsddb3)

Initial Comment:
This machine, running fedora core 2 (test) has db4
4.2.52 installed. test_anydbm fails utterly with this
combination. 
3 of the 4 tests fail, the failing part is the same in
each case:

  File "Lib/anydbm.py", line 83, in open
    return mod.open(file, flag, mode)
  File "Lib/dbhash.py", line 16, in open
    return bsddb.hashopen(file, flag, mode)
  File "Lib/bsddb/__init__.py", line 293, in hashopen
    d.open(file, db.DB_HASH, flags, mode)
DBInvalidArgError: (22, 'Invalid argument --
DB_TRUNCATE illegal with locking specified')

test_bsddb passes, but test_bsddb3 fails with a similar
error:

test test_bsddb3 failed -- Traceback (most recent call
last):
  File "Lib/bsddb/test/test_compat.py", line 82, in
test04_n_flag
    f = hashopen(self.filename, 'n')
  File "Lib/bsddb/__init__.py", line 293, in hashopen
    d.open(file, db.DB_HASH, flags, mode)
DBInvalidArgError: (22, 'Invalid argument --
DB_TRUNCATE illegal with locking specified')



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

>Comment By: Gregory P. Smith (greg)
Date: 2004-06-27 16:00

Message:
Logged In: YES 
user_id=413

A workaround for this BerkeleyDB change has been committed
to HEAD.

dist/src/Lib/bsddb/__init__.py rev 1.15

I've marked this bug as "python 2.3" now as a reminder for
me to commit this to the 2.3 maintenance branch before 2.3.5.

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

Comment By: Anthony Baxter (anthonybaxter)
Date: 2004-06-18 04:27

Message:
Logged In: YES 
user_id=29957

Regardless of whether there's a workaround or not, the test
suite should not fail. Fedora Core is a fairly well known
distro, and while FC2 is probably the first to ship with db
4.2, I'm sure it won't be the last.



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

Comment By: Gregory P. Smith (greg)
Date: 2004-06-16 15:40

Message:
Logged In: YES 
user_id=413

As Tim Peters pointed out on python-dev in march:

> I suspect Sleepycat screwed us there, changing the rules
in midstream.
> Someone on c.l.py appeared to track down the same thing
here, but in an app
> instead of in our test suite:
> 
>    
http://mail.python.org/pipermail/python-list/2004-May/220168.html
> 
>     The change log of Berkeley DB 4.2.52 says "9. Fix a
bug to now
>     disallow DB_TRUNCATE on opens in locking environments,
since we
>     cannot prevent race conditions ..."

leaving the bug open until i look to see if there is a
workaround.

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

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



More information about the Python-bugs-list mailing list