BDB despite apparent lack of BDB databases

Boylan, Ross Ross.Boylan at ucsf.edu
Mon May 15 16:16:56 EDT 2017


I am upgrading an old cyrus 2.2 installation to 2.4.  Using a chroot I converted all my old bdb databases to skiplist and copied the results to the system with cyrus 2.4. cyrus2.4 wouldn't not start, giving lots of bdb errors.  I moved the db* directories out of the way, and now it complains some that they are missing, but may be running OK.
1) Is it OK?
2) Why am I getting BDB errors without using BDB databases?

There have been a number of closely related threads:
https://www.spinics.net/lists/info-cyrus/msg17821.html (never answered)
https://www.spinics.net/lists/info-cyrus/msg17781.html (seemed to establish bdb was in use even though not configured to be used, but unresolved)
https://www.spinics.net/lists/info-cyrus/msg17718.html (advised converting all the databases, but I think I've done that)

Even after the conversions, the db* directories remained under /var/lib/cyrus,  When I started with CYRUS_VERBOSE=3 the log showed
May 14 11:44:28 ross-mail cyrus/master[47051]: process started
May 14 11:44:29 ross-mail cyrus/ctl_cyrusdb[47052]: DBERROR db5: BDB1546 unable to join the environment
May 14 11:44:29 ross-mail cyrus/ctl_cyrusdb[47052]: DBERROR db5: BDB1521 Recovery function for LSN 127 8428253 failed
May 14 11:44:29 ross-mail cyrus/ctl_cyrusdb[47052]: DBERROR db5: BDB0061 PANIC: Invalid argument
May 14 11:44:29 ross-mail cyrus/ctl_cyrusdb[47052]: DBERROR: critical database situation
May 14 11:44:29 ross-mail cyrus/master[47051]: process 47052 exited, status 75
May 14 11:44:29 ross-mail cyrus/cyr_expire[47055]: DBERROR db5: BDB0060 PANIC: fatal region error detected; run recovery
May 14 11:44:29 ross-mail cyrus/cyr_expire[47055]: DBERROR: critical database situation
May 14 11:44:29 ross-mail cyrus/master[47051]: process 47055 exited, status 75
May 14 11:44:29 ross-mail cyrus/tls_prune[47058]: DBERROR db5: BDB0060 PANIC: fatal region error detected; run recovery
May 14 11:44:29 ross-mail cyrus/tls_prune[47058]: DBERROR: critical database situation
May 14 11:44:29 ross-mail cyrus/master[47051]: process 47058 exited, status 75
May 14 11:44:29 ross-mail cyrus/master[47051]: WARNING: cannot find executable for service 'http' -- ignored
May 14 11:44:29 ross-mail cyrus/master[47051]: unable to setsocketopt(IP_TOS): Operation not supported
May 14 11:44:29 ross-mail cyrus/master[47051]: unable to setsocketopt(IP_TOS): Operation not supported
May 14 11:44:29 ross-mail cyrus/master[47051]: ready for work
May 14 11:44:29 ross-mail cyrus/ctl_cyrusdb[47061]: DBERROR db5: BDB0060 PANIC: fatal region error detected; run recovery
May 14 11:44:29 ross-mail cyrus/notify[47062]: DBERROR db5: BDB0060 PANIC: fatal region error detected; run recovery
.... and much more like that

