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: db4 4.2 == :-( (test_anydbm and test_bsddb3)
Type: Stage:
Components: Library (Lib) Versions: Python 2.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: gregory.p.smith Nosy List: anthonybaxter, gregory.p.smith
Priority: normal Keywords:

Created on 2004-02-16 06:03 by anthonybaxter, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (5)
msg20001 - (view) Author: Anthony Baxter (anthonybaxter) (Python triager) Date: 2004-02-16 06:03
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')

msg20002 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2004-06-16 22:40
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.
msg20003 - (view) Author: Anthony Baxter (anthonybaxter) (Python triager) Date: 2004-06-18 11:27
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.

msg20004 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2004-06-27 23:00
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.
msg20005 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2004-07-13 21:07
Logged In: YES 
user_id=413

committed to release23-maint as Lib/bsddb/__init__.py 1.5.10.5.

closing.
History
Date User Action Args
2022-04-11 14:56:02adminsetgithub: 39939
2004-02-16 06:03:38anthonybaxtercreate