DB_INIT_LOCK deadlocks?

Matthias Andree matthias.andree at gmx.de
Sun Jan 29 17:20:17 CET 2006


David Relson <relson at osagesoftware.com> writes:

> On Sun, 29 Jan 2006 10:42:27 +0100
> John wrote:
>
>> 
>> Trying to compile bogofilter 1.0.1 on OpenBSD 3.7 (macppc) with:
>> Sleepycat Software: Berkeley DB 4.2.52: (December  3, 2003)
>> (installed from OpenBSD packages).
>> 
>> It deadlocks at "checking if Berkeley DB supports shared
>> environments" in what looks like an infinite select-loop:
>>   CALL select(0,0,0,0,0xffffb948)
>>   RET  select 0
>>   ...
>> 
>> It appears as if it locks in the e->open() call. In bfadtestdir, it
>> creates:
>>     8192 Jan 29 10:11 __db.001
>>   270336 Jan 29 10:11 __db.002
>>   368640 Jan 29 10:11 __db.003
>> but nothing else.
>> 
>> Commenting out DB_INIT_LOCK in the test code makes it configure just
>> fine, and abviously so does --disable-dbshared-test, which is marked
>> as "unsafe".
> P.S.  Matthias will likely post further info as he's our database,
> porting, and configure expert :->

I haven't much info to post here - I've never seen this hang in
configure, and it is not supposed to.

OTOH, bogofilter no longer uses the Berkeley DB lock system, so we
should change the test for 1.0.2 and use _LOG and _TXN instead, for
consistency (committed to CVS). I am not confident though that this
might fix the OpenBSD hang. I rather doubt it, but I'd be interested to
hear if it works: 

Index: NEWS
===================================================================
RCS file: /cvsroot/bogofilter/bogofilter/NEWS,v
retrieving revision 1.538
retrieving revision 1.539
diff -u -r1.538 -r1.539
--- NEWS	28 Jan 2006 13:28:49 -0000	1.538
+++ NEWS	29 Jan 2006 16:18:41 -0000	1.539
@@ -13,6 +13,12 @@
 
 -------------------------------------------------------------------------------
 
+	2006-01-29
+
+	* The configure script, when checking Berkeley DB capabilities,
+	  now checks for logging and transactional subsystems rather
+	  than the locking subsystem that we abandoned before 1.0.0.
+
 	2006-01-28
 
 	* Only print Berkely DB file size message once per run.
Index: configure.ac
===================================================================
RCS file: /cvsroot/bogofilter/bogofilter/configure.ac,v
retrieving revision 1.415
retrieving revision 1.416
diff -u -r1.415 -r1.416
--- configure.ac	1 Jan 2006 23:43:29 -0000	1.415
+++ configure.ac	29 Jan 2006 16:18:41 -0000	1.416
@@ -1,4 +1,4 @@
-# $Id: configure.ac,v 1.415 2006/01/01 23:43:29 relson Exp $
+# $Id: configure.ac,v 1.416 2006/01/29 16:18:41 m-a Exp $
 dnl vim: set noai tw=0:
 dnl
 dnl ********************************************************
@@ -577,7 +577,7 @@
     DB_ENV *e;
     int r;
     if ((r = db_env_create(&e, 0))) barf("db_env_create", r);
-    if ((r = e->open(e, TESTDIR, DB_INIT_LOCK|DB_INIT_MPOOL|DB_CREATE, 0664)))
+    if ((r = e->open(e, TESTDIR, DB_INIT_LOG|DB_INIT_TXN|DB_INIT_MPOOL|DB_CREATE, 0664)))
 	barf("DB_ENV->open", r);
     if ((r = e->close(e, 0)))
         barf("DB_ENV->close", r);


-- 
Matthias Andree



More information about the Bogofilter mailing list