ctl_cyrusdb hanging in libcyrus_init ...
Marc G. Fournier
scrappy at hub.org
Sun Aug 29 12:36:30 EDT 2004
First, I'm running Cyrus IMAPd 2.2.8 currently ...
Trying to narrow down *why* this is happening, I started to add a bunch of
syslog() statements to global.c, to try and narrow things down ... I'm to
the point that I'm in 'cyrusdb_init()', with code that looks like:
void cyrusdb_init()
{
int i, r;
char dbdir[1024];
const char *confdir = libcyrus_config_getstring(CYRUSOPT_CONFIG_DIR);
int initflags = libcyrus_config_getint(CYRUSOPT_DB_INIT_FLAGS);
strcpy(dbdir, confdir);
strcat(dbdir, FNAME_DBDIR);
for(i=0; cyrusdb_backends[i]; i++) {
syslog(LOG_NOTICE, "-> cyrusdb_init; %s", cyrusdb_backends[i]->name);
r = (cyrusdb_backends[i])->init(dbdir, initflags);
if(r) {
syslog(LOG_ERR, "DBERROR: init() on %s",
cyrusdb_backends[i]->name);
}
}
}
Below is from the logs ... I have a process that checks for 2 ctl_cyrusdb
processes running, and if so, it does a restart on the master process ...
in this case, process 76671 and 81190 have hung up at cyrus_init:
berkeley, while 82601 shows a "clean" run through after the restart:
Aug 29 11:45:08 affronter ctl_cyrusdb[76671]: -> configure libcyrus
Aug 29 11:45:08 affronter ctl_cyrusdb[76671]: -> libcyrus_init begin
Aug 29 11:45:08 affronter ctl_cyrusdb[76671]: -> cyrusdb_init; berkeley
Aug 29 12:15:08 affronter ctl_cyrusdb[81190]: -> configure libcyrus
Aug 29 12:15:08 affronter ctl_cyrusdb[81190]: -> libcyrus_init begin
Aug 29 12:15:08 affronter ctl_cyrusdb[81190]: -> cyrusdb_init; berkeley
Aug 29 12:30:06 affronter ctl_cyrusdb[82601]: -> configure libcyrus
Aug 29 12:30:06 affronter ctl_cyrusdb[82601]: -> libcyrus_init begin
Aug 29 12:30:06 affronter ctl_cyrusdb[82601]: -> cyrusdb_init; berkeley
Aug 29 12:30:06 affronter ctl_cyrusdb[82601]: -> cyrusdb_init; berkeley-nosync
Aug 29 12:30:06 affronter ctl_cyrusdb[82601]: -> cyrusdb_init; flat
Aug 29 12:30:06 affronter ctl_cyrusdb[82601]: -> cyrusdb_init; skiplist
Aug 29 12:30:06 affronter ctl_cyrusdb[82601]: -> cyrusdb_init; quotalegacy
Aug 29 12:30:06 affronter ctl_cyrusdb[82601]: -> libcyrus_init end
Aug 29 12:30:06 affronter ctl_cyrusdb[82601]: -> end cyrus_init
Aug 29 12:30:06 affronter ctl_cyrusdb[82601]: recovering cyrus databases
Aug 29 12:30:06 affronter ctl_cyrusdb[82601]: skiplist: recovered /var/spool/imap/mailboxes.db (1 record, 336 bytes) in 0 seconds
Aug 29 12:30:06 affronter ctl_cyrusdb[82601]: skiplist: recovered /var/spool/imap/annotations.db (0 records, 144 bytes) in 0 seconds
Aug 29 12:30:06 affronter ctl_cyrusdb[82601]: done recovering cyrus databases
Aug 29 12:30:07 affronter ctl_cyrusdb[82612]: -> configure libcyrus
Aug 29 12:30:07 affronter ctl_cyrusdb[82612]: -> libcyrus_init begin
Aug 29 12:30:07 affronter ctl_cyrusdb[82612]: -> cyrusdb_init; berkeley
Aug 29 12:30:07 affronter ctl_cyrusdb[82612]: -> cyrusdb_init; berkeley-nosync
Aug 29 12:30:07 affronter ctl_cyrusdb[82612]: -> cyrusdb_init; flat
Aug 29 12:30:07 affronter ctl_cyrusdb[82612]: -> cyrusdb_init; skiplist
Aug 29 12:30:07 affronter ctl_cyrusdb[82612]: -> cyrusdb_init; quotalegacy
Aug 29 12:30:07 affronter ctl_cyrusdb[82612]: -> libcyrus_init end
Aug 29 12:30:07 affronter ctl_cyrusdb[82612]: -> end cyrus_init
Aug 29 12:30:07 affronter ctl_cyrusdb[82612]: checkpointing cyrus databases
Aug 29 12:30:07 affronter ctl_cyrusdb[82612]: done checkpointing cyrus databases
I'm still working on 'moving in' towards the culprit ... but does anyone
know why the above would happen?
Will post more as I get more ...
----
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: scrappy at hub.org Yahoo!: yscrappy ICQ: 7615664
---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
More information about the Info-cyrus
mailing list