Has Berkeley DB bitten us at last?

Sebastian Hagedorn Hagedorn at uni-koeln.de
Tue Jan 18 13:23:53 EST 2005


Hi,

we have this setup:

name       : Cyrus IMAPD
version    : v2.2.10-Invoca-RPM-2.2.10-1 2004/11/23 17:52:52
vendor     : Project Cyrus
support-url: http://asg.web.cmu.edu/cyrus
os         : Linux
os-version : 2.4.21-15.0.3.ELsmp
environment: Built w/Cyrus SASL 2.1.20
             Running w/Cyrus SASL 2.1.20
             Built w/Sleepycat Software: Berkeley DB 4.1.25: (August 21, 
2003)
             Running w/Sleepycat Software: Berkeley DB 4.1.25: (August 21, 
2003)
             Built w/OpenSSL 0.9.7a Feb 19 2003
             Running w/OpenSSL 0.9.7a Feb 19 2003
             CMU Sieve 2.2
             TCP Wrappers
             mmap = shared
             lock = fcntl
             nonblock = fcntl
             auth = unix
             idle = poll

Up to now we haven't had any problems attributable to Berkeley DB, contrary 
to the experience of several other people. But today the following appeared 
in our logs:

Jan 18 13:16:25 lvr13 ctl_cyrusdb[24512]: checkpointing cyrus databases
Jan 18 13:16:25 lvr13 ctl_cyrusdb[24512]: archiving database file: 
/var/lib/imap/annotations.db
Jan 18 13:16:25 lvr13 ctl_cyrusdb[24512]: DBERROR db4: 
/var/lib/imap/db/log.0000001081: log file open failed: Permission denied

For some reason the file /var/lib/imap/db/log.0000001081 belonged to root! 
I am pretty sure that nobody changed the ownership manually. Is this a 
familiar symptom of BDB problems? After that, our log file looks like this:

Jan 18 13:16:25 lvr13 ctl_cyrusdb[24512]: DBERROR db4: PANIC: Permission 
denied
Jan 18 13:16:25 lvr13 ctl_cyrusdb[24512]: DBERROR: critical database 
situation
...
Jan 18 13:16:31 lvr13 pop3s[4423]: accepted connection
Jan 18 13:16:31 lvr13 pop3s[4423]: DBERROR db4: fatal region error 
detected; run recovery
Jan 18 13:16:31 lvr13 pop3s[4423]: DBERROR: error fetching 
ü<ýø^V\ܳ*êZÜâO¦^Uf-Ý: DB_RUNRECOVERY: Fatal error, run database 
recovery
Jan 18 13:16:31 lvr13 pop3s[4423]: DBERROR db4: fatal region error 
detected; run recovery
Jan 18 13:16:31 lvr13 pop3s[4423]: DBERROR: mydelete: error beginning txn: 
DB_RUNRECOVERY: Fatal error, run database recovery
Jan 18 13:16:31 lvr13 pop3s[4423]: DBERROR db4: fatal region error 
detected; run recovery
Jan 18 13:16:31 lvr13 pop3s[4423]: DBERROR: mystore: error beginning txn: 
DB_RUNRECOVERY: Fatal error, run database recovery


I resolved the problem by stopping Cyrus and issuing the following commands:

[root at lvr13 imap]# chown cyrus:mail /var/lib/imap/db/log.0000001081
[root at lvr13 imap]# db_recover -v -h /var/lib/imap/db
db_recover: Finding last valid log LSN: file: 1081 offset 19522
db_recover: Recovery starting from [1080][10460960]
db_recover: Recovery complete at Tue Jan 18 19:01:31 2005
db_recover: Maximum transaction ID 80025800 Recovery checkpoint 
[1081][33222]
db_recover: Recovery complete at Tue Jan 18 19:01:31 2005
db_recover: Maximum transaction id 80000000 Recovery checkpoint 
[1081][33222]

For now everything appears to be fine again, but of course I wonder what 
the cause may have been. I'd be grateful for any explanations ...

Thanks, Sebastian
--
Sebastian Hagedorn M.A. - RZKR-R1 (Flachbau), Zi. 18, Robert-Koch-Str. 10
Zentrum für angewandte Informatik - Universitätsweiter Service RRZK
Universität zu Köln / Cologne University - Tel. +49-221-478-5587
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : https://lists.andrew.cmu.edu/mailman/private/info-cyrus/attachments/20050118/6f341007/attachment.bin


More information about the Info-cyrus mailing list