I just don't understand...

Nikola Milutinovic Nikola.Milutinovic at ev.co.yu
Fri Jul 25 06:28:47 EDT 2003


>By the way, I through ladebug at the ctl_cyrudb program.  The stack trace
>looks like the following:
>
>>0  0x3000004f624 in __db_errcall(0x3ffc008a2b0, 0x0, 0x57, 0x0, 0x0, 0x0)
>        in /usr/local/BerkeleyDB.4.1/lib/libdb-4.1.so
>#1  0x3000004f4b0 in __db_err(0x3ffc008a2b0, 0x0, 0x57, 0x0, 0x0, 0x0)
>        in /usr/local/BerkeleyDB.4.1/lib/libdb-4.1.so

This is the error orutine.

>#2  0x30000071f00 in __db_e_attach(0x3ffc008a2b0, 0x0, 0x57, 0x0, 0x0, 0x0)
>        in /usr/local/BerkeleyDB.4.1/lib/libdb-4.1.so
>#3  0x30000072170 in __db_e_remove(0x3ffc008a2b0, 0x0, 0x57, 0x0, 0x0, 0x0)
>        in /usr/local/BerkeleyDB.4.1/lib/libdb-4.1.so
>#4  0x3000006d770 in UnknownProcedure3FromFile59(0x3ffc008a2b0, 0x0, 0x57,
>        0x0, 0x0, 0x0) in /usr/local/BerkeleyDB.4.1/lib/libdb-4.1.so

This is strange.

>#5  0x3000006d064 in __dbenv_open(0x3ffc008a2b0, 0x0, 0x57, 0x0, 0x0, 0x0)
>        in /usr/local/BerkeleyDB.4.1/lib/libdb-4.1.so
>#6  0x1200312a0 in init(dbdir=0x11fffaee8="/var/imap/db", myflags=1)
>        "cyrusdb_berkeley.c":177
>#7  0x120030a38 in cyrusdb_init() "cyrusdb.c":80
>#8  0x1200281c8 in libcyrus_init() "libcyr_cfg.c":149
>#9  0x120008b88 in cyrus_init(alt_config=0x0, ident=0x140000170
>        ="ctl_cyrusdb") "global.c":168
>#10 0x120007fe4 in main(argc=2, argv=0x11fffc018) "ctl_cyrusdb.c":218
>#11 0x120007b38 in __start(0x3ffc008a2b0, 0x0, 0x57, 0x0, 0x0, 0x0)
>        in ctl_cyrusdb
>
>The error produced is "DBERROR db4: unable to join the environment".  It
>looks like it tries to initialize the database by opening /var/imap/db
>and never comes back... the process is aborted somewhere in the call.

So why not run it really in a debugging session? Set breakpoints, step
throught the code. I know it is a pain (you'd have to recompile both Cyrus
IMAP and BDB with -g3 switch), but it is the last resort.

> I have tried everything to get DB stuff working... I just don't know what
> is going on.  Once again, I am on a Tru64 5.1a cluster, was using BerkDB
> 4.0.14, then switched to 4.1.25.  This is with Cyrus IMAP 2.2.1-beta.

4.0.14 was buggy, 4.1.25 has seen one patch so far, but it is still buggy
and unstable. Folks at SleepyCat have announced that new version should be
soon, but it is taking time.

> Basically, I get the following errors (just the ctl_cyrusdb lines):
>
>   DBERROR db4: unable to join the environment
>   DBERROR: dbenv->open '/var/imap/db' failed: Operation would block
>   DBERROR: init() on berkeley
>   DBERROR: reading /var/imap/db/skipstamp, assuming the worst:
>                      No such file or directory
>   checkpointing cyrus databases
>   archiving database file: /var/imap/annotations.db
>   archiving database file: /var/imap/mailboxes.db
>   done checkpointing cyrus databases
>
> If I run the ctl_cyrusdb command by hand (basically, logged in as cyrus
> and run 'ctl_cyrusdb -r'), I eventually get the following error:
>
>   1434184:./ctl_cyrusdb: /sbin/loader: Fatal Error: call to unresolved
>   symbol from /usr/local/BerkeleyDB.4.1/lib/libdb-4.1.so
> (pc=0x30000016418)

This is strange - it should name the unresolved symbol.

> Running ldd against ctl_cyrusdb gives me the following:
>
>   Main  =>   ctl_cyrusdb
>   libsasl2.so  =>   /usr/local/sasl-2.1.15/lib/libsasl2.so
>   libdb-4.1.so  =>   /usr/local/BerkeleyDB.4.1/lib/libdb-4.1.so
>   libssl.so  =>   /usr/local/ssl/lib/libssl.so
>   libcrypto.so  =>   /usr/local/ssl/lib/libcrypto.so
>   libc.so  =>   /usr/shlib/libc.so

Cyrus IMAP 2.1.13:

Legba:/usr/opt/Cyrus-IMAP-2.1.13/sbin# odump -Dl ctl_cyrusdb

                        ***LIBRARY LIST SECTION***
        Name             Time-Stamp        CheckSum   Flags Version
ctl_cyrusdb:
        libsasl2.so  May  9 13:16:22 2003 0x5324c721     0 2.0
        libdb-4.1.so Dec 31 17:10:14 2002 0x62e2eea1     0
        libssl.so    Mar  4 13:26:48 2003 0x7353d310     0 0.9.7
        libcrypto.so Mar  4 13:26:46 2003 0x17df10e7     0 0.9.7
        libc.so      Jun 25 21:14:05 2001 0x5cbd50dd     0 osf.1

Nothing new there.

> Okay, so I got it compiled and freshly installed.  Running ldd against
> the binaries shows the same output as above.  When I start the Cyrus
> server up, I get the same errors!!! I thought I disabled BerkeleyDB by
> specifying skiplist for everything?  So, why am I still getting the
> "db4: unable to join the environment" errors and the follow-up errors
> regarding /var/imap/db?

Is skiplist actally disabling BDB?

Nix.





More information about the Info-cyrus mailing list