DB_INIT_LOCK deadlocks?

David Relson relson at osagesoftware.com
Sun Jan 29 15:54:04 CET 2006


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".
> 
> make check fails t.ctype (as we already know) and skips t.leakfind and
> t.valgrind, the rest are OK. Also, the compiled bogofilter manages to
> create a new wordlist without any obvious problems.
> 
> Is it OK to run bogofilter with an "unsafe" option (I want
> stability!), or must I try a different BDB version, or ...?
> 
> Sorry if the answer can be found in the archives. I didn't manage to
> find anything using Gmane.

Hi John,

Good questions!  

We've been using DB 4.2.52 with bogofilter for 2 or so years and it
works very well (in most cases).  Some Red Hat installations have
problems because DB4 has been built with bad thread support (described
at http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=91933).

However since you're on OpenBSD 3.7 (macppc), I'd hesitate to say that
that's the problem.  Digging into the configure script, DB_INIT_LOCK is
used when checking "if Berkeley DB supports shared environments".  From
this info and your description, it sounds like the OpenBSD package may
have been built without shared environment support.  Have you any way
to verify that?

What you may want to do is build DB 4.2.52 from source and
then run bogofilter's configure script with
"--with-libdb-prefix=PATH_TO_NEW_DB_INSTALL"

Given the number of bogofilter installations and the variety of
platforms (hardware and operating systems) it's working on, you should
be able to run it on OpenBSD.

HTH,

David

P.S.  Matthias will likely post further info as he's our database,
porting, and configure expert :->





More information about the Bogofilter mailing list