Re: [Exim] race condition, locking, crash

Top Page
Delete this message
Reply to this message
Author: Peter D. Gray
Date:  
To: exim-users
Subject: Re: [Exim] race condition, locking, crash
On Mon, Nov 24, 2003 at 09:30:32AM +0000, Philip Hazel wrote:
> On Sat, 22 Nov 2003, Peter D. Gray wrote:
>
> > It occurs to me that there may be a race condition
> > when updating DB style maps which could cause
> > exim to crash. If you are using any style of
> > DB database which uses both a .pag and a .dir file
> > then the exim_dbmbuild will rename one of the
> > files, then the other. If exim is
> > accessing the database between the move of the
> > .pag file and the .dir file then I believe there
> > is a good chance of a crash. At best, the result of
> > any lookups would be undefined.
> >
> > Am I right in this?
>
> Possibly, but I don't know enough about how the dir/pag libraries
> work to know if it actually matters or not.
>
> Strictly, the only time of danger is when the DBM library has opened
> one of the files and not the other. Once both files are open, Exim
> will continue to use those versions of the files, even if the names
> are change to point to new versions.
>


Ahhhh... here is the nub of the issue. This may solve the problem.
If exim keeps the db files open, how do I instruct
it to close and re-open all the files it has open?

Obviously, as aliases are updated for example, I need to
rebuild the aliases DB files.


Regards,
pdg

--

See mail headers for contact information.