[spambayes-dev] A new and altogether different bsddb breakage

Kenny Pitt kennypitt at hotmail.com
Thu Dec 18 14:53:08 EST 2003


Tim Peters wrote:
> [Kenny Pitt]
>> The bsddb package includes a dbshelve module that handles all the
>> required dictionary access methods to provide compatibility with
>> standard shelve functionality.  It also allows specifying the DB_ENV
>> when opening the database.
> 
> Speaking of which, 4 of the test_bsddb3.py tests fail on Win98SE with
> the soon-to-be-released Python 2.3.3 (which is at least as well as
> that test has ever done on that platform).  The 4 failing tests all
> exercise the dbshelve module:
> 
> ERROR: test01_basics (bsddb.test.test_dbshelve.EnvBTreeShelveTestCase)
> ERROR: test01_basics (bsddb.test.test_dbshelve.EnvHashShelveTestCase)
> ERROR: test01_basics
> (bsddb.test.test_dbshelve.EnvThreadBTreeShelveTestCase) ERROR:
> test01_basics (bsddb.test.test_dbshelve.EnvThreadHashShelveTestCase) 
> 
> and all die with the same traceback and error:
> 
> Traceback (most recent call last):
>   File "C:\CODE\23\lib\bsddb\test\test_dbshelve.py", line 75, in
> test01_basics
>     self.do_open()
>   File "C:\CODE\23\lib\bsddb\test\test_dbshelve.py", line 238, in
>     do_open self.env.open(homeDir, self.envflags | db.DB_INIT_MPOOL |
> db.DB_CREATE) DBAgainError: (11, 'Resource temporarily unavailable --
> unable to join the environment')
> 
> If that isn't just an artifact of something else the test suite is
> doing, it's enough to kill the idea of using dbshelve on Windows.

Notice that the exception is occurring in test_dbshelve itself, not in
the dbshelve module.  I have a sneaking suspicion that this would be a
general problem with bsddb on Win98, and not just if we used dbshelve.
dbshelve doesn't do a whole lot besides pickling and unpickling the item
values before calling the direct API.

The "Windows Notes" page in the Berkeley DB docs says:

"""
On Windows/9X, files opened by multiple processes do not share data
correctly. For this reason, the DB_SYSTEM_MEM flag is implied for any
application that does not specify the DB_PRIVATE flag, causing the
system paging file to be used for sharing data.
""" (http://www.sleepycat.com/docs/ref/build_win/notes.html)

Possibly related?  I assume DBAgainError maps to error code EAGAIN in
the C API, which means "The shared memory region was locked and
(repeatedly) unavailable."  Maybe something isn't getting released
properly from the earlier non-environment tests.

-- 
Kenny Pitt




More information about the spambayes-dev mailing list