Berkeley DB4 can;t allocate memory errors

Aidan Evans ae at is.dal.ca
Thu Oct 3 11:33:04 EDT 2002


On Wed, 2 Oct 2002 at 11:41 Aidan Evans wrote to info-cyrus at andrew.cmu.edu...

>On Tue, 1 Oct 2002 at 13:44 Aidan Evans wrote to info-cyrus at andrew.cmu.edu...
>
>>  Anybody seen errors like this before and have suggestions about what to do
>>about them?
>>
>>	Sep 27 22:50:07 imap imapd[32227]: DBERROR db4: Lock table is out of
>>	available locker entries
...
>  These errors went away after Cyrus was shut down and the system
>rebooted.  The shutdown/reboot was not specifically intended to cure this,
>it was for a disk reconfiguration.
>
>  As part of this change all of /var/imap became /imap via "cp -ipr" and the
>file system is ext3 (using the default journal=ordered) instead of ext2 (the
>kernel is 2.4.9-34).  Now we have new errors.
...
>  It feels as though deliver.db and tls_sessions.db have turned into
>garbage.  What should I do?  Can I delete these files and will Cyrus then
>re-create them cleanly so I can effectively start them over?  Can I do this
>while Cyrus is running?

  The answer appears to be yes, I can delete and start over.  I read the
code and some Berkeley DB documentation, then took the plunge:  I renamed
the existing deliver.db and tls_sessions.db and created a new empty
"/imap/db" directory (cd /imap; mkdir dbnew; mv db dbold; mv dbnew db).
Moments later a new deliver.db appeared and the db directory was
repopulated with __db.001 through 005 and a log file.

  I did miss one thing: I should have copied the "skipstamp" file from the
old directory to the new one.  I did copy it after seeing "DBERROR: reading
/imap/db/skipstamp, assuming the worst" messages and escaped with just a
hundred or so of these.

P.S.  It appears the Berkeley DB code can overwrite the buffer area in which
"/imap/db" is passed to "DB->init" because there were numerous messages
logged similar to DBERROR: init /imap/db: cyrusdb error" but instead of
/imap/db there was garbage.

Aidan Evans   | Networks & Systems
(902)494-3332 | University Computing & Information Services
              | Dalhousie University, Halifax, N.S., Canada





More information about the Info-cyrus mailing list