The last thread mentioned above inspired me to remove all the db* directories (though some responses said that was a bad idea):
May 15 12:28:29 ross-mail cyrus/master[56904]: process started
May 15 12:28:29 ross-mail cyrus/ctl_cyrusdb[56905]: DBERROR db5: /var/lib/cyrus/db: No such file or directory
May 15 12:28:29 ross-mail cyrus/ctl_cyrusdb[56905]: DBERROR db5: /var/lib/cyrus/db/__db.001: No such file or directory
May 15 12:28:29 ross-mail cyrus/ctl_cyrusdb[56905]: DBERROR db5: /var/lib/cyrus/db: No such file or directory
May 15 12:28:29 ross-mail cyrus/ctl_cyrusdb[56905]: DBERROR db5: /var/lib/cyrus/db/__db.001: No such file or directory
May 15 12:28:29 ross-mail cyrus/ctl_cyrusdb[56905]: DBERROR: dbenv->open '/var/lib/cyrus/db' failed: No such file or directory
May 15 12:28:29 ross-mail cyrus/ctl_cyrusdb[56905]: DBERROR: init() on berkeley
May 15 12:28:29 ross-mail cyrus/ctl_cyrusdb[56905]: DBERROR: writing /var/lib/cyrus/db/skipstamp: No such file or directory
May 15 12:28:29 ross-mail cyrus/ctl_cyrusdb[56905]: DBERROR: init() on skiplist
May 15 12:28:29 ross-mail cyrus/ctl_cyrusdb[56905]: recovering cyrus databases
May 15 12:28:29 ross-mail cyrus/ctl_cyrusdb[56905]: skiplist: checkpointed /var/lib/cyrus/mailboxes.db (54 records, 4084 bytes) in 0 seconds
May 15 12:28:29 ross-mail cyrus/ctl_cyrusdb[56905]: skiplist: checkpointed /var/lib/cyrus/annotations.db (0 records, 144 bytes) in 0 seconds
May 15 12:28:29 ross-mail cyrus/ctl_cyrusdb[56905]: done recovering cyrus databases
May 15 12:28:29 ross-mail cyrus/cyr_expire[56908]: DBERROR db5: /var/lib/cyrus/db/__db.001: No such file or directory
May 15 12:28:29 ross-mail cyrus/cyr_expire[56908]: DBERROR: dbenv->open '/var/lib/cyrus/db' failed: No such file or directory
May 15 12:28:29 ross-mail cyrus/cyr_expire[56908]: DBERROR: init() on berkeley
May 15 12:28:29 ross-mail cyrus/cyr_expire[56908]: DBERROR: reading /var/lib/cyrus/db/skipstamp, assuming the worst: No such file or directory
May 15 12:28:29 ross-mail cyrus/cyr_expire[56908]: skiplist: checkpointed /var/lib/cyrus/annotations.db (0 records, 144 bytes) in 0 seconds
May 15 12:28:29 ross-mail cyrus/cyr_expire[56908]: skiplist: checkpointed /var/lib/cyrus/mailboxes.db (54 records, 4084 bytes) in 0 seconds
May 15 12:28:29 ross-mail cyrus/cyr_expire[56908]: skiplist: checkpointed /var/lib/cyrus/deliver.db (93 records, 9700 bytes) in 0 seconds
May 15 12:28:29 ross-mail cyrus/cyr_expire[56908]: skiplist: checkpointed /var/lib/cyrus/user/r/ross.seen (56 records, 90896 bytes) in 0 seconds
May 15 12:29:13 ross-mail cyrus/cyr_expire[56908]: ERROR: message has more than 1000 header lines, not caching any more
May 15 12:29:45 ross-mail cyrus/cyr_expire[56908]: Index upgrade: user.ross (6 -> 12)
May 15 12:29:45 ross-mail cyrus/cyr_expire[56908]: skiplist: checkpointed /var/lib/cyrus/user/r/ross.seen (56 records, 90896 bytes) in 0 seconds
May 15 12:29:45 ross-mail cyrus/cyr_expire[56908]: Index upgrade: user.ross.Apple (6 -> 12)
May 15 12:29:45 ross-mail cyrus/cyr_expire[56908]: skiplist: checkpointed /var/lib/cyrus/user/r/ross.seen (56 records, 90896 bytes) in 0 seconds
May 15 12:29:48 ross-mail cyrus/cyr_expire[56908]: Index upgrade: user.ross.Apple.PerformanceOptimization (6 -> 12)

I.e., the logs did not fill with infinite errors.

Then, as also suggested in the last thread, I ran sudo cyrus ctl_cyrusdb -r
May 15 12:49:31 ross-mail cyrus/ctl_cyrusdb[57049]: DBERROR db5: /var/lib/cyrus/db: No such file or directory
May 15 12:49:31 ross-mail cyrus/ctl_cyrusdb[57049]: DBERROR db5: /var/lib/cyrus/db/__db.001: No such file or directory
May 15 12:49:31 ross-mail cyrus/ctl_cyrusdb[57049]: DBERROR db5: /var/lib/cyrus/db: No such file or directory
May 15 12:49:31 ross-mail cyrus/ctl_cyrusdb[57049]: DBERROR db5: /var/lib/cyrus/db/__db.001: No such file or directory
May 15 12:49:31 ross-mail cyrus/ctl_cyrusdb[57049]: DBERROR: dbenv->open '/var/lib/cyrus/db' failed: No such file or directory
May 15 12:49:31 ross-mail cyrus/ctl_cyrusdb[57049]: DBERROR: init() on berkeley
May 15 12:49:31 ross-mail cyrus/ctl_cyrusdb[57049]: DBERROR: writing /var/lib/cyrus/db/skipstamp: No such file or directory
May 15 12:49:31 ross-mail cyrus/ctl_cyrusdb[57049]: DBERROR: init() on skiplist
May 15 12:49:31 ross-mail cyrus/ctl_cyrusdb[57049]: recovering cyrus databases
May 15 12:49:31 ross-mail cyrus/ctl_cyrusdb[57049]: skiplist: checkpointed /var/lib/cyrus/mailboxes.db (54 records, 4084 bytes) in 0 seconds
May 15 12:49:31 ross-mail cyrus/ctl_cyrusdb[57049]: skiplist: checkpointed /var/lib/cyrus/annotations.db (0 records, 144 bytes) in 0 seconds
May 15 12:49:31 ross-mail cyrus/ctl_cyrusdb[57049]: done recovering cyrus databases

Info on database types
root at ross-mail:/var/lib/cyrus# file *.db
annotations.db: Cyrus skiplist DB
deliver.db:     Cyrus skiplist DB
mailboxes.db:   Cyrus skiplist DB
user_deny.db:   empty
root at ross-mail:/var/lib/cyrus# cd user/r
root at ross-mail:/var/lib/cyrus/user/r# file *seen *sub
ross.corrupt.seen: Cyrus skiplist DB
ross.seen:         Cyrus skiplist DB
ross.sub:          ASCII text


More information about the Info-cyrus mailing list