[Cyrus-CVS] src/cyrus/imap by brong

brong at andrew.cmu.edu brong at andrew.cmu.edu
Mon Jul 27 22:50:54 EDT 2009


Update of /afs/andrew.cmu.edu/system/cvs/src/cyrus/imap
In directory cyrus-devel-01.andrew.cmu.edu:/afs/andrew.cmu.edu/usr3/brong/src/cyrus/imap

Modified Files:
	idled.c 
Log Message:
Fork idled before cyrus_init()

We were getting:

* DBERROR db4: environment reference count went negative

Reliably in one random process when shutting down our cyrus
instances, and this is even with no BDB databases defined in
our config.  The cause was tracked to idled calling cyrus_done
in both the parent and child processes, but cyrus_init only in
the parent, hence closing the environment twice.

It's possible this also caused other issues for BDB, since it's
invalid usage of the API.

This change moves the fork to before cyrus_init(), meaning that
the environment is only ever initialised in the child process.


--- links to diffs follow ---
http://bugzilla.andrew.cmu.edu/cgi-bin/cvsweb.cgi/src/cyrus/imap/idled.c.diff?r1=1.26&r2=1.27


More information about the Cyrus-cvs mailing